| Mirage Source http://web.miragesource.net/forums/ |
|
| Another useful-ish function http://web.miragesource.net/forums/viewtopic.php?f=193&t=5376 |
Page 1 of 1 |
| Author: | GIAKEN [ Mon Apr 06, 2009 6:10 pm ] |
| Post subject: | Another useful-ish function |
This might be useful...not sure if it increases any speed (default sizes are 32x32 starting at 0,0 (useful for setting destination rects)) Code: Public Function Get_RECT(Optional ByVal TopVal As Long = 0, Optional ByVal LeftVal As Long = 0, Optional ByVal Width As Long = SIZE_X, Optional ByVal Height As Long = SIZE_Y) As DXVBLib.RECT With Get_RECT .Top = TopVal .Bottom = .Top + Height .Left = LeftVal .Right = .Left + Width End With End Function Used: Code: Public Sub SpellEditorBltIcon()
Dim sRECT As DXVBLib.RECT Dim dRECT As DXVBLib.RECT sRECT = Get_RECT(frmSpellEditor.scrlIcon.Value * SIZE_Y) dRECT = Get_RECT Engine_BltToDC DDS_SpellIcon, sRECT, dRECT, frmSpellEditor.picIcon End Sub |
|
| Author: | Anthony [ Mon Apr 06, 2009 6:54 pm ] |
| Post subject: | Re: Another useful-ish function |
Nice. I prefer this method far more as opposed to the other one. |
|
| Author: | GIAKEN [ Mon Apr 06, 2009 6:59 pm ] |
| Post subject: | Re: Another useful-ish function |
I've got my source fully converted to using this function and it works 100% |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|