- Fixed drawing of round objects (Circles, Rounded Rects) using a lookup table

- Added function to read out the display_buffer via USB-Serial
 - Added basic structure and files for later complete firmware (still in progress)
 - Added Doc folder with schematic in it
 - Added Python script and batch file to read out the display buffer and open the image in gimp
This commit is contained in:
2025-09-07 08:55:39 +02:00
parent 714b5be13c
commit 128d42c586
66 changed files with 29943 additions and 225 deletions

View File

@@ -502,10 +502,31 @@ Object_ID Display_Objects_Add_Rounded_Rectangle_Frame(Anchor_Point anchor_point,
return Display_Objects_Add(SHAPE, anchor_point, coordinates_type, x, y, selectable, (void *)Shape, style_id, animation_id);
}
Object_ID Display_Objects_Add_Circle_Filled(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, Style_ID style_id, Animation_ID animation_id)
{
Object_Shape *Shape = malloc(sizeof(Object_Shape));
Shape->Type = CIRCLE_FILLED;
Shape->Color = color;
Shape->Dimension.Width = 0;
Shape->Dimension.Height = 0;
Shape->Radius_Start = radius;
Shape->Radius_End = radius;
Shape->Thickness = 0;
Shape->Draw_Steps = 0;
Shape->Angle_Start = 0;
Shape->Angle_End = 0;
Coordinates Coordinates_In_Px = { .X = x, .Y = y };
Display_Objects_Convert_Coordinates(coordinates_type, &Coordinates_In_Px);
return Display_Objects_Add(SHAPE, anchor_point, BOTH_IN_PIXEL, Coordinates_In_Px.X + radius, Coordinates_In_Px.Y + radius, selectable, (void *)Shape, style_id, animation_id);
}
Object_ID Display_Objects_Add_Circle_Frame(Anchor_Point anchor_point, Coordinates_Type coordinates_type, int16_t x, int16_t y, bool selectable, Display_Color color, uint16_t radius, uint16_t thickness, Style_ID style_id, Animation_ID animation_id)
{
Object_Shape *Shape = malloc(sizeof(Object_Shape));
Shape->Type = CIRCLE;
Shape->Type = CIRCLE_FRAME;
Shape->Color = color;
Shape->Dimension.Width = 0;
Shape->Dimension.Height = 0;
@@ -1421,18 +1442,15 @@ Dimension Display_Objects_Get_Content_Size_From_Shape(Display_Object *object)
switch(Shape->Type)
{
case RECTANGLE_FILLED:
case RECTANGLE_FRAME:
case ROUNDED_RECTANGLE_FILLED:
case ROUNDED_RECTANGLE_FRAME:
Dimension.Width = Shape->Dimension.Width;
Dimension.Height = Shape->Dimension.Height;
break;
case RECTANGLE_FRAME:
case ROUNDED_RECTANGLE_FRAME:
Dimension.Width = Shape->Dimension.Width + Shape->Thickness;
Dimension.Height = Shape->Dimension.Height + Shape->Thickness;
break;
case CIRCLE:
case CIRCLE_FILLED:
case CIRCLE_FRAME:
Dimension.Width = Shape->Radius_Start * 2;
Dimension.Height = Shape->Radius_Start * 2;
break;