×

Discussion Board

Results 1 to 4 of 4

Thread: Text Rotate

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    26

    Wink Text Rotate

    Hi, we could draw text on canvas with this code, canvas.text((0,0),u'text',font=('annotation',10)). You know, this text is drawn within a bounding box parallel with the axis. So i wonder if there is any method that i could call to rotate this text? Many thanks.
    Regards
    tao

  2. #2
    Registered User
    Join Date
    Dec 2008
    Posts
    35

    Re: Text Rotate

    The obvious solution is to draw a text to a separate image, rotate it with Image.transpose() function and then blit it to the canvas. Maybe there is a better one, though.

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    26

    Smile Re: Text Rotate

    Quote Originally Posted by uhm57 View Post
    The obvious solution is to draw a text to a separate image, rotate it with Image.transpose() function and then blit it to the canvas. Maybe there is a better one, though.
    Thanks for this reply, Unfortunately, according to my previous post, if you frequently blit image in the canvas, you will get an error "WSERV 10". you know, this problem is still not fixed, so maybe i could not use this solution. Anyway, I will try this solution. Another solution is to split the text into one-by-one character, then to label these characters along the rotated line.
    Regards
    tao

  4. #4
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Text Rotate

    In my opinion, the redraw event should be trigged by user as well instead only called from OS. When redrawing our screen, we can create a running condition if OS decides to redraw as well.

    My scape is to use double buffer technique, drawing on the mirror buffer and deserving to redraw event only a simple blit. A timer can trigger your mirror buffer update and the following code can rotate your message.

    Code:
    m=u"message"
    m += m
    s = len(m)/2
    for n in range(3):
        for i in range(s):
            print m[i:i+s]

    See you

Similar Threads

  1. how get the text from rich text editor in the dialog
    By manjunaths in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-12-01, 13:14
  2. Text color in Grid on S60 v3.1
    By ppiggy in forum Symbian
    Replies: 2
    Last Post: 2010-01-21, 03:24
  3. unable to understand list box event
    By kapnkore in forum Symbian
    Replies: 3
    Last Post: 2009-05-02, 17:56
  4. Enumerated text setting item
    By WaelA in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-11-17, 06:05
  5. CRichText text problem
    By introuble in forum Symbian User Interface
    Replies: 2
    Last Post: 2003-09-30, 17:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×