Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Dec 2014, 20:50
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
BaCon canvas confusion [Solved]
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
PaulR

Joined: 04 May 2005
Posts: 248
Location: UK

PostPosted: Thu 11 Apr 2013, 16:28    Post_subject:  BaCon canvas confusion [Solved]  

Why does this code produce the result in the screenshot when I expect the canvas to have a 10 pixel 'margin'? I've tried various canvas/window sizes but the results are always similar and using DRAW canv doesn't seem to work. I've also varied the dpi setting in .Xresources just in case!

Code:

INCLUDE "/usr/share/BaCon/hug.bac"
INIT

SUB testsub

   SQUARE ("#800000", 0, 0, 40, 40, 1)

END SUB

appWindow = WINDOW("Test", 320, 240)
canv=CANVAS(300, 220)
ATTACH(appWindow, canv, 10, 10)
CALLBACK(canv, testsub)
DISPLAY
canvas.png
 Description   
 Filesize   1.66 KB
 Viewed   124 Time(s)

canvas.png


Edited_time_total
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Thu 11 Apr 2013, 17:13    Post_subject:  

Dear Paul,

Add

Code:
HUGOPTIONS("NOSCALING")


after INIT.
noscaling.png
 Description   
 Filesize   3.85 KB
 Viewed   106 Time(s)

noscaling.png

Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 248
Location: UK

PostPosted: Fri 12 Apr 2013, 03:29    Post_subject:  

Scaling! Grrrrrr!

Very Happy

Thanks vovchick
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0407s ][ Queries: 12 (0.0055s) ][ GZIP on ]