Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > FXRuby dynamic drawing canvas and off-screen image buffer resize

Reply
Thread Tools

FXRuby dynamic drawing canvas and off-screen image buffer resize

 
 
Ranieri Teixeira
Guest
Posts: n/a
 
      02-07-2008
How can I use the drawing canvas and its off-screen image buffer, say
FXImage, to dynamically resize or have its width and height attributes
changed in reply to user interaction with the main window (FXMainWindow)?

It seems that whem I put initial values to W and H of the canvas or FXImage=
,
they remain with its initial values no matter what I do whem resizing the
main window.

I have to reset its values for each resize, but how?

--=20
Ranieri Barros Teixeira
Ci=EAncia da Computa=E7=E3o - Faculdade de Computa=E7=E3o - Universidade F=
ederal do
Par=E1 (UFPA)
http://rubyxchart.rubyforge.org
http://rubytags.blogspot.com

 
Reply With Quote
 
 
 
 
Lyle Johnson
Guest
Posts: n/a
 
      02-08-2008

On Feb 7, 2008, at 5:31 PM, Ranieri Teixeira wrote:

> How can I use the drawing canvas and its off-screen image buffer, say
> FXImage, to dynamically resize or have its width and height attributes
> changed in reply to user interaction with the main window
> (FXMainWindow)?
>
> It seems that whem I put initial values to W and H of the canvas or
> FXImage,
> they remain with its initial values no matter what I do whem
> resizing the
> main window.
>
> I have to reset its values for each resize, but how?


If you want the image to be the same size as the canvas that you're
drawing it into, you need to call resize() on the image whenever the
canvas size changes.

 
Reply With Quote
 
 
 
 
Ranieri Teixeira
Guest
Posts: n/a
 
      02-09-2008
Thanks, Lyle
A class to resize(w, h) on image works fine.
I'm very happy with your help.

--=20
Ranieri Barros Teixeira
Ci=EAncia da Computa=E7=E3o - Faculdade de Computa=E7=E3o - Universidade F=
ederal do
Par=E1 (UFPA)
http://rubyxchart.rubyforge.org
http://rubytags.blogspot.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] At InfoQ: Interview about FXRuby, plus an exclusive chapterfrom the FXRuby Book Lyle Johnson Ruby 0 05-20-2008 02:32 PM
fxRuby- text on canvas and fonts generating errors boxofsoxx-goognews@yahoo.com Ruby 0 11-25-2005 08:40 PM
Is It Really Better to Resize Image and Canvas Before Printing??????? Digital Photography 2 08-18-2005 10:15 AM
[Newbie] Use FXRuby to move an image on a canvas? Einar Buffer Ruby 4 01-22-2005 08:09 PM
FXRuby: Canvas and plotting parisnight Ruby 0 01-06-2005 11:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57