Allright, I get it

thanks Nicolai !

Pierre

2014-11-19 16:48 GMT-03:00 Nicolai Hess <[email protected]>:

> 2014-11-19 16:02 GMT+01:00 Pierre CHANSON <[email protected]>:
>
>> Hi,
>>
>> does anyone know how to use RTPolygon shape or is there a real problem
>> inside ?
>> For exemple you get an error when executing:
>>
>> -=-=-=-=-=-=-=-=-=-=-=-=
>>
>> v := RTView new.
>>
>> p := RTPolygon new
>>     vertices:{
>>         25 @ 00 .
>>         10 @ 50 .
>>         50 @ 20 }.
>>
>>
>> v add: (p elementOn: 1).
>> v open
>>
>> -=-=-=-=-=-=-=-=-=-=-=-=
>>
>> Apparently the instance variable "strokePaint" of TRShape class, would be
>> Nil when used by TRPolygonShape... But this variable seemed to be
>> initialized in color black earlier so... I don't know what's appenning.
>> If someone have a Idea...
>>
>> Thank you,
>>
>> PIerre
>>
>
>
> The color is set on the RTPolygon but it is overriden by the call to
> #updateFor:trachelShape:
> this sets the color based on the RTElement. But if no property is there
> for setting the border color,  it is just overriden with nil.
> RTBox does not have this problem, because the TRAbstractBoxShape draw
> method only draws the stroke
> if it is not nil.
>
>
> This has to be fixed in Roassal2, until then, just set the property
> manually
>
>
> v := RTView new.
>
> p := RTPolygon new borderColor: Color black;
>     vertices:{
>         25 @ 00 .
>         10 @ 50 .
>         50 @ 20 }.
>
>
> v add: (p elementOn: 1).
> v open
>
>
> nicolai
>
>

Reply via email to