Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 507392

Summary: Drawing a filled arc does not produce a pie
Product: [RT] RAP Reporter: Michael Scheike <michael.scheike>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: michael.scheike
Version: 3.1   
Target Milestone: 3.2 M4   
Hardware: PC   
OS: Windows NT   
See Also: https://git.eclipse.org/r/#/c/84862/
Whiteboard: sr312
Attachments:
Description Flags
Correct output of draw arc
none
wrong output none

Description Michael Scheike CLA 2016-11-11 04:48:35 EST
when drawing a filled arc the result will be a slice of a circle instead a piece of pie. introduced by correction of bug 499417, change 78690. my fix is adding the following line in method drawArc in class GCOperationWriter:

        operations.add(new JsonArray().add("ellipse").add(cx).add(cy).add(rx).add(ry).add(0).add(startAngle).add(startAngle + arcAngle).add(arcAngle < 0));
        if (operation.fill) {
            addClientOperation("lineTo", 0, 0); // <---- Fix
            addClientOperation("closePath");
        }
Comment 1 Ivan Furnadjiev CLA 2016-11-11 05:07:58 EST
When fixing the bug 499417 I've double checked the behaviour with SWT GC. Please provide a small drawing snippet that demonstrate the difference between RAP and SWT GC drawing.
Comment 2 Ivan Furnadjiev CLA 2016-11-11 05:25:38 EST
OK... I can reproduce it.
Comment 3 Michael Scheike CLA 2016-11-11 05:26:56 EST
Created attachment 265315 [details]
Correct output of draw arc
Comment 4 Michael Scheike CLA 2016-11-11 05:27:41 EST
Created attachment 265316 [details]
wrong output
Comment 5 Michael Scheike CLA 2016-11-11 05:28:25 EST
in the pictures you see the correct and wrong behaviour
Comment 6 Ivan Furnadjiev CLA 2016-11-11 05:49:23 EST
(In reply to comment #5)
> in the pictures you see the correct and wrong behaviour
Got it. Thanks for reporting it and for the proposed fix. Pending change to master branch is here: https://git.eclipse.org/r/#/c/84862/. Will be backported to 3.1.2.
Comment 7 Ivan Furnadjiev CLA 2016-11-11 06:19:09 EST
Fixed.
Comment 8 Ivan Furnadjiev CLA 2016-11-11 10:25:27 EST
Backported to 3.1-maintenance branch with change https://git.eclipse.org/r/#/c/84869/