2016-06-08 07:25:08 +02:00
|
|
|
/**
|
|
|
|
* @file lv_draw_img.h
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LV_DRAW_H
|
|
|
|
#define LV_DRAW_H
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
|
|
|
#include "../lv_objx/lv_btn.h"
|
|
|
|
#include "../lv_objx/lv_rect.h"
|
|
|
|
#include "../lv_objx/lv_line.h"
|
|
|
|
#include "../lv_objx/lv_img.h"
|
|
|
|
#include "../lv_objx/lv_label.h"
|
|
|
|
|
2017-01-02 10:48:21 +01:00
|
|
|
#include "misc_conf.h"
|
2017-02-01 11:39:48 +01:00
|
|
|
#include "../lv_misc/text.h"
|
2017-01-02 10:48:21 +01:00
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL PROTOTYPES
|
|
|
|
**********************/
|
2017-01-13 23:27:49 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw a rectangle
|
|
|
|
* @param cords_p the coordinates of the rectangle
|
|
|
|
* @param mask_p the rectangle will be drawn only in this mask
|
|
|
|
* @param rects_p pointer to a rectangle style
|
|
|
|
* @param opa the opacity of the rectangle (0..255)
|
|
|
|
*/
|
2017-01-02 15:29:05 +01:00
|
|
|
#if USE_LV_RECT != 0
|
2016-06-08 07:25:08 +02:00
|
|
|
void lv_draw_rect(const area_t * cords_p, const area_t * mask_p,
|
2017-01-13 23:27:49 +01:00
|
|
|
const lv_rects_t * rects_p, opa_t opa);
|
2017-01-02 15:29:05 +01:00
|
|
|
#endif
|
|
|
|
|
2017-01-13 23:27:49 +01:00
|
|
|
/**
|
|
|
|
* Write a text
|
|
|
|
* @param cords_p coordinates of the label
|
|
|
|
* @param mask_p the label will be drawn only in this area
|
|
|
|
* @param labels_p pointer to a label style
|
|
|
|
* @param opa opacity of the text (0..255)
|
|
|
|
* @param txt 0 terminated text to write
|
2017-02-01 11:39:48 +01:00
|
|
|
* @param flags settings for the text from 'txt_flag_t' enum
|
2017-01-13 23:27:49 +01:00
|
|
|
*/
|
2017-01-02 15:29:05 +01:00
|
|
|
#if USE_LV_LABEL != 0
|
2016-06-08 07:25:08 +02:00
|
|
|
void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
|
2017-02-01 11:39:48 +01:00
|
|
|
const lv_labels_t * labels_p, opa_t opa, const char * txt, txt_flag_t flag);
|
2017-01-02 15:29:05 +01:00
|
|
|
#endif
|
|
|
|
|
2017-01-13 23:27:49 +01:00
|
|
|
/**
|
|
|
|
* Draw an image
|
|
|
|
* @param cords_p the coordinates of the image
|
|
|
|
* @param mask_p the image will be drawn only in this area
|
|
|
|
* @param map_p pointer to a color_t array which contains the pixels of the image
|
|
|
|
* @param opa opacity of the image (0..255)
|
|
|
|
*/
|
|
|
|
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
|
|
|
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
|
|
|
|
const lv_imgs_t * imgs_p, opa_t opa, const char * fn);
|
2017-01-02 15:29:05 +01:00
|
|
|
#endif
|
2017-01-02 10:48:21 +01:00
|
|
|
|
2017-01-13 23:27:49 +01:00
|
|
|
/**
|
|
|
|
* Draw a line
|
|
|
|
* @param p1 first point of the line
|
|
|
|
* @param p2 second point of the line
|
|
|
|
* @param mask_pthe line will be drawn only on this area
|
|
|
|
* @param lines_p pointer to a line style
|
|
|
|
* @param opa opacity of the line (0..255)
|
|
|
|
*/
|
|
|
|
#if USE_LV_LINE != 0
|
|
|
|
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
|
|
|
|
const lv_lines_t * lines_p, opa_t opa);
|
2017-01-02 10:48:21 +01:00
|
|
|
#endif
|
2017-01-13 23:27:49 +01:00
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
#endif
|