1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00
lvgl/lv_draw/lv_draw.h

85 lines
2.2 KiB
C
Raw Normal View History

2016-06-08 07:25:08 +02:00
/**
* @file lv_draw.h
2016-06-08 07:25:08 +02:00
*
*/
#ifndef LV_DRAW_H
#define LV_DRAW_H
/*********************
* INCLUDES
*********************/
2017-01-02 10:48:21 +01:00
#include "misc_conf.h"
2017-04-21 09:15:39 +02:00
#include "misc/gfx/text.h"
#include "../lv_obj/lv_style.h"
2017-01-02 10:48:21 +01:00
2016-06-08 07:25:08 +02:00
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw a rectangle
* @param cords_p the coordinates of the rectangle
* @param mask_p the rectangle will be drawn only in this mask
* @param style_p pointer to a style
*/
void lv_draw_rect(const area_t * cords_p, const area_t * mask_p, const lv_style_t * style_p);
2017-01-02 15:29:05 +01:00
/*Experimental use for 3D modeling*/
#define USE_LV_TRIANGLE 0
#if USE_LV_TRIANGLE != 0
/**
*
* @param points pointer to an array with 3 points
* @param mask_p the triangle will be drawn only in this mask
* @param color color of the triangle
*/
void lv_draw_triangle(const point_t * points, const area_t * mask_p, color_t color);
#endif
/**
* Write a text
* @param cords_p coordinates of the label
* @param mask_p the label will be drawn only in this area
* @param style_p pointer to a style
* @param txt 0 terminated text to write
* @param flags settings for the text from 'txt_flag_t' enum
* @param offset text offset in x and y direction (NULL if unused)
*/
void lv_draw_label(const area_t * cords_p,const area_t * mask_p, const lv_style_t * style_p,
const char * txt, txt_flag_t flag, point_t * offset);
2017-01-02 15:29:05 +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
*/
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
const lv_style_t * style_p, const char * fn);
2017-01-02 10:48:21 +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 style_p pointer to a style
*/
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
const lv_style_t * style_p);
2016-06-08 07:25:08 +02:00
/**********************
* MACROS
**********************/
#endif