fix: color wheel alpha assignment

This commit is contained in:
2026-03-08 18:22:08 +00:00
parent ed49bc5f14
commit 5890a2aaa7
2 changed files with 3 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ void vektor_appstate_new(VektorWidgetState* wstate, VektorAppState* stateOut) {
*stateOut->shapeBuffer = (VektorShapeBuffer){0}; *stateOut->shapeBuffer = (VektorShapeBuffer){0};
stateOut->canvas = malloc(sizeof(VektorCanvas)); stateOut->canvas = malloc(sizeof(VektorCanvas));
stateOut->widgetState = wstate; stateOut->widgetState = wstate;
stateOut->currentColor = vektor_color_blank; stateOut->currentColor = vektor_color_solid(0, 0, 0);
stateOut->selectedShape = NULL; stateOut->selectedShape = NULL;
vektor_canvas_init(wstate, stateOut->canvas, stateOut->shapeBuffer); vektor_canvas_init(wstate, stateOut->canvas, stateOut->shapeBuffer);

View File

@@ -362,7 +362,8 @@ VektorColor vektor_color_wheel_get_color(VektorColorWheel* wheel) {
return (VektorColor) { return (VektorColor) {
.r = (unsigned char)(r*255), .r = (unsigned char)(r*255),
.g = (unsigned char)(g*255), .g = (unsigned char)(g*255),
.b = (unsigned char)(b*255) .b = (unsigned char)(b*255) ,
.a = 255
}; };
} }