T
Thomas Leitner
Hy,
I try to scale an image in FXRuby. First I create the image with
icon = FXPNGIcon.new( getApp(), "image.png" )
icon.create
and then I do this
icon.scale( 100, 100 )
dc.drawIcon(icon, 0, 0)
This should draw the scaled icon on the specified DeviceContext,
however, the result is distorted.
What I try to accomplish:
- First load the png picture with transparent background
- Scale the picture depending on the current window size
- Draw the scaled image
Is there method like drawIcon( icon, x, y, width, height) available?
This would simply everything!
If not: Can anyone advise me on how to do this? I could not find a
solution...
Thomas
I try to scale an image in FXRuby. First I create the image with
icon = FXPNGIcon.new( getApp(), "image.png" )
icon.create
and then I do this
icon.scale( 100, 100 )
dc.drawIcon(icon, 0, 0)
This should draw the scaled icon on the specified DeviceContext,
however, the result is distorted.
What I try to accomplish:
- First load the png picture with transparent background
- Scale the picture depending on the current window size
- Draw the scaled image
Is there method like drawIcon( icon, x, y, width, height) available?
This would simply everything!
If not: Can anyone advise me on how to do this? I could not find a
solution...
Thomas