Hello.
I try to find a nice way to do custom shapes of forms for X11/XWayland.
X11 gives
XDrawRectangle,
XFillRectangle and
XDrawArc,
XFillArc for this.
Example, a from with shape ellipse:
XDrawarc(appdisp, pmap, shape_gc, 0, 0, width-1 , height-1, 0, 360*64);
XFillarc(appdisp, pmap, shape_gc, 0, 0, width-1 , height-1, 0, 360*64);
Now for complex shapes, other developers advice to use many
XDrawRectangle+
XFillRectangle of different sizes.
And all those rectangles will do the wanted custom form.
Example of a rectangle:
XDrawRectangle(appdisp, pmap, shape_gc, width div 2, 0, width , height div 3);
XFillRectangle(appdisp, pmap, shape_gc, width div 2, 0, width , height div 3);
OK, but using a bitmap monochrome b/w where all the black shapes should be replaced by those rectangles, what would be the steps?
Maybe using
BGRABitmap to scan the monochrome bitmap and then create the rectangles?
Any idea is welcome.
Thanks.
Fre;D