On 5/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> +    def get_subwidth(self, from_index, to_index):
> +        '''Return the width of a slice of this string.
> +
> +        Parameters as per GlyphString.get_subwidth(from_index, to_index)
> +        '''
> +        return self._glyph_string.get_subwidth(from_index, to_index)
>

I'm not particularly happy with this, BTW.

I'd actually like to see the glyph string "exposed", as I'm now writing code
like:

        # XXX yuck - search through glyph string to find index matching x
coord !!!
        x = [some X coordinate]
        for advance in self.label._glyph_string.cumulative_advance:
            # blah blah

I'd prefer that _ not be there - but I'm not convinced we need to add a
"findIndexOf" (or better-named ;) method to the Label class.


     Richard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to