Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas class file
- Private img_cards As Image = Image.Load("barajaespanola.png")
- Private CARD_S_W As Integer = img_cards.W / 10 'numero de columnas
- Private CARD_S_H As Integer = img_cards.H / 4 'numero de filas
- Public Sub SpinBoxColumna_Change()
- DrawingArea1.Refresh() 'se ha producido un cambio en el spin, y refrescamos el drawingArea, y asi se redibuja
- End
- Public Sub SpinBoxFila_Change()
- DrawingArea1.Refresh() 'se ha producido un cambio en el spin, y refrescamos el drawingArea, y asi se redibuja
- End
- Public Sub DrawingArea1_Draw()
- dibujaCarta(SpinBoxColumna.value, SpinBoxFila.Value)
- End
- Public Sub dibujaCarta(x As Integer, y As Integer)
- Paint.DrawImage(img_cards, 0, 0, CARD_S_W, CARD_S_H, 1, Rect((X - 1) * CARD_S_W, (Y - 1) * CARD_S_H, CARD_S_W, CARD_S_H))
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement