Phil Endecott wrote:
>>> I am slowly working through all the places where small changes will be 
>>> needed to work with my text rotation feature.
> 
> At present, the logical_rect returned by GetStringExtents can have 
> negative width (or height?) for non-left-to-right scripts.  Is this a 
> useful feature, or is it just how it worked out?
> 
> I have to decide whether a rotated (e.g. upside-down) font should 
> return a rectangle with negative dimensions in the same way, or not.
> 
> The easiest thing for me to do is to always return a "valid" rectangle 
> with positive height and width: I simply find the coordinates of the 
> four corners of the string and use min and max to get the bounding 
> box.  But this would change the current behaviour for right-to-left scripts.
> 
> Does anyone rely on the current behaviour of GetStringExtents?

Yes, it's important that you can do this:

1) DrawString( 10,10 )
2) GetStringExtents( &rect )
3) region = translate( rect, 10, 10 )
4) Flip( &region )

In this case ink_rect would be used, but logical_rect should not have a
different orientation or offset.

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to