Custom line style plays havoc with GuideLineFigure painting [message #194078] |
Tue, 30 August 2005 11:58  |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
I added a Border with a custom line style to a Figure. The result was that
painting of guide lines got completely messed up.
It's easy to reproduce even with the Logic example:
a) Modify LEDFigure (or any other Figure) constructor and add the following
code:
setBorder(new LineBorder() {
public void paint(IFigure figure, Graphics graphics, Insets insets)
{
//Save state
graphics.pushState();
int lineStyle = graphics.getLineStyle();
graphics.setLineStyle(SWT.LINE_CUSTOM);
graphics.setLineDash(new int[]{16,8});
super.paint(figure,graphics,insets);
graphics.setLineDash(null);
graphics.setLineStyle(lineStyle);
//Restore the state
graphics.popState();
}
});
b) Run the example, and open an existing or create a new Logic diagram.
c) Turn on the ruler display. Create a few guides.
d) Add the LED figure to the diagram.
e) Drag it around, crossing the guide lines.
f) See the guide lines appearing and disappearing randomly.
g) When drag is completed, all guide lines disappear which were touched or
crossed during the drag.
Note that the custom paint method restored the graphics state when it
completed.
Randy/Pratik: Any idea what's going on? Should I just go ahead and file a
report in Bugzilla?
---
Sunil
|
|
|
|
Re: Custom line style plays havoc with GuideLineFigure painting [message #194138 is a reply to message #194111] |
Tue, 30 August 2005 16:42   |
Eclipse User |
|
|
|
Originally posted by: sunil_kamath.nohotspammail.com
"Randy Hudson" <none@us.ibm.com> wrote in message
news:df2dl3$qbg$1@news.eclipse.org...
>A bugzilla is already opened for this. It is probably an SWT bug.
>
Thanks, I found it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=105618
OK, I will vote for it, if that helps.
---
Sunil
> "Sunil Kamath" <sunil_kamath@nohotspammail.com> wrote in message
> news:df1vo6$81t$1@news.eclipse.org...
>>I added a Border with a custom line style to a Figure. The result was that
>>painting of guide lines got completely messed up.
>> It's easy to reproduce even with the Logic example:
>> a) Modify LEDFigure (or any other Figure) constructor and add the
>> following code:
>> setBorder(new LineBorder() {
>> public void paint(IFigure figure, Graphics graphics, Insets
>> insets)
>> {
>> //Save state
>> graphics.pushState();
>> int lineStyle = graphics.getLineStyle();
>> graphics.setLineStyle(SWT.LINE_CUSTOM);
>> graphics.setLineDash(new int[]{16,8});
>> super.paint(figure,graphics,insets);
>> graphics.setLineDash(null);
>> graphics.setLineStyle(lineStyle);
>>
>> //Restore the state
>> graphics.popState();
>> }
>> });
>> b) Run the example, and open an existing or create a new Logic diagram.
>> c) Turn on the ruler display. Create a few guides.
>> d) Add the LED figure to the diagram.
>> e) Drag it around, crossing the guide lines.
>> f) See the guide lines appearing and disappearing randomly.
>> g) When drag is completed, all guide lines disappear which were touched
>> or crossed during the drag.
>>
>> Note that the custom paint method restored the graphics state when it
>> completed.
>>
>> Randy/Pratik: Any idea what's going on? Should I just go ahead and file a
>> report in Bugzilla?
>> ---
>> Sunil
>>
>
>
|
|
|
Re: Custom line style plays havoc with GuideLineFigure painting [message #215689 is a reply to message #194138] |
Mon, 08 May 2006 16:58  |
Eclipse User |
|
|
|
Hi,
Is anybody aware of progress with this problem, or at least a workaround?
Thanks,
Youval
Sunil Kamath wrote:
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:df2dl3$qbg$1@news.eclipse.org...
>
>>A bugzilla is already opened for this. It is probably an SWT bug.
>>
>
>
> Thanks, I found it:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=105618
>
> OK, I will vote for it, if that helps.
> ---
> Sunil
>
>
>>"Sunil Kamath" <sunil_kamath@nohotspammail.com> wrote in message
>>news:df1vo6$81t$1@news.eclipse.org...
>>
>>>I added a Border with a custom line style to a Figure. The result was that
>>>painting of guide lines got completely messed up.
>>>It's easy to reproduce even with the Logic example:
>>>a) Modify LEDFigure (or any other Figure) constructor and add the
>>>following code:
>>>setBorder(new LineBorder() {
>>> public void paint(IFigure figure, Graphics graphics, Insets
>>>insets)
>>> {
>>> //Save state
>>> graphics.pushState();
>>> int lineStyle = graphics.getLineStyle();
>>> graphics.setLineStyle(SWT.LINE_CUSTOM);
>>> graphics.setLineDash(new int[]{16,8});
>>> super.paint(figure,graphics,insets);
>>> graphics.setLineDash(null);
>>> graphics.setLineStyle(lineStyle);
>>>
>>> //Restore the state
>>> graphics.popState();
>>> }
>>> });
>>>b) Run the example, and open an existing or create a new Logic diagram.
>>>c) Turn on the ruler display. Create a few guides.
>>>d) Add the LED figure to the diagram.
>>>e) Drag it around, crossing the guide lines.
>>>f) See the guide lines appearing and disappearing randomly.
>>>g) When drag is completed, all guide lines disappear which were touched
>>>or crossed during the drag.
>>>
>>>Note that the custom paint method restored the graphics state when it
>>>completed.
>>>
>>>Randy/Pratik: Any idea what's going on? Should I just go ahead and file a
>>>report in Bugzilla?
>>>---
>>>Sunil
>>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06316 seconds