polyline width [message #202009] |
Sun, 06 November 2005 10:05 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
it appears that when the polyline width is set to be greater than 1, the
first segment of the polyline is painted with width 1. the remaining
segments are painted with the correct width.
|
|
|
Re: polyline width [message #202017 is a reply to message #202009] |
Mon, 07 November 2005 00:29 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The logic example sets width to 2 when selecting a connection, so you must
be doing something different. Please provide a snippet.
"Al Major" <alnospammajor@noboxspamspoon.com> wrote in message
news:dkkkdg$lmc$1@news.eclipse.org...
> it appears that when the polyline width is set to be greater than 1, the
> first segment of the polyline is painted with width 1. the remaining
> segments are painted with the correct width.
|
|
|
Re: polyline width [message #202034 is a reply to message #202017] |
Mon, 07 November 2005 06:34 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
there are certain segments that don't get painted at a width > 1. it
seems to happen more with the first segment (but not to _every_ first
segment). and sometimes it happens to an in-between segment.
the only other common denominator is that it's always a horizontal
segment (y value is the same on both end points) that is mis-painted. i
haven't seen this issue yet on a non-horizontal segment of a polyline.
if i get the time, i'll try to write a snippet that exhibits the
behavior. in the mean time, the "horizontal" clue may help you narrow
down the possibilities.
Randy Hudson wrote:
> The logic example sets width to 2 when selecting a connection, so you must
> be doing something different. Please provide a snippet.
>
|
|
|
Re: polyline width [message #202180 is a reply to message #202034] |
Mon, 07 November 2005 16:49 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
It sounds like lines are not painting in the same places on different
platforms, and therefore the clipping is cutting off some lines at the
extreme edges of the connection's bounds.
Which platform are you using? Are you using advanced graphics? Which build
of Eclipse?
"Al Major" <alnospammajor@noboxspamspoon.com> wrote in message
news:dkmse5$sn4$1@news.eclipse.org...
> there are certain segments that don't get painted at a width > 1. it seems
> to happen more with the first segment (but not to _every_ first segment).
> and sometimes it happens to an in-between segment.
>
> the only other common denominator is that it's always a horizontal segment
> (y value is the same on both end points) that is mis-painted. i haven't
> seen this issue yet on a non-horizontal segment of a polyline.
>
> if i get the time, i'll try to write a snippet that exhibits the behavior.
> in the mean time, the "horizontal" clue may help you narrow down the
> possibilities.
>
> Randy Hudson wrote:
>> The logic example sets width to 2 when selecting a connection, so you
>> must be doing something different. Please provide a snippet.
>>
|
|
|
Re: polyline width [message #202292 is a reply to message #202180] |
Tue, 08 November 2005 03:14 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
brilliant! it probably _is_ a clipping issue. it appears to be happening
on horizontal segments that would be at the _upper_ clip boundary.
behavior at the lower clip boundary seems correct.
3.2M2 on winXP. i have anti-alias set to SWT.ON, and am using
transparency. is that advanced graphics?.
Randy Hudson wrote:
> It sounds like lines are not painting in the same places on different
> platforms, and therefore the clipping is cutting off some lines at the
> extreme edges of the connection's bounds.
>
> Which platform are you using? Are you using advanced graphics? Which build
> of Eclipse?
>
|
|
|
Re: polyline width [message #202300 is a reply to message #202292] |
Tue, 08 November 2005 04:38 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
it was definitely a clipping problem. i changed the bound calculation
code to reflect changing widths and the problem is fixed.
i'm wondering why only the segments on the upper clip bound were
affected. it should have affected segments on both the upper and lower
bounds. so it may still be worth looking into the polyline clip. but my
problem is solved.
thanks much.
|
|
|
Re: polyline width [message #202307 is a reply to message #202300] |
Tue, 08 November 2005 07:17 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
actually, it could be because i was using width of 2, which may be
painted asymmetrically on one side (upward) of the actual line, instead
of being anti-aliased in some fancy way.
> i'm wondering why only the segments on the upper clip bound were
> affected. it should have affected segments on both the upper and lower
|
|
|
Re: polyline width [message #202534 is a reply to message #202292] |
Thu, 10 November 2005 18:24 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
I still can't reproduce the problem on 3.2 M2. Wires use advanced graphics
because anti-aliasing is enabled. The line width is 2 when selected. What's
different about your scenario?
|
|
|
Re: polyline width [message #202580 is a reply to message #202534] |
Fri, 11 November 2005 04:43 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
i apologize, i should've been clearer in my last 2 posts. i'm fairly
sure the bug was in my code.
i had a situation where the polyline width changed (from 1 to 2) during
rollover, but the bounds calculation on the figure was done with a width
of 1 (i.e. it wasn't recomputed to adjust for the width change). this
resulted in the segments on the "upper" boundary being clipped. the
segments on the lower boundary were being drawn at the correct width.
after i changed the bounds calculation to always reflect the maximum
width of the polyline, the segments on the upper boundary are painted
correctly.
i was puzzled about why the incorrect bounds calculation should only
clip segments at the top border, while leaving the lower border segments
unaffected. as i mentioned in my previous post, i believe it's because
of the way that a horizontal line of width 2 is drawn (a second row of
pixels _above_ the first).
if i'd been using a width of 3, i believe i would've seen clipping on
both top and bottom boundaries. if you like, i can test this case, to
confirm my hypothesis. i should be able to do this without writing a
separate test program.
Randy Hudson wrote:
> I still can't reproduce the problem on 3.2 M2. Wires use advanced graphics
> because anti-aliasing is enabled. The line width is 2 when selected. What's
> different about your scenario?
>
>
>
|
|
|
Re: polyline width [message #203094 is a reply to message #202580] |
Thu, 17 November 2005 15:54 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Were you calling setLineWidth?
"Al Major" <alnospammajor@noboxspamspoon.com> wrote in message
news:dl1ddu$jfq$1@news.eclipse.org...
>i apologize, i should've been clearer in my last 2 posts. i'm fairly sure
>the bug was in my code.
>
> i had a situation where the polyline width changed (from 1 to 2) during
> rollover, but the bounds calculation on the figure was done with a width
> of 1 (i.e. it wasn't recomputed to adjust for the width change). this
> resulted in the segments on the "upper" boundary being clipped. the
> segments on the lower boundary were being drawn at the correct width.
>
> after i changed the bounds calculation to always reflect the maximum width
> of the polyline, the segments on the upper boundary are painted correctly.
Why are you overriding the default bounds calculations?
|
|
|
Re: polyline width [message #204470 is a reply to message #203094] |
Sun, 04 December 2005 07:14 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
Randy Hudson wrote:
> Were you calling setLineWidth?
>
yes. setLineWidth is being called.
>
> Why are you overriding the default bounds calculations?
>
not sure i understand... the model figure doesn't extend polyline. it's
composed of (possibly multiple) polylines. there's no default bounds
calculation to override.
|
|
|
Powered by
FUDForum. Page generated in 0.04614 seconds