You Are Here:

Community: Developer Discussion Boards

#1 Old Question Writing text on the canvas - 2006-03-02, 16:11

Join Date: Jan 2006
Posts: 3
madmartygan
Offline
Registered User
Dear All,

I have the following problem: I display an image on the canvas in full screen. Then I have some points on the canvas that I am marking with a small square. Close by the square I want to "attach" a short text.
So far, I managed to draw the square but not the text.
Below I am attaching the part of the code that handles the drawing.
Any suggestion?
Thanks


Mauro

m_x, m_y are the point coordinates in the canvas system.
Code:
...
self.canvas.rectangle((m_x - 3,m_y - 3,m_x + 3,m_y + 3), fill=color)
self.canvas.text((m_x,m_y,m_x + 100,m_y + 12), unicode(m[6]), fill=color, font=u'LatinBold10')
...
Reply With Quote

#2 Old Re: Writing text on the canvas - 2006-03-03, 03:48

Join Date: Jan 2005
Posts: 148
Location: Bangkok, Thailand
Send a message via MSN to korakotc
korakotc's Avatar
korakotc
Offline
Regular Contributor
canvas.text require a position (x,y) not a box (x1,y1, x2,y2)
Try
Code:
self.canvas.text((m_x, m_y), ... )
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Persist text value of user defined option in Enumerated Text Settings List leethomso Symbian User Interface 0 2004-11-24 19:49
Major problem with delegation to Canvas bartekn Mobile Java Media (Graphics & Sounds) 8 2003-10-08 18:46
About entering a text in Canvas Screen Supraja Mobile Java Media (Graphics & Sounds) 2 2003-06-19 16:46
Display text on Canvas other than drawString sengaste Mobile Java General 1 2003-04-15 12:00
Read Chinese Text file and Display Chinese on Canvas Problem? goeast Mobile Java General 4 2002-09-18 04:28

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia