Custom Query (3922 matches)
Results (286 - 288 of 3922)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #2319 | Works For Me | _Singleton is not working at all | ||
| Description |
_Singleton doesn't return 0, if there are more than one instance of script. There is no difference for compiled or .au3 version. Example from help also don't work. Win 7 x64 Home Pro SP1 |
|||
| #1846 | Rejected | change _GdiPlus_GraphicsDraw/Fill* functions to corresponding floating point version | ||
| Description |
all _GdiPlus_GraphicsDraw/Fill functions use the integer version. to get smoother results it´s better to use the float versions of: GdipDrawArcI GdipDrawBezierI GdipDrawClosedCurveI GdipDrawCurveI GdipDrawEllipseI GdipDrawLineI GdipDrawPieI GdipDrawPolygonI GdipDrawRectangleI GdipFillClosedCurveI GdipFillEllipseI GdipFillPieI GdipFillPolygonI GdipFillRectangleI example: red line = int / green line = float #include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Global Const $Pi = ATan(1) * 4
Global Const $DegToRad = $Pi / 180
_GDIPlus_Startup()
Global $hGui = GUICreate("Test", 800, 600)
GUISetOnEvent($GUI_EVENT_CLOSE, "_EXIT")
Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
Global $hBmpBuffer = _GDIPlus_BitmapCreateFromGraphics(800, 600, $hGraphics)
Global $hGfxBuffer = _GDIPlus_ImageGetGraphicsContext($hBmpBuffer)
_GDIPlus_GraphicsSetSmoothingMode($hGfxBuffer, 2)
GUIRegisterMsg($WM_PAINT, "WM_PAINT")
GUISetState()
Global $hPenR = _GDIPlus_PenCreate(0xFFFF0000, 3)
Global $hPenG = _GDIPlus_PenCreate(0xFF00FF00, 3)
Global $nX, $nY
For $i = 0 To 800 Step 0.1
_GDIPlus_GraphicsClear($hGfxBuffer, 0xFF000000)
_GDIPlus_GraphicsDrawLine($hGfxBuffer, $i, 0, $i, 100, $hPenR)
_GDIPlus_GraphicsDrawLine_Float($hGfxBuffer, $i, 100, $i, 200, $hPenG)
$nX = Cos($i * $DegToRad) * 200
$nY = Sin($i * $DegToRad) * 200
_GDIPlus_GraphicsDrawLine($hGfxBuffer, 200, 400, 200 + $nX, 400 + $nY, $hPenR)
_GDIPlus_GraphicsDrawLine_Float($hGfxBuffer, 600, 400, 600 + $nX, 400 + $nY, $hPenG)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
Next
_Exit()
Func _GDIPlus_GraphicsDrawLine_Float($hGraphics, $nX1, $nY1, $nX2, $nY2, $hPen = 0)
__GDIPlus_PenDefCreate($hPen)
Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawLine", "handle", $hGraphics, "handle", $hPen, "float", $nX1, "float", $nY1, _
"float", $nX2, "float", $nY2)
Local $tmpError = @error, $tmpExtended = @extended
__GDIPlus_PenDefDispose()
If $tmpError Then Return SetError($tmpError, $tmpExtended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsDrawLine_Float
Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_PAINT
Func _Exit()
_GDIPlus_PenDispose($hPenR)
_GDIPlus_PenDispose($hPenG)
_GDIPlus_GraphicsDispose($hGfxBuffer)
_GDIPlus_BitmapDispose($hBmpBuffer)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Exit
I suggest to change the "int" functions to "float" and add the "int" in addition, named like this: _GDIPlus_GraphicsDrawLineI (...GDIp.au3 ;)) E |
|||
| #2840 | Fixed | Bug in _Sound.au3 | ||
| Description |
in every "set time format miliseconds" there is missing a "l" => milliseconds! So the format is never set to MS TestScript: (test only with .wav, because "time format bytes" dosn´t work with .mp3) #include <Sound.au3>
$aSnd = _SoundOpen(@ScriptDir & "\Test.wav")
$iDuration = _SoundLength($aSnd);correct because milliseconds is the standard format
ConsoleWrite("+ Duration: " & $iDuration & @CRLF)
__SoundMciSendString("set " & $aSnd[0] & " time format bytes")
$iDuration = _SoundLength($aSnd);returns bytes, because "set time format" fails inside this function
ConsoleWrite("! Duration: " & $iDuration & @CRLF)
__SoundMciSendString("set " & $aSnd[0] & " time format milliseconds")
$iDuration = _SoundLength($aSnd);correct again
ConsoleWrite("+ Duration: " & $iDuration & @CRLF)
E |
|||
