Estoy tratando de desplegar en un DrawingArea una parte de una Imagen, pero no lo logro............. ya lei la documentación ( http://gambasdoc.org/help/comp/gb.qt4/draw/image?v3 ) pero lo que hace es escalar toda la imagen.
El código con el que estoy probando es el sig, y la imagen es http://commondatastorage.googleapis...cards.jfitz.png
' gambas class file
Private img_cards As Image
Public Sub _new()
img_cards = Image.Load("data/cards.png")
End
Public Sub DrawingArea1_Draw()
Dim i, j As Integer
Dim x, y As Integer
i = 1
j = 1
x = img_cards.W / 13
y = img_cards.H / 4
Draw.Image(img_cards, 50, 50, x, y, i * x, j * y, x, y)
' size card: 73x98
' size img: 949x392
' imgs: 13x4
End
Private img_cards As Image
Public Sub _new()
img_cards = Image.Load("data/cards.png")
End
Public Sub DrawingArea1_Draw()
Dim i, j As Integer
Dim x, y As Integer
i = 1
j = 1
x = img_cards.W / 13
y = img_cards.H / 4
Draw.Image(img_cards, 50, 50, x, y, i * x, j * y, x, y)
' size card: 73x98
' size img: 949x392
' imgs: 13x4
End
Estoy usando gambas 3.4.1, he intentado con gb.gtk y gb.qt4
[System]
OperatingSystem=Linux
Kernel=3.2.0-48-generic-pae
Architecture=x86
Distribution=Ubuntu 12.04.2 LTS
Desktop=GNOME
Theme=QGtk
Language=en_US.UTF-8
Memory=988M
[Libraries]
GStreamer=libgstreamer-0.10.so.0.30.0
GTK+=libgtk-x11-2.0.so.0.2400.10
Poppler=libpoppler.so.19.0.0
Qt4=libQtCore.so.4.8.1
SDL=libSDL-1.2.so.0.11.3
Espero alguien me pueda dar un norte de como usar Draw.Image()
Gracias y Saludos.