2019-01-14 12:18 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
* contrib/gtwvg/wnd.prg
! Fixed: x,y,w,h values if aPos and aSize parameters were
containing negatve values.
* contrib/gtwvg/paint.prg
! Fixed to return proper color index if a compound color string
is supplied to wvt_GetRGBColorByString().
; Above patch provided by Jose Quintas - many thanks.
This commit is contained in:
@@ -7,6 +7,17 @@
|
||||
Entries may not always be in chronological/commit order.
|
||||
See license at the end of file. */
|
||||
|
||||
2019-01-14 12:18 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
|
||||
* contrib/gtwvg/wnd.prg
|
||||
! Fixed: x,y,w,h values if aPos and aSize parameters were
|
||||
containing negatve values.
|
||||
|
||||
* contrib/gtwvg/paint.prg
|
||||
! Fixed to return proper color index if a compound color string
|
||||
is supplied to wvt_GetRGBColorByString().
|
||||
|
||||
; Above patch provided by Jose Quintas - many thanks.
|
||||
|
||||
2019-01-11 13:52 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
|
||||
* contrib/gtwvg/wnd.prg
|
||||
* contrib/gtwvg/activex.prg
|
||||
|
||||
@@ -603,6 +603,9 @@ FUNCTION wvt_GetRGBColorByString( cColor, nForeBack )
|
||||
s := SubStr( cColor, 1, n - 1 )
|
||||
ELSE
|
||||
s := SubStr( cColor, n + 1 )
|
||||
IF "," $ s
|
||||
s := Substr( s, 1, At( ",", s ) - 1 )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ELSE
|
||||
s := cColor
|
||||
@@ -619,6 +622,8 @@ FUNCTION wvt_GetRGBColorByString( cColor, nForeBack )
|
||||
nIndex += 8
|
||||
ENDIF
|
||||
nIndex--
|
||||
ELSEIF Val( s ) > 0 .AND. Val( s ) < 16
|
||||
nIndex := Val( s )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Xbase++ Compatible xbpWindow Class
|
||||
*
|
||||
* Copyright 2008-2012 Pritpal Bedi <bedipritpal@hotmail.com>
|
||||
* Copyright 2008-2019 Pritpal Bedi <bedipritpal@hotmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1130,9 +1130,7 @@ METHOD WvgWindow:findObjectByHandle( hWnd )
|
||||
|
||||
METHOD WvgWindow:getPosAndSize( aPs, aSz )
|
||||
|
||||
LOCAL nX, nY, nW, nH, aXY
|
||||
LOCAL aPos, aSize
|
||||
LOCAL nFH, nFW
|
||||
LOCAL nX, nY, nW, nH, aPos, aSize, aFontInfo
|
||||
|
||||
__defaultNIL( @aPs, AClone( ::aPos ) )
|
||||
__defaultNIL( @aSz, AClone( ::aSize ) )
|
||||
@@ -1154,27 +1152,26 @@ METHOD WvgWindow:getPosAndSize( aPs, aSz )
|
||||
aSize[ 2 ] := Eval( aSize[ 2 ] )
|
||||
ENDIF
|
||||
|
||||
IF aPos[ 1 ] < 0 .AND. aPos[ 2 ] < 0 .AND. aSize[ 1 ] < 0 .AND. aSize[ 2 ] < 0
|
||||
nX := Abs( aPos[ 2 ] )
|
||||
IF nX < 1
|
||||
nX := 0
|
||||
IF aPos[ 1 ] < 0 .OR. aPos[ 2 ] < 0 .OR. aSize[ 1 ] < 0 .OR. aSize[ 2 ] < 0
|
||||
aFontInfo := wvt_GetFontInfo()
|
||||
|
||||
nX := aPos[ 2 ]
|
||||
IF nX < 0
|
||||
nX := Int( Abs( aPos[ 2 ] ) * aFontInfo[ 7 ] )
|
||||
ENDIF
|
||||
nY := Abs( aPos[ 1 ] )
|
||||
IF nY < 1
|
||||
nY := 0
|
||||
nY := aPos[ 1 ]
|
||||
IF nY < 0
|
||||
nY := Int( Abs( aPos[ 1 ] ) * aFontInfo[ 6 ] )
|
||||
ENDIF
|
||||
nW := Abs( aSize[ 2 ] )
|
||||
IF nW < 1
|
||||
nW := 0
|
||||
nW := aSize[ 2 ]
|
||||
IF nW < 0
|
||||
nW := Int( Abs( aSize[ 2 ] ) * aFontInfo[ 7 ] )
|
||||
ENDIF
|
||||
nH := Abs( aSize[ 1 ] )
|
||||
IF nH < 1
|
||||
nH := 0
|
||||
nH := aSize[ 1 ]
|
||||
IF nH < 0
|
||||
nH := Int( Abs( aSize[ 1 ] ) * aFontInfo[ 6 ] )
|
||||
ENDIF
|
||||
aXY := wvt_GetXYFromRowCol( nY, nX )
|
||||
nFH := wvt_GetFontInfo()[ 6 ]
|
||||
nFW := wvt_GetFontInfo()[ 7 ]
|
||||
RETURN { aXY[ 1 ], aXY[ 2 ], nW * nFW, nH * nFH }
|
||||
RETURN { nX, nY, nW, nH }
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user