Custom Query (3927 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (421 - 423 of 3927)

Ticket Resolution Summary Owner Reporter
#422 Fixed _GDIPlus_GraphicsSetSmoothingMode Failure Gary WeaponX
Description

Calling _GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2) returns FALSE and sets @ERROR.

The function actually changes $iSmooth into the SmoothingMode enum value: http://msdn.microsoft.com/en-us/library/ms534173(VS.85).aspx

In the following test you can see the only values that perform smoothing are 2 and 4:

#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>

Const $GuiHeight = 200, $GuiWidth = 500
Global $CenterX = $GuiWidth / 2, $CenterY = $GuiHeight / 2

$hGUI = GUICreate("Anti-Aliasing", $GuiWidth, $GuiHeight)
GUISetState()

;Initialize GDI+
_GDIPlus_Startup()

$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)

;Create pen
$hPen = _GDIPlus_PenCreate(0xFF000000, 2,2)
_GDIPlus_PenSetAlignment($hPen,0)
_GDIPlus_PenSetWidth($hPen, 1)

$LastX = 0

#cs
typedef enum {
    SmoothingModeInvalid = QualityModeInvalid,
    SmoothingModeDefault = QualityModeDefault,
    SmoothingModeHighSpeed = QualityModeLow,
    SmoothingModeHighQuality = QualityModeHigh,
    SmoothingModeNone,
    SmoothingModeAntiAlias8x4,
    SmoothingModeAntiAlias = SmoothingModeAntiAlias8x4,
    SmoothingModeAntiAlias8x8
} SmoothingMode;
#ce

For $Z = 0 to 7
	$result = _GDIPlus_GraphicsSetSmoothingMode2($hGraphic, $Z)
	ConsoleWrite("@ERROR: " & @ERROR & " @EXTENDED: " & @EXTENDED & " RESULT: " & $result & @CRLF)
	For $X = 1 to 10
		_GDIPlus_GraphicsDrawLine($hGraphic, $LastX, 0, $LastX+20, $GuiHeight, $hPen)
		$LastX += 3
	Next
	$LastX += 3
	
	;Reset smoothing mode
	_GDIPlus_GraphicsSetSmoothingMode2($hGraphic, 0)
Next

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()

Func _GDIPlus_GraphicsSetSmoothingMode2($hGraphics, $iMode)
	Local $aResult

	$aResult = DllCall($ghGDIPDll, "int", "GdipSetSmoothingMode", "hwnd", $hGraphics, "int", $iMode)
	If @error Then Return SetError(@error, @extended, False)
	Return SetError($aResult[0], 0, $aResult[0] = 0)
EndFunc   ;==>_GDIPlus_GraphicsSetSmoothingMode
#423 Rejected samples Jos iceberg
Description

hi wondering if it is possible to include the SAMPLE features inside Scite Editors just like the one attached from VBSedit.

thanks.

#424 Duplicate _Dec64() Albuquerque
Description

I had a bit of frustration when trying to convert an IPv4 address to the format used by Microsoft SCCM's database table. To get to the crux of the issue, I needed to convert a full QWORD to an integer number. The problem is that anything over 0x7FFFFFFF piped into the Dec() function results in a negative number -- seems that the Dec() function assumes input will always be a DWORD.

So, I wrote a stupidly simple converter for my own needs, but thought I'd send this up the food chain to see if it's something you good folks would be interested in...

Further, I'll note that I went cruising through all the include functions and couldn't find one similar to what I needed. If there really is one in there, I apologize profusely for being redundant -- but could you point me to it?

Here's my stupidly simple AutoIT code (that obviously has none of the correct error checking for ubiquiteous use as-is, but I digress...)

Func _Dec64($hexValue)
    $intValue = 0
    For $i = StringLen($hexValue) to 1 Step -1
        $intBase = Dec(StringMid($hexValue,$i,1))
        $intExponent = 16 ^ (StringLen($hexValue) - $i)
        $intFinal = $intBase * $intExponent

        $intValue = $intValue + $intFinal
    Next
    Return $intValue
EndFunc ;; _Dec64()
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.