So I think the answer to this is very simple: check out what happens in my example if you set the x, and y to 0.
Basically, the layout box's "(0, 0)" is its bottom left hand corner. However, the position 0 character is written in the top left hand corner. Indeed, changing x, and y change the position of the layout box within the window. On Friday, 26 August 2016 16:33:38 UTC-7, Brian Merchant wrote: > > Hi all, > > I see that the TextLayout classes (for displaying text documents), have x > and y position class variables. In the documentation ( > https://pythonhosted.org/pyglet/api/pyglet.text.layout.ScrollableTextLayout-class.html) > > they are simply described to be the x and y position of the layout. > > I made a simple example to play around with it: > https://pythonhosted.org/pyglet/api/pyglet.text.layout.ScrollableTextLayout-class.html > > I still don't understand exactly how it works. Does it place the layout > itself within the window? If yes, when my example is run, why is there a > non-zero y offset (that is, why is the text not snug to the top)? > > Also, is there a way to draw a box around the layout, so that I can see > its outline? > > Kind regards, > Brian > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
