Re: <kein Betreff>

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: <kein Betreff>

by Lyle Johnson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 17, 2009, at 6:02 AM, Helmut Hagemann wrote:

> Have a Probelm with @image.crop
>
> why the picture use not the new border by creat crop command?
>
> with width and height i see old values a used

I'm having trouble understanding exactly what is your question, but  
looking at your code, I think you may have misinterpreted the  
arguments for the FXImage#crop method. Here is the documentation:

        http://www.fxruby.org/doc/api/classes/Fox/FXImage.html

The first two arguments to crop() are the (x, y) coordinates for the  
top left corner of the crop rectangle, and the 3rd and 4th arguments  
are the width and height. In your code, you call crop() like this:

        @mywidth = 0.5*@...
        @myheight = 0.5*@...
        @image.crop(@mywidth, @myheight, @image.width, @image.height, FXRGBA
(236, 233, 215, 255))

So this says that it should start cropping in the middle of the  
(original) image, but the resulting image should have the same height  
and width as the original image. Can you maybe say what it is that you  
expected to see, or what is your desired end result?

Hope this helps,

Lyle


---
"FXRuby: Create Lean and Mean GUIs with Ruby"
Now available from the Pragmatic Bookshelf!
http://www.pragprog.com/titles/fxruby





_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users