[Bloc] stroke width and layout measure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bloc] stroke width and layout measure

Glenn Cavarlé
Hi,

The stroke width of an element's shape is not taken into account when the child elements are measured.
In fact, a child element that matches parent extent hides the left and top borders of its parent.
Will it mandatory to use a padding to fix that ? Or is it just part of the work that still to be done ?

Regards,
Glenn Cavarlé
Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] stroke width and layout measure

Aliaksei Syrel

I did not finish with shape yet.

For arbitrary path it is not possible in cairo to render stroke inside (really inside) of the shape and take stroke into account to render children. Such behavior to some extent can be simulated but it really complicates things. So I want to add in contract that it is responsibility of developer to take border into account.

cheers

On Feb 24, 2016 1:07 PM, "Glenn Cavarlé" <[hidden email]> wrote:
Hi,

The stroke width of an element's shape is not taken into account when the
child elements are measured.
In fact, a child element that matches parent extent hides the left and top
borders of its parent.
Will it mandatory to use a padding to fix that ? Or is it just part of the
work that still to be done ?

Regards,



-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Bloc-stroke-width-and-layout-measure-tp4880292.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] stroke width and layout measure

Nicolai Hess-3-2


2016-02-25 13:30 GMT+01:00 Aliaksei Syrel <[hidden email]>:

I did not finish with shape yet.

For arbitrary path it is not possible in cairo to render stroke inside (really inside) of the shape and take stroke into account to render children. Such behavior to some extent can be simulated but it really complicates things. So I want to add in contract that it is responsibility of developer to take border into account.


I don't know if this is currently accessible from athens api, but couldn't this be done with

cairo_stroke_extents ?


 

cheers

On Feb 24, 2016 1:07 PM, "Glenn Cavarlé" <[hidden email]> wrote:
Hi,

The stroke width of an element's shape is not taken into account when the
child elements are measured.
In fact, a child element that matches parent extent hides the left and top
borders of its parent.
Will it mandatory to use a padding to fix that ? Or is it just part of the
work that still to be done ?

Regards,



-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Bloc-stroke-width-and-layout-measure-tp4880292.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] stroke width and layout measure

Aliaksei Syrel

no

On Feb 25, 2016 1:48 PM, "Nicolai Hess" <[hidden email]> wrote:


2016-02-25 13:30 GMT+01:00 Aliaksei Syrel <[hidden email]>:

I did not finish with shape yet.

For arbitrary path it is not possible in cairo to render stroke inside (really inside) of the shape and take stroke into account to render children. Such behavior to some extent can be simulated but it really complicates things. So I want to add in contract that it is responsibility of developer to take border into account.


I don't know if this is currently accessible from athens api, but couldn't this be done with

cairo_stroke_extents ?


 

cheers

On Feb 24, 2016 1:07 PM, "Glenn Cavarlé" <[hidden email]> wrote:
Hi,

The stroke width of an element's shape is not taken into account when the
child elements are measured.
In fact, a child element that matches parent extent hides the left and top
borders of its parent.
Will it mandatory to use a padding to fix that ? Or is it just part of the
work that still to be done ?

Regards,



-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Bloc-stroke-width-and-layout-measure-tp4880292.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.