Функция рисования графика перенесена в gfx_lib и автоматизирована
This commit is contained in:
@@ -31,8 +31,6 @@ typedef struct
|
||||
uint8_t yPos_End;
|
||||
uint8_t pxColor;
|
||||
}GFX_LineHandleTypeDef;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t xPos_Start;
|
||||
@@ -51,7 +49,6 @@ typedef struct
|
||||
uint8_t pxColor;
|
||||
uint8_t Filled;
|
||||
}GFX_CircleHandleTypeDef;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t xPos1;
|
||||
@@ -63,6 +60,17 @@ typedef struct
|
||||
uint8_t pxColor;
|
||||
uint8_t Filled;
|
||||
}GFX_TriangleHandleTypeDef;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t xPos;
|
||||
uint8_t yPos;
|
||||
uint8_t size;
|
||||
uint16_t angle;
|
||||
uint8_t pxColor;
|
||||
uint8_t Filled;
|
||||
}GFX_ArrowHandleTypeDef;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t xPos;
|
||||
@@ -74,10 +82,36 @@ typedef struct
|
||||
uint8_t Filled;
|
||||
}GFX_ArcHandleTypeDef;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t xPos;
|
||||
uint8_t yPos;
|
||||
uint8_t plotHeight;
|
||||
uint8_t plotWidth;
|
||||
|
||||
float *pDataPtr;
|
||||
uint32_t dataSize;
|
||||
float dataMax;
|
||||
|
||||
float plotSpeed;
|
||||
float plotInd;
|
||||
uint8_t plotShift;
|
||||
uint8_t pixX;
|
||||
int32_t pixY;
|
||||
uint8_t prevPixY;
|
||||
|
||||
unsigned signedData:1;
|
||||
unsigned plotFrame:1;
|
||||
unsigned plotXAxis:1;
|
||||
unsigned plotYAxis:1;
|
||||
unsigned __initialized:1;
|
||||
}GFX_PlotterFloatHandleTypeDef;
|
||||
|
||||
|
||||
|
||||
/* прототипы функций */
|
||||
void GFX_Clean_Buffer_Frame(uint8_t *Buffer_Frame, uint32_t Buffer_Frame_Size);
|
||||
void GFX_Clean_Buffer_Frame(uint8_t *Buffer_Frame);
|
||||
void GFX_Clean_Area(uint8_t *Buffer_Frame, uint16_t xPos_Start, uint16_t yPos_Start, uint16_t width, uint16_t height);
|
||||
void GFX_Draw_Pixel(uint8_t *Buffer_Frame, uint8_t xPos, uint8_t yPos, uint8_t pxColor);
|
||||
void GFX_Invertion_Area(uint8_t *Buffer_Frame, uint16_t xPos_Start, uint16_t yPos_Start, uint16_t width, uint16_t height);
|
||||
void GFX_Invertion_Display(uint8_t *Buffer_Frame);
|
||||
@@ -90,7 +124,9 @@ void GFX_Draw_Line(uint8_t *Buffer_Frame, GFX_LineHandleTypeDef *hLine);
|
||||
void GFX_Draw_Rectangle(uint8_t *Buffer_Frame, GFX_RectangleHandleTypeDef *hRectangle);
|
||||
void GFX_Draw_Circle(uint8_t *Buffer_Frame, GFX_CircleHandleTypeDef *hCircle);
|
||||
void GFX_Draw_Triangle(uint8_t *Buffer_Frame, GFX_TriangleHandleTypeDef *hTriangle);
|
||||
void GFX_Draw_Arrow(uint8_t *Buffer_Frame, GFX_ArrowHandleTypeDef *hArrow);
|
||||
void GFX_Draw_Arc(uint8_t *Buffer_Frame, GFX_ArcHandleTypeDef *hArc);
|
||||
void GFX_Draw_Plotter(uint8_t *Buffer_Frame, GFX_PlotterFloatHandleTypeDef *hPlot);
|
||||
|
||||
|
||||
|
||||
@@ -104,5 +140,6 @@ void __GFX_Draw_Triangle(uint8_t *Buffer_Frame,
|
||||
uint8_t xPos2, uint8_t yPos2,
|
||||
uint8_t xPos3, uint8_t yPos3,
|
||||
uint8_t pxColor);
|
||||
void __GFX_Draw_Arrow(uint8_t *Buffer_Frame, uint8_t xPos, uint8_t yPos, uint8_t size, uint16_t angle, uint8_t pxColor);
|
||||
void __GFX_Draw_Arc(uint8_t *Buffer_Frame, uint8_t xPos, uint8_t yPos, uint8_t radius, uint16_t startAngle, uint16_t endAngle, uint8_t pxColor);
|
||||
#endif /* INC_PIXEL_GRAPHICS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user