P
Patrick Hurley
I have a screen with a logo on it, I would like the logo to scale with
screen size. I have tried more than a couple variations on:
# Construct an image
@logo =3D FXPNGImage.new(getApp(), File.open("logo.png", "rb").read,
IMAGE_KEEP)
# Prep an image Frame
image =3D FXImageFrame.new(self, @logo, LAYOUT_FILL_X | LAYOUT_FILL_Y)
image.backColor =3D FXColor::Blue
image.connect(SEL_CONFIGURE) do |sender, sel, evt|
if image.width > 100 && image.height > 100
@logo.scale(image.width, image.height)
end
end
This works, but the image "degrades" from all the scaling. How would I
go about keeping the original image? Any sort of "dup" on the FXImage
results in an exception (at least for me).
Thanks in advance
pth
screen size. I have tried more than a couple variations on:
# Construct an image
@logo =3D FXPNGImage.new(getApp(), File.open("logo.png", "rb").read,
IMAGE_KEEP)
# Prep an image Frame
image =3D FXImageFrame.new(self, @logo, LAYOUT_FILL_X | LAYOUT_FILL_Y)
image.backColor =3D FXColor::Blue
image.connect(SEL_CONFIGURE) do |sender, sel, evt|
if image.width > 100 && image.height > 100
@logo.scale(image.width, image.height)
end
end
This works, but the image "degrades" from all the scaling. How would I
go about keeping the original image? Any sort of "dup" on the FXImage
results in an exception (at least for me).
Thanks in advance
pth