FXRuby dynamic drawing canvas and off-screen image buffer resize

Discussion in 'Ruby' started by Ranieri Teixeira, Feb 7, 2008.

  1. 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
     
    Ranieri Teixeira, Feb 7, 2008
    #1
    1. Advertisements

  2. Ranieri Teixeira

    Lyle Johnson Guest

    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.
     
    Lyle Johnson, Feb 8, 2008
    #2
    1. Advertisements

  3. Ranieri Teixeira, Feb 9, 2008
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. parisnight

    FXRuby: Canvas and plotting

    parisnight, Jan 6, 2005, in forum: Ruby
    Replies:
    0
    Views:
    147
    parisnight
    Jan 6, 2005
  2. Einar Buffer
    Replies:
    4
    Views:
    202
    Joel VanderWerf
    Jan 22, 2005
  3. Replies:
    0
    Views:
    161
  4. Hank Gong
    Replies:
    1
    Views:
    129
    Joel VanderWerf
    Dec 10, 2006
  5. Lyle Johnson
    Replies:
    0
    Views:
    177
    Lyle Johnson
    May 20, 2008
Loading...

Share This Page