On Fri, Apr 18, 2008 at 10:21 PM, Nathan <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 18, 2008 at 9:52 PM, Alex Holkner <[EMAIL PROTECTED]> wrote:
>> I can't reproduce the error from your description, can you provide a
>> complete test case?
>
> Will do. I may not be able to get to it until next Tuesday, though.
> It's time for bed and the weekends are not my own.
Okay, or maybe I'll do it a month from Tuesday. I got sidetracked
into other projects and a business trip, and now I'm back.
I decided to start with an example from scratch and build up from
there, and it appears that I must be misunderstanding something very
essential, as my very first attempt at using an IncrementalTextLayout
fails.
The example below should just start spitting lines scrolling up the
window very quickly. What am I doing wrong?
import pyglet
from pyglet import font
from pyglet import window
win = window.Window()
ft = font.load('Arial', 36)
incr_layout = pyglet.text.layout.IncrementalTextLayout(
pyglet.text.document.UnformattedDocument("initial text"),
dpi=72,
multiline=True,
width=400,
height=400)
incr_layout.x = 100
incr_layout.y = 100
def update():
incr_layout.begin_update()
incr_layout.document.insert_text(len(incr_layout.document.text),
"line of text")
incr_layout.end_update()
while not win.has_exit:
win.dispatch_events()
update()
win.clear()
incr_layout.draw()
win.flip()
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---