It is currently Sun May 28, 2017 3:35 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Please help gr.text.bold
Unread postPosted: Sat Feb 25, 2017 4:21 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 124
Plesae help!

Code:
gr.text.bold 1,1
!......
GR.MODIFY tab+wi2[sz[m],j]-1,"text","x"+int$(win[wi2[m,j]])
gr.render
!.......


This result: Not bolded text.
Please help to me. (how to modify to "bold")?
Thank you.

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Report this post
Top
 Profile  
 
 Post subject: Re: Please help gr.text.bold
Unread postPosted: Sat Feb 25, 2017 6:30 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1336
Hi QBfan
I think you need to first draw your text in bold, then when you modify it, it will be bold.


Report this post
Top
 Profile  
 
 Post subject: Re: Please help gr.text.bold
Unread postPosted: Sat Feb 25, 2017 7:58 am 
Offline

Joined: Sat May 14, 2011 7:43 am
Posts: 357
Location: South Africa, UK & US (Florida)
Modifying "text" only affects the actual text, not its properties.
Bold is a part of the paint associated with the graphical object.
To embolden text in an existing object you must modify its paint then re-render. See Text Commands Overview (et seq) Manual page 162.

Peter


Report this post
Top
 Profile  
 
 Post subject: Re: Please help gr.text.bold
Unread postPosted: Sat Feb 25, 2017 8:21 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1336
This is the was I was meaning QBfan

Code:
Rem Boil text

di_height = 1150
di_width = 672

gr.open 255, 0, 0, 0
gr.text.size 80
gr.orientation 1
pause 500
WakeLock 3

gr.screen screenWidth, screenHeight
scale_x = screenWidth / di_width
scale_y = screenHeight / di_height
gr.scale scale_x, scale_y

gr.color 255, 255,0 ,0
gr.text.align 2

gr.text.draw notBold, di_width / 2, 0, ""

gr.text.bold 1

gr.text.draw meBold, di_width / 2, 0, ""

gr.text.bold 0

gr.modify notBold, "y", 100, "text", "Red but not Bold"

gr.modify meBold, "y", 200, "text", "Red and Bold"

gr.render

do : pause 1 : until 0


Attachment:
RedBold.PNG
RedBold.PNG [ 50.25 KiB | Viewed 243 times ]


Regards Roy


Report this post
Top
 Profile  
 
 Post subject: Re: Please help gr.text.bold
Unread postPosted: Sat Feb 25, 2017 8:30 am 
Offline

Joined: Sat May 14, 2011 7:43 am
Posts: 357
Location: South Africa, UK & US (Florida)
Roy's example is excellent, but you do not need to create a new paint object for the emboldened version,you can modify the existing one...
Code:

REM Start of BASIC! Program
Gr.open 255,255,255,255,0,1
Gr.screen w, h
Gr.color 255,0,0,0
Gr.text.size h/10
Gr.paint.get p1
Gr.text.draw z, w/2,h/2,"xyz"
Loop:
Gr.render
Pause 1000
Gr.text.bold 1,p1
Gr.render
Pause 1000
Gr.text.bold 0,p1
Goto loop
Ongrtouch:
End


Peter


Report this post
Top
 Profile  
 
 Post subject: Re: Please help gr.text.bold
Unread postPosted: Sat Feb 25, 2017 8:47 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1336
Nice; thanks for that Peter


Report this post
Top
 Profile  
 
 Post subject: Re: Please help gr.text.bold
Unread postPosted: Mon Feb 27, 2017 12:56 am 
Offline
User avatar

Joined: Tue Nov 04, 2014 7:12 am
Posts: 124
Thanks to everybody!

_________________
"Unfortunately I only BASIC to understand. Everything else I need strong help..." :P


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: aFox and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred