Opened 15 months ago
Last modified 14 months ago
#18584 new bug
Problem with StrokeArc
Reported by: | thaflo | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | User Interface | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
As I am trying to draw a cake-like thing, I encountered the problem, that the cake-pieces (StrokeArc) don't fit together. Code's like this, picture is attached.Don't know if it's my code fault or what else. In DiskUsage it seems to work.
backgr->SetPenSize(200); backgr->StrokeArc(p, 100, 100, 0, 18); backgr->SetHighColor(200,0,0); backgr->StrokeArc(p, 100, 100, 18, 18); backgr->SetHighColor(200,200,200); backgr->StrokeArc(p, 100, 100, 36, 18); backgr->SetHighColor(0,200,0); backgr->StrokeArc(p, 100, 100, 54, 18); backgr->SetPenSize(20); backgr->FillArc(p,40,40, 0,360); backgr->SetHighColor(255,0,0); backgr->FillArc(p,20,20, 0,360);
Attachments (2)
Change History (6)
comment:1 by , 15 months ago
comment:2 by , 15 months ago
Maybe I (as a beginner) did something wrong. At least I don't get the result I am expecting. I attach the whole code I have. Click the 3th button to draw the thing
by , 15 months ago
comment:3 by , 14 months ago
The screenshot and the code still don't match, but I see what you mean.
At a quick glance, we first turn arcs into Bézier curves, which can't really represent them exactly. Whatever immeasurable imprecision for a 1-pixel path is multiplied the farther you go from the middle line, so it would be noticeable with your pen size.
Not sure if that's all, though.
Your screenshot does not seem to match at all with your code excerpt: not only the angles are wrong, but also the colors and pen widths? Is it from a different test? Or is that really broken too?