• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: boundingRectForGlyphRange is very inaccurate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: boundingRectForGlyphRange is very inaccurate


  • Subject: Re: boundingRectForGlyphRange is very inaccurate
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 08 Mar 2017 13:42:25 +0700

> On 8 Mar 2017, at 06:37, Ken Thomases <email@hidden> wrote:
>
> On Mar 7, 2017, at 4:17 AM, Gerriet M. Denkmann <email@hidden> wrote:
>>
>> On 6 Mar 2017, at 23:26, Ken Thomases <email@hidden> wrote:
>>>
>>> Try using -enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:.  In particular, if you want rectangles which match how selection looks, pass a valid range for selectedRange.
>>
>> Does return the same results as boundingRectForGlyphRange.
>
> It may for some specific test cases, but it’s specifically documented that it doesn't in the general case.

Further test revealed: you were right (and so is enumerateEnclosingRectsForGlyphRange within 1e-12 pixels).

Both boundingRectForGlyphRange and enumerateEnclosingRectsForGlyphRange are right in the case of lines just containing Ascii chars.

But for more general cases (e.g. lines containing Thai chars) boundingRectForGlyphRange is wrong and enumerateEnclosingRectsForGlyphRange is still right.

Sorry for my flawed initial tests. And thanks a lot for your help!

Kind regards,

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: boundingRectForGlyphRange is very inaccurate
      • From: Ken Thomases <email@hidden>
References: 
 >boundingRectForGlyphRange is very inaccurate (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: boundingRectForGlyphRange is very inaccurate (From: Ken Thomases <email@hidden>)
 >Re: boundingRectForGlyphRange is very inaccurate (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: boundingRectForGlyphRange is very inaccurate (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: boundingRectForGlyphRange is very inaccurate
  • Next by Date: Re: boundingRectForGlyphRange is very inaccurate
  • Previous by thread: Re: boundingRectForGlyphRange is very inaccurate
  • Next by thread: Re: boundingRectForGlyphRange is very inaccurate
  • Index(es):
    • Date
    • Thread