Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » DrawArc not working in GTK mode
Re: DrawArc not working in GTK mode [message #50232 is a reply to message #50231] |
Fri, 31 August 2018 13:54   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
As a quick workaround without changing UPP code :
static void _DrawCircle(ImageDraw &iw, int xc, int yc, int r, Color c)
{
#ifdef flagGTK
iw.Alpha().DrawArc(Rect(xc - r, yc - r, xc + r, yc + r), Point(xc + r, 0), Point(xc - r, 0), 2, GrayColor(255));
iw. DrawArc(Rect(xc - r, yc - r, xc + r, yc + r), Point(xc + r, 0), Point(xc - r, 0), 2, c);
iw.Alpha().DrawArc(Rect(xc - r, yc - r, xc + r, yc + r), Point(xc - r, 0), Point(xc + r, 0), 2, GrayColor(255));
iw. DrawArc(Rect(xc - r, yc - r, xc + r, yc + r), Point(xc - r, 0), Point(xc + r, 0), 2, c);
#else
iw.Alpha().DrawArc(Rect(xc - r, yc - r, xc + r, yc + r), Point(xc + r, 0), Point(xc + r, 0), 0, GrayColor(255));
iw. DrawArc(Rect(xc - r, yc - r, xc + r, yc + r), Point(xc + r, 0), Point(xc + r, 0), 0, c);
#endif
}
Notice the thickness of 2 in GTK mode, using the default (0 or 1) draws an almost invisible arc.
|
|
|
Goto Forum:
Current Time: Sun Jul 06 11:11:04 CEST 2025
Total time taken to generate the page: 0.03834 seconds
|