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 Fri 24 Oct 2014, 06:00
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 [3 Posts]  
Author Message
PaulR

Joined: 04 May 2005
Posts: 246
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   120 Time(s)

canvas.png


Last edited by PaulR on Fri 12 Apr 2013, 03:29; edited 1 time in total
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
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   104 Time(s)

noscaling.png

Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 246
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 from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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