New topic: 

WebCanvas.Graphics.Drawpicture not working

<http://forums.realsoftware.com/viewtopic.php?t=46337>

         Page 1 of 1
   [ 6 posts ]                 Previous topic | Next topic          Author  
Message        alexvs          Post subject: WebCanvas.Graphics.Drawpicture not 
workingPosted: Mon Dec 24, 2012 8:06 am                         
Joined: Fri Feb 12, 2010 1:32 pm
Posts: 214
Location: Switzerland                Is it me doing something wrong or is this 
a bug? The following code does not paint anything in a WebCanvas...

dim p as new picture(50, 50, 32)

p.graphics.ForeColor = &c0013FF00
p.graphics.FillRect 0,0,p.Width,p.Height

g.DrawPicture p, 0, 0
   
                             Top                Thom McGrath          Post 
subject: Re: WebCanvas.Graphics.Drawpicture not workingPosted: Mon Dec 24, 2012 
8:14 am                       Site Admin                
Joined: Tue May 06, 2008 1:07 pm
Posts: 1310
Location: Greater Hartford Area, CT                That code is going to be 
much slower than necessary for absolutely no reason. Draw directly to "g", 
don't try to buffer it yourself.      
_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.  
                             Top                alexvs          Post subject: 
Re: WebCanvas.Graphics.Drawpicture not workingPosted: Mon Dec 24, 2012 8:17 am  
                       
Joined: Fri Feb 12, 2010 1:32 pm
Posts: 214
Location: Switzerland                This is just an example piece of code - I 
actually do the drawing in methods (called within the paint event) and then 
return a picture which I'd like to draw to the canvas.

Would you rather recommend to pass the graphics object (or portions of it) to 
these methods?   
                             Top                Thom McGrath          Post 
subject: Re: WebCanvas.Graphics.Drawpicture not workingPosted: Mon Dec 24, 2012 
8:34 am                       Site Admin                
Joined: Tue May 06, 2008 1:07 pm
Posts: 1310
Location: Greater Hartford Area, CT                Yes. When you use a picture, 
the framework must send a bitmap. When you draw direct to graphics, we send 
client-side drawing commands. It is way faster.      
_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.  
                             Top                alexvs          Post subject: 
Re: WebCanvas.Graphics.Drawpicture not workingPosted: Mon Dec 24, 2012 8:36 am  
                       
Joined: Fri Feb 12, 2010 1:32 pm
Posts: 214
Location: Switzerland                Okay, cool. There's no clip function atm 
for the WebCanvas. Any plans to implement that - or an easy way to do it 
myself?   
                             Top                Thom McGrath          Post 
subject: Re: WebCanvas.Graphics.Drawpicture not workingPosted: Mon Dec 24, 2012 
8:55 am                       Site Admin                
Joined: Tue May 06, 2008 1:07 pm
Posts: 1310
Location: Greater Hartford Area, CT                Honestly, not being the 
engineer behind it, I don't know. I know what we can support is limited 
entirely by what the browser canvas can support.      
_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 6 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to