Custom Query
Results (280 - 282 of 3893)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #275 | Completed | Addition of _GDIPlus_GraphicsFillPolygon() to GDIPlus.au3 | Gary | smashly |
| Description |
#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GDIPlus.au3>
; #FUNCTION# ===================================================================================
; Name...........: _GDIPlus_GraphicsFillPolygon
; Description ...: Fill a polygon
; Syntax.........: _GDIPlus_GraphicsFillPolygon($hGraphics, $aPoints[, $hBrush = 0])
; Parameters ....: $hGraphics - Handle to a Graphics object
; $aPoints - Array that specify the vertices of the polygon:
; |[0][0] - Number of vertices
; |[1][0] - Vertice 1 X position
; |[1][1] - Vertice 1 Y position
; |[2][0] - Vertice 2 X position
; |[2][1] - Vertice 2 Y position
; |[n][0] - Vertice n X position
; |[n][1] - Vertice n Y position
; $hBrush - Handle to a brush object that is used to fill the polygon.
; - If $hBrush is 0, a solid black brush is used.
; Return values .: Success - True
; Failure - False
; Author ........:
; Modified.......: smashly
; Remarks .......:
; Related .......:
; Link ..........; @@MsdnLink@@ GdipFillPolygonI
; Example .......; Yes
; ===============================================================================================
Func _GDIPlus_GraphicsFillPolygon($hGraphics, $aPoints, $hBrush = 0)
Local $iI, $iCount, $pPoints, $tPoints, $aResult, $tmpError, $tmpExError
$iCount = $aPoints[0][0]
$tPoints = DllStructCreate("int[" & $iCount * 2 & "]")
$pPoints = DllStructGetPtr($tPoints)
For $iI = 1 To $iCount
DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
Next
_GDIPlus_BrushDefCreate($hBrush)
$aResult = DllCall($ghGDIPDll, "int", "GdipFillPolygonI", "hWnd", $hGraphics, "hWnd", $hBrush, _
"ptr", $pPoints, "int", $iCount, "int", "FillModeAlternate")
$tmpError = @error
$tmpExError = @extended
_GDIPlus_BrushDefDispose()
If $tmpError Then Return SetError($tmpError, $tmpExError, False)
Return SetError($aResult[0], 0, $aResult[0] = 0)
EndFunc ;==>_GDIPlus_GraphicsFillPolygon
Example attached |
|||
| #984 | Completed | Addition to @OSVersion | Valik | mark.carrell@… |
| Description |
Requesting a change made to the macro @OSType to support the distinction of Windows XP versus Windows XP Embedded. I have the following C code that makes the distinction as an example: // OS-or-CPU
// Standard values are
// Win95, Win98, Windows NT 5.0 (Win2K), Windows CE
OSVERSIONINFOEX osviex;
memset(&osviex, 0, sizeof(OSVERSIONINFOEX));
osviex.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
GetVersionEx((OSVERSIONINFO *) &osviex);
switch (osviex.dwPlatformId) {
case VER_PLATFORM_WIN32_WINDOWS:
// Windows 95 or 98. If minor version is 0 then Win95, else Win98.
if (osviex.dwMinorVersion == 0)
OS="Windows 95";
else
OS="Windows 98";
break;
case VER_PLATFORM_WIN32_NT:
// Windows NT (NT, 2K, XP)
OS="Windows NT";
if (osviex.wSuiteMask & VER_SUITE_EMBEDDEDNT)
embedded=TRUE;
break;
#ifdef UNDER_CE
case VER_PLATFORM_WIN32_CE:
OS="Windows CE";
break;
#endif
default:
// If we don't know the platform, indicate "generic" Windows.
OS="Windows";
}
strcpy (fullOS, OS);
if (embedded)
strcat(fullOS, " Embedded");
|
|||
| #1651 | Completed | Addition to _IsPressed page in Help file | Jpm | Melba23 |
| Description |
A few recent forum help requests have been the result of users not waiting for a key detected by _IsPressed to be released before continuing the script. This resulted in multiple actioning of the code for that event. Could I suggest that the following remark be added to the _IsPressed page in the Help file: Remarks: _IsPressed will return 1 until the key is released. Even brief key presses can result in multiple returns within a loop. If the code called does not include a blocking function (such as MsgBox) and the user does not require multiple returns, the script should wait until _IsPressed returns 0 before continuing. And then alter the example as follows: #include <Misc.au3>
$dll = DllOpen("user32.dll")
While 1
Sleep ( 250 )
If _IsPressed("24", $dll) Then
ConsoleWrite("_IsPressed - Home Key Pressed" & @CRLF)
; Wait until key is released
While _IsPressed("24", $dll)
Sleep( 250 )
WEnd
ElseIf _IsPressed("23", $dll) Then
MsgBox(0,"_IsPressed", "End Key Pressed")
ExitLoop
EndIf
WEnd
DllClose($dll)
M23 |
|||
