Page 1 of 1

GDI+ dll definition

Posted: Fri Sep 10, 2004 12:24 am
by Justin
this is the code i used to parse the msdn docs

Code: Select all

;gdipmaker.pb

crlf.s = Chr(13) + Chr(10)

group.s = ""

doc.s = GetClipboardText() 

outfile$ = "gdiplus.pbl"

hfile = OpenFile(#PB_Any, outfile$)
If hfile = 0 : End : EndIf 

FileSeek(Lof()) 
WriteStringN(";" + group)

NewList ErrorList.l()

line$ = ""
start = 1
lineCount = 1
funcCount = 0
found.b = 0
Repeat 
	p = FindString(doc, crlf, start) 
	If p=0 : break : EndIf
	
	line$ = Mid(doc, start, p-start) 

	If Left(line$, Len("GpStatus WINGDIPAPI"))="GpStatus WINGDIPAPI" 
		line$ = Trim(Right(line$, Len(line$)-Len("GpStatus WINGDIPAPI"))) ;remove GpStatus WINGDIPAPI
		found =1
	ElseIf Left(line$, Len("Status __stdcall"))="Status __stdcall"	
		line$ = Trim(Right(line$, Len(line$)-Len("Status __stdcall"))) ;remove Status __stdcall
		found = 1
	ElseIf Left(line$, Len("UINT WINGDIPAPI"))="UINT WINGDIPAPI"	
		line$ = Trim(Right(line$, Len(line$)-Len("UINT WINGDIPAPI"))) ;remove UINT WINGDIPAPI 
		found = 1 
	ElseIf Left(line$, Len("HPALETTE WINGDIPAPI"))="HPALETTE WINGDIPAPI"	
		line$ = Trim(Right(line$, Len(line$)-Len("HPALETTE WINGDIPAPI"))) ;remove HPALETTE WINGDIPAPI 
		found = 1 
	ElseIf Left(line$, Len("VOID WINGDIPAPI"))="VOID WINGDIPAPI"	
		line$ = Trim(Right(line$, Len(line$)-Len("VOID WINGDIPAPI"))) ;remove VOID WINGDIPAPI
		found = 1 
	EndIf 
 
	If found
		;Debug line$
		p1 = FindString(line$, "(", 1)
		If p1<>0
			p2 = FindString(line$, ")", p1 + 1)
			If p2<>0 ;OK
				funcName$ = Left(line$, p1-1)
				line$ = Mid(line$, p1+1, p2-p1-1) ;inside ()
				nParams = countstring(line$, ",") + 1
				WriteStringN(funcName$ + " " + Str(nParams))
				funcCount + 1
			Else ;error
				AddElement(ErrorList()) : ErrorList() = lineCount
			EndIf 			
		Else ;error
			AddElement(ErrorList()) : ErrorList() = lineCount
		EndIf
	EndIf 
	
	start = p + Len(crlf)
	lineCount + 1
	found = 0
Until p=0 

Debug "Functions " + Str(funcCount)
Debug "Errors " + Str(CountList(ErrorList()))

CloseFile(hfile)
follows the result..

Posted: Fri Sep 10, 2004 12:26 am
by Justin
it may be usefull to someone.

Code: Select all

gdiplus.dll
;General
GdiplusShutdown 1
GdiplusStartup 3
GdipGetImageDecoders 3
GdipGetImageDecodersSize 2
GdipGetImageEncoders 3
GdipGetImageEncodersSize 2
GdipGetPixelFormatSize 1
GdipIsAlphaPixelFormat 1
GdipIsCanonicalPixelFormat 1
GdipIsExtendedPixelFormat 1
GdipIsIndexedPixelFormat 1
GdipObjectTypeIsValid 1
;AdjustableArrowCap
GdipCreateAdjustableArrowCap 4
GdipSetAdjustableArrowCapHeight 2
GdipGetAdjustableArrowCapHeight 2
GdipSetAdjustableArrowCapWidth 2
GdipGetAdjustableArrowCapWidth 2
GdipSetAdjustableArrowCapMiddleInset 2
GdipGetAdjustableArrowCapMiddleInset 2
GdipSetAdjustableArrowCapFillState 2
GdipGetAdjustableArrowCapFillState 2
;Bitmap
GdipCreateBitmapFromStream 2
GdipCreateBitmapFromFile 2
GdipCreateBitmapFromStreamICM 2
GdipCreateBitmapFromFileICM 2
GdipCreateBitmapFromScan0 6
GdipCreateBitmapFromGraphics 4
GdipCreateBitmapFromDirectDrawSurface 2
GdipCreateBitmapFromGdiDib 3
GdipCreateBitmapFromHBITMAP 3
GdipCreateHBITMAPFromBitmap 3
GdipCreateBitmapFromHICON 2
GdipCreateHICONFromBitmap 2
GdipCreateBitmapFromResource 3
GdipCloneBitmapArea 7
GdipCloneBitmapAreaI 7
GdipBitmapLockBits 5
GdipBitmapUnlockBits 2
GdipBitmapGetPixel 4
GdipBitmapSetPixel 4
GdipBitmapSetResolution 3
GdipBitmapConvertFormat 6
GdipInitializePalette 5
GdipBitmapApplyEffect 6
GdipBitmapCreateApplyEffect 9
GdipBitmapGetHistogram 7
GdipBitmapGetHistogramSize 2
GdipCreateEffect 2
GdipDeleteEffect 1
GdipGetEffectParameterSize 2
GdipSetEffectParameters 3
GdipGetEffectParameters 3
GdipTestControl 2
;Brush
GdipCloneBrush 2
GdipDeleteBrush 1
GdipGetBrushType 2
;CachedBitmap
GdipCreateCachedBitmap 3
GdipDeleteCachedBitmap 1
GdipDrawCachedBitmap 4
GdipEmfToWmfBits 5
;CustomLineCap
GdipCreateCustomLineCap 5
GdipDeleteCustomLineCap 1
GdipCloneCustomLineCap 2
GdipGetCustomLineCapType 2
GdipSetCustomLineCapStrokeCaps 3
GdipGetCustomLineCapStrokeCaps 3
GdipSetCustomLineCapStrokeJoin 2
GdipGetCustomLineCapStrokeJoin 2
GdipSetCustomLineCapBaseCap 2
GdipGetCustomLineCapBaseCap 2
GdipSetCustomLineCapBaseInset 2
GdipGetCustomLineCapBaseInset 2
GdipSetCustomLineCapWidthScale 2
GdipGetCustomLineCapWidthScale 2
;Font
GdipCreateFontFromDC 2
GdipCreateFontFromLogfontA 3
GdipCreateFontFromLogfontW 3
GdipCreateFont 5
GdipCloneFont 2
GdipDeleteFont 1
GdipGetFamily 2
GdipGetFontStyle 2
GdipGetFontSize 2
GdipGetFontUnit 2
GdipGetFontHeight 3
GdipGetFontHeightGivenDPI 3
GdipGetLogFontA 3
GdipGetLogFontW 3
GdipNewInstalledFontCollection 1
GdipNewPrivateFontCollection 1
GdipDeletePrivateFontCollection 1
GdipGetFontCollectionFamilyCount 2
GdipGetFontCollectionFamilyList 4
GdipPrivateAddFontFile 2
GdipPrivateAddMemoryFont 3
;FontFamily
GdipCreateFontFamilyFromName 3
GdipDeleteFontFamily 1
GdipCloneFontFamily 2
GdipGetGenericFontFamilySansSerif 1
GdipGetGenericFontFamilySerif 1
GdipGetGenericFontFamilyMonospace 1
GdipGetFamilyName 3
GdipIsStyleAvailable 3
GdipFontCollectionEnumerable 3
GdipFontCollectionEnumerate 5
GdipGetEmHeight 3
GdipGetCellAscent 3
GdipGetCellDescent 3
GdipGetLineSpacing 3
;Graphics
GdipFlush 2
GdipCreateFromHDC 2
GdipCreateFromHDC2 3
GdipCreateFromHWND 2
GdipCreateFromHWNDICM 2
GdipDeleteGraphics 1
GdipGetDC 2
GdipReleaseDC 2
GdipSetCompositingMode 2
GdipGetCompositingMode 2
GdipSetRenderingOrigin 3
GdipGetRenderingOrigin 3
GdipSetCompositingQuality 2
GdipGetCompositingQuality 2
GdipSetSmoothingMode 2
GdipGetSmoothingMode 2
GdipSetPixelOffsetMode 2
GdipGetPixelOffsetMode 2
GdipSetTextRenderingHint 2
GdipGetTextRenderingHint 2
GdipSetTextContrast 2
GdipGetTextContrast 2
GdipSetInterpolationMode 2
GdipGraphicsSetAbort 2
GdipGetInterpolationMode 2
GdipSetWorldTransform 2
GdipResetWorldTransform 1
GdipMultiplyWorldTransform 3
GdipTranslateWorldTransform 4
GdipScaleWorldTransform 4
GdipRotateWorldTransform 3
GdipGetWorldTransform 2
GdipResetPageTransform 1
GdipGetPageUnit 2
GdipGetPageScale 2
GdipSetPageUnit 2
GdipSetPageScale 2
GdipGetDpiX 2
GdipGetDpiY 2
GdipTransformPoints 5
GdipTransformPointsI 5
GdipGetNearestColor 2
GdipCreateHalftonePalette 1
GdipDrawLine 6
GdipDrawLineI 6
GdipDrawLines 4
GdipDrawLinesI 4
GdipDrawArc 8
GdipDrawArcI 8
GdipDrawBezier 10
GdipDrawBezierI 10
GdipDrawBeziers 4
GdipDrawBeziersI 4
GdipDrawRectangle 6
GdipDrawRectangleI 6
GdipDrawRectangles 4
GdipDrawRectanglesI 4
GdipDrawEllipse 6
GdipDrawEllipseI 6
GdipDrawPie 8
GdipDrawPieI 8
GdipDrawPolygon 4
GdipDrawPolygonI 4
GdipDrawPath 3
GdipDrawCurve 4
GdipDrawCurveI 4
GdipDrawCurve2 5
GdipDrawCurve2I 5
GdipDrawCurve3 7
GdipDrawCurve3I 7
GdipDrawClosedCurve 4
GdipDrawClosedCurveI 4
GdipDrawClosedCurve2 5
GdipDrawClosedCurve2I 5
GdipGraphicsClear 2
GdipFillRectangle 6
GdipFillRectangleI 6
GdipFillRectangles 4
GdipFillRectanglesI 4
GdipFillPolygon 5
GdipFillPolygonI 5
GdipFillPolygon2 4
GdipFillPolygon2I 4
GdipFillEllipse 6
GdipFillEllipseI 6
GdipFillPie 8
GdipFillPieI 8
GdipFillPath 3
GdipFillClosedCurve 4
GdipFillClosedCurveI 4
GdipFillClosedCurve2 6
GdipFillClosedCurve2I 6
GdipFillRegion 3
GdipDrawImage 4
GdipDrawImageI 4
GdipDrawImageRect 6
GdipDrawImageRectI 6
GdipDrawImagePoints 4
GdipDrawImagePointsI 4
GdipDrawImagePointRect 9
GdipDrawImagePointRectI 9
GdipDrawImageRectRect 14
GdipDrawImageRectRectI 14
GdipDrawImagePointsRect 12
GdipDrawImagePointsRectI 12
GdipDrawImageFX 7
GdipEnumerateMetafileDestPoint 6
GdipEnumerateMetafileDestPointI 6
GdipEnumerateMetafileDestRect 6
GdipEnumerateMetafileDestRectI 6
GdipEnumerateMetafileDestPoints 7
GdipEnumerateMetafileDestPointsI 7
GdipEnumerateMetafileSrcRectDestPoint 8
GdipEnumerateMetafileSrcRectDestPointI 8
GdipEnumerateMetafileSrcRectDestRect 8
GdipEnumerateMetafileSrcRectDestRectI 8
GdipEnumerateMetafileSrcRectDestPoints 9
GdipEnumerateMetafileSrcRectDestPointsI 9
GdipPlayMetafileRecord 5
GdipSetClipGraphics 3
GdipSetClipRect 6
GdipSetClipRectI 6
GdipSetClipPath 3
GdipSetClipRegion 3
GdipSetClipHrgn 3
GdipResetClip 1
GdipTranslateClip 3
GdipTranslateClipI 3
GdipGetClip 2
GdipGetClipBounds 2
GdipGetClipBoundsI 2
GdipIsClipEmpty 2
GdipGetVisibleClipBounds 2
GdipGetVisibleClipBoundsI 2
GdipIsVisibleClipEmpty 2
GdipIsVisiblePoint 4
GdipIsVisiblePointI 4
GdipIsVisibleRect 6
GdipIsVisibleRectI 6
GdipSaveGraphics 2
GdipRestoreGraphics 2
GdipBeginContainer 5
GdipBeginContainerI 5
GdipBeginContainer2 2
GdipEndContainer 2
GdipGetMetafileHeaderFromEmf 2
GdipGetMetafileHeaderFromFile 2
GdipGetMetafileHeaderFromStream 2
GdipGetMetafileHeaderFromMetafile 2
GdipGetHemfFromMetafile 2
GdipCreateStreamOnFile 3
GdipCreateMetafileFromWmf 4
GdipCreateMetafileFromEmf 3
GdipCreateMetafileFromFile 2
GdipCreateMetafileFromWmfFile 3
GdipCreateMetafileFromStream 2
GdipRecordMetafile 6
GdipRecordMetafileI 6
GdipRecordMetafileFileName 7
GdipRecordMetafileFileNameI 7
GdipRecordMetafileStream 7
GdipRecordMetafileStreamI 7
GdipSetMetafileDownLevelRasterizationLimit 2
GdipGetMetafileDownLevelRasterizationLimit 2
GdipGetImageDecodersSize 2
GdipGetImageDecoders 3
GdipGetImageEncodersSize 2
GdipGetImageEncoders 3
GdipComment 3
;GraphicsPath
GdipCreatePath 2
GdipCreatePath2 5
GdipCreatePath2I 5
GdipClonePath 2
GdipDeletePath 1
GdipResetPath 1
GdipGetPointCount 2
GdipGetPathTypes 3
GdipGetPathPoints 3
GdipGetPathPointsI 3
GdipGetPathFillMode 2
GdipSetPathFillMode 2
GdipGetPathData 2
GdipStartPathFigure 1
GdipClosePathFigure 1
GdipClosePathFigures 1
GdipSetPathMarker 1
GdipClearPathMarkers 1
GdipReversePath 1
GdipGetPathLastPoint 2
GdipAddPathLine 5
GdipAddPathLine2 3
GdipAddPathArc 7
GdipAddPathBezier 9
GdipAddPathBeziers 3
GdipAddPathCurve 3
GdipAddPathCurve2 4
GdipAddPathCurve3 6
GdipAddPathClosedCurve 3
GdipAddPathClosedCurve2 4
GdipAddPathRectangle 5
GdipAddPathRectangles 3
GdipAddPathEllipse 5
GdipAddPathPie 7
GdipAddPathPolygon 3
GdipAddPathPath 3
GdipAddPathString 8
GdipAddPathStringI 8
GdipAddPathLineI 5
GdipAddPathLine2I 3
GdipAddPathArcI 7
GdipAddPathBezierI 9
GdipAddPathBeziersI 3
GdipAddPathCurveI 3
GdipAddPathCurve2I 4
GdipAddPathCurve3I 6
GdipAddPathClosedCurveI 3
GdipAddPathClosedCurve2I 4
GdipAddPathRectangleI 5
GdipAddPathRectanglesI 3
GdipAddPathEllipseI 5
GdipAddPathPieI 7
GdipAddPathPolygonI 3
GdipFlattenPath 3
GdipWindingModeOutline 3
GdipWidenPath 4
GdipWarpPath 10
GdipTransformPath 2
GdipGetPathWorldBounds 4
GdipGetPathWorldBoundsI 4
GdipIsVisiblePathPoint 5
GdipIsVisiblePathPointI 5
GdipIsOutlineVisiblePathPoint 6
GdipIsOutlineVisiblePathPointI 6
;HatchBrush
GdipCreateHatchBrush 4
GdipGetHatchStyle 2
GdipGetHatchForegroundColor 2
GdipGetHatchBackgroundColor 2
;Image
GdipLoadImageFromStream 2
GdipLoadImageFromFile 2
GdipLoadImageFromStreamICM 2
GdipLoadImageFromFileICM 2
GdipCloneImage 2
GdipDisposeImage 1
GdipSaveImageToFile 4
GdipSaveImageToStream 4
GdipSaveAdd 2
GdipSaveAddImage 3
GdipGetImageGraphicsContext 2
GdipGetImageBounds 3
GdipGetImageDimension 3
GdipGetImageType 2
GdipGetImageWidth 2
GdipGetImageHeight 2
GdipGetImageHorizontalResolution 2
GdipGetImageVerticalResolution 2
GdipGetImageFlags 2
GdipGetImageRawFormat 2
GdipGetImagePixelFormat 2
GdipGetImageThumbnail 6
GdipGetEncoderParameterListSize 3
GdipGetEncoderParameterList 4
GdipImageGetFrameDimensionsCount 2
GdipImageGetFrameDimensionsList 3
GdipImageGetFrameCount 3
GdipImageSelectActiveFrame 3
GdipImageRotateFlip 2
GdipGetImagePalette 3
GdipSetImagePalette 2
GdipGetImagePaletteSize 2
GdipGetPropertyCount 2
GdipGetPropertyIdList 3
GdipGetPropertyItemSize 3
GdipGetPropertyItem 4
GdipGetPropertySize 3
GdipGetAllPropertyItems 4
GdipRemovePropertyItem 2
GdipSetPropertyItem 2
GdipFindFirstImageItem 2
GdipFindNextImageItem 2
GdipGetImageItemData 2
GdipImageSetAbort 2
GdipConvertToEmfPlus 6
GdipConvertToEmfPlusToFile 7
GdipConvertToEmfPlusToStream 7
GdipImageForceValidation 1
;ImageAttributes
GdipCreateImageAttributes 1
GdipCloneImageAttributes 2
GdipDisposeImageAttributes 1
GdipSetImageAttributesToIdentity 2
GdipResetImageAttributes 2
GdipSetImageAttributesColorMatrix 6
GdipSetImageAttributesThreshold 4
GdipSetImageAttributesGamma 4
GdipSetImageAttributesNoOp 3
GdipSetImageAttributesColorKeys 5
GdipSetImageAttributesOutputChannel 4
GdipSetImageAttributesOutputChannelColorProfile 4
GdipSetImageAttributesRemapTable 5
GdipSetImageAttributesWrapMode 4
GdipSetImageAttributesICMMode 2
GdipGetImageAttributesAdjustedPalette 3
GdipSetImageAttributesCachedBackground 2
;LinearGradientBrush
GdipCreateLineBrush 6
GdipCreateLineBrushI 6
GdipCreateLineBrushFromRect 6
GdipCreateLineBrushFromRectI 6
GdipCreateLineBrushFromRectWithAngle 7
GdipCreateLineBrushFromRectWithAngleI 7
GdipSetLineColors 3
GdipGetLineColors 2
GdipGetLineRect 2
GdipGetLineRectI 2
GdipSetLineGammaCorrection 2
GdipGetLineGammaCorrection 2
GdipGetLineBlendCount 2
GdipGetLineBlend 4
GdipSetLineBlend 4
GdipGetLinePresetBlendCount 2
GdipGetLinePresetBlend 4
GdipSetLinePresetBlend 4
GdipSetLineSigmaBlend 3
GdipSetLineLinearBlend 3
GdipSetLineWrapMode 2
GdipGetLineWrapMode 2
GdipGetLineTransform 2
GdipSetLineTransform 2
GdipResetLineTransform 1
GdipMultiplyLineTransform 3
GdipTranslateLineTransform 4
GdipScaleLineTransform 4
GdipRotateLineTransform 3
;Matrix
GdipCreateMatrix 1
GdipCreateMatrix2 7
GdipCreateMatrix3 3
GdipCreateMatrix3I 3
GdipCloneMatrix 2
GdipDeleteMatrix 1
GdipSetMatrixElements 7
GdipMultiplyMatrix 3
GdipTranslateMatrix 4
GdipScaleMatrix 4
GdipRotateMatrix 3
GdipShearMatrix 4
GdipInvertMatrix 1
GdipTransformMatrixPoints 3
GdipTransformMatrixPointsI 3
GdipVectorTransformMatrixPoints 3
GdipVectorTransformMatrixPointsI 3
GdipGetMatrixElements 2
GdipIsMatrixInvertible 2
GdipIsMatrixIdentity 2
GdipIsMatrixEqual 3
;Memory
GdipAlloc 1
GdipFree 1
;Notification
GdiplusNotificationHook 1
GdiplusNotificationUnhook 1
;PathGradientBrush
GdipCreatePathGradient 4
GdipCreatePathGradientI 4
GdipCreatePathGradientFromPath 2
GdipGetPathGradientCenterColor 2
GdipSetPathGradientCenterColor 2
GdipGetPathGradientSurroundColorsWithCount 3
GdipSetPathGradientSurroundColorsWithCount 3
GdipGetPathGradientPath 2
GdipSetPathGradientPath 2
GdipGetPathGradientCenterPoint 2
GdipGetPathGradientCenterPointI 2
GdipSetPathGradientCenterPoint 2
GdipSetPathGradientCenterPointI 2
GdipGetPathGradientRect 2
GdipGetPathGradientRectI 2
GdipGetPathGradientPointCount 2
GdipGetPathGradientSurroundColorCount 2
GdipSetPathGradientGammaCorrection 2
GdipGetPathGradientGammaCorrection 2
GdipGetPathGradientBlendCount 2
GdipGetPathGradientBlend 4
GdipSetPathGradientBlend 4
GdipGetPathGradientPresetBlendCount 2
GdipGetPathGradientPresetBlend 4
GdipSetPathGradientPresetBlend 4
GdipSetPathGradientSigmaBlend 3
GdipSetPathGradientLinearBlend 3
GdipGetPathGradientWrapMode 2
GdipSetPathGradientWrapMode 2
GdipGetPathGradientTransform 2
GdipSetPathGradientTransform 2
GdipResetPathGradientTransform 1
GdipMultiplyPathGradientTransform 3
GdipTranslatePathGradientTransform 4
GdipScalePathGradientTransform 4
GdipRotatePathGradientTransform 3
GdipGetPathGradientFocusScales 3
GdipSetPathGradientFocusScales 3
;PathIterator
GdipCreatePathIter 2
GdipDeletePathIter 1
GdipPathIterNextSubpath 5
GdipPathIterNextSubpathPath 4
GdipPathIterNextPathType 5
GdipPathIterNextMarker 4
GdipPathIterNextMarkerPath 3
GdipPathIterGetCount 2
GdipPathIterGetSubpathCount 2
GdipPathIterIsValid 2
GdipPathIterHasCurve 2
GdipPathIterRewind 1
GdipPathIterEnumerate 5
GdipPathIterCopyData 6
;Pen
GdipCreatePen1 4
GdipCreatePen2 4
GdipClonePen 2
GdipDeletePen 1
GdipSetPenWidth 2
GdipGetPenWidth 2
GdipSetPenUnit 2
GdipGetPenUnit 2
GdipSetPenLineCap197819 4
GdipSetPenStartCap 2
GdipSetPenEndCap 2
GdipSetPenDashCap197819 2
GdipGetPenStartCap 2
GdipGetPenEndCap 2
GdipGetPenDashCap197819 2
GdipSetPenLineJoin 2
GdipGetPenLineJoin 2
GdipSetPenCustomStartCap 2
GdipGetPenCustomStartCap 2
GdipSetPenCustomEndCap 2
GdipGetPenCustomEndCap 2
GdipSetPenMiterLimit 2
GdipGetPenMiterLimit 2
GdipSetPenMode 2
GdipGetPenMode 2
GdipSetPenTransform 2
GdipGetPenTransform 2
GdipResetPenTransform 1
GdipMultiplyPenTransform 3
GdipTranslatePenTransform 4
GdipScalePenTransform 4
GdipRotatePenTransform 3
GdipSetPenColor 2
GdipGetPenColor 2
GdipSetPenBrushFill 2
GdipGetPenBrushFill 2
GdipGetPenFillType 2
GdipGetPenDashStyle 2
GdipSetPenDashStyle 2
GdipGetPenDashOffset 2
GdipSetPenDashOffset 2
GdipGetPenDashCount 2
GdipSetPenDashArray 3
GdipGetPenDashArray 3
GdipGetPenCompoundCount 2
GdipSetPenCompoundArray 3
GdipGetPenCompoundArray 3
;Region
GdipCreateRegion 1
GdipCreateRegionRect 2
GdipCreateRegionRectI 2
GdipCreateRegionPath 2
GdipCreateRegionRgnData 3
GdipCreateRegionHrgn 2
GdipCloneRegion 2
GdipDeleteRegion 1
GdipSetInfinite 1
GdipSetEmpty 1
GdipCombineRegionRect 3
GdipCombineRegionRectI 3
GdipCombineRegionPath 3
GdipCombineRegionRegion 3
GdipTranslateRegion 3
GdipTranslateRegionI 3
GdipTransformRegion 2
GdipGetRegionBounds 3
GdipGetRegionBoundsI 3
GdipGetRegionHRgn 3
GdipIsEmptyRegion 3
GdipIsInfiniteRegion 3
GdipIsEqualRegion 4
GdipGetRegionDataSize 2
GdipGetRegionData 4
GdipIsVisibleRegionPoint 5
GdipIsVisibleRegionPointI 5
GdipIsVisibleRegionRect 7
GdipIsVisibleRegionRectI 7
GdipGetRegionScansCount 3
GdipGetRegionScans 4
GdipGetRegionScansI 4
;SolidBrush
GdipCreateSolidFill 2
GdipSetSolidFillColor 2
GdipGetSolidFillColor 2
;String Format
GdipCreateStringFormat 3
GdipStringFormatGetGenericDefault 1
GdipStringFormatGetGenericTypographic 1
GdipDeleteStringFormat 1
GdipCloneStringFormat 2
GdipSetStringFormatFlags 2
GdipGetStringFormatFlags 2
GdipSetStringFormatAlign 2
GdipGetStringFormatAlign 2
GdipSetStringFormatLineAlign 2
GdipGetStringFormatLineAlign 2
GdipSetStringFormatTrimming 2
GdipGetStringFormatTrimming 2
GdipSetStringFormatHotkeyPrefix 2
GdipGetStringFormatHotkeyPrefix 2
GdipSetStringFormatTabStops 4
GdipGetStringFormatTabStops 4
GdipGetStringFormatTabStopCount 2
GdipSetStringFormatDigitSubstitution 3
GdipGetStringFormatDigitSubstitution 3
GdipGetStringFormatMeasurableCharacterRangeCount 2
GdipSetStringFormatMeasurableCharacterRanges 3
;Text
GdipDrawString 7
GdipMeasureString 9
GdipMeasureCharacterRanges 8
GdipDrawDriverString 8
GdipMeasureDriverString 8
;Texture Brush
GdipCreateTexture 3
GdipCreateTexture2 7
GdipCreateTextureIA 7
GdipCreateTexture2I 7
GdipCreateTextureIAI 7
GdipGetTextureTransform 2
GdipSetTextureTransform 2
GdipResetTextureTransform 1
GdipMultiplyTextureTransform 3
GdipTranslateTextureTransform 4
GdipScaleTextureTransform 4
GdipRotateTextureTransform 3
GdipSetTextureWrapMode 2
GdipGetTextureWrapMode 2
GdipGetTextureImage 2

Posted: Fri Sep 10, 2004 11:37 am
by wilbert
I only recently discovered this great dll.
What a lot of possibilities. :D

Posted: Fri Sep 10, 2004 12:50 pm
by Justin
yes, very powerfull if you know how to use it, i have some questions

anyone knows how to reduce the color depth of a bitmap using gdi+?

and this maybe for Fred, what will happen if i call one of this functions and gdiplus.dll is not present?, will PB crash or will the function return an error?

Posted: Fri Sep 10, 2004 1:00 pm
by GreenGiant
Why not just put a check in your code.

Code: Select all

If OpenLibrary(0,"gdiplus.dll")=0
  MessageRequester("Error","Unable to open GDI+",0)
EndIf
Edit: Or even better, distribute the dll with your app. Here's the link to the redistributable http://www.microsoft.com/downloads/deta ... 938B6F4614

Posted: Fri Sep 10, 2004 1:20 pm
by wilbert
I choose another way.
I created a lib that performs the loading and the initialization of the dll automaticly if I use a GDI+ function and terminates with an error if it didn't succeed. So far I only implemented a few functions.

Code: Select all

Gdip_StartGraphics () - Create graphics object from currentDC
Gdip_StopGraphics () - Delete graphics object
Gdip_IsFunction (FunctionName$) - Retrieve the address of a GDI+ function for fast call.
Gdip_CallFunction (FunctionName$, [Arg1, [Arg2, ...]]) - Call a GDI+ function
Gdip_ARGB (Alpha, Red, Greeb, Blue) - Return ARGB value
Gdip_SetSmoothingMode (SmoothingMode) - Set the smoothing mode
Gdip_CreateSolidPen (ARGB color, Width, Unit) - Create a solid pen
Gdip_CreateBrushPen (Brush, Width, Unit) - Create a brush pen
Gdip_DeletePen (Pen) - Delete a pen
Gdip_CreateSolidBrush (ARGB color) - Create a solid brush
Gdip_CreateHatchBrush (hatchstyle, ARGB forecol, ARGB backcol) - Create a hatch brush
Gdip_DeleteBrush (Brush) - Delete a brush
Gdip_DrawLine (Pen, x1, y1, x2, y2) - Draw a line
Gdip_DrawRectangle (Pen, x, y, width, height) - Draw a rectangle
Gdip_FillRectangle (Brush, x, y, width, height) - Draw a filled rectangle
Gdip_DrawEllipse (Pen, x, y, width, height) - Draw an ellipse
Gdip_FillEllipse (Brush, x, y, width, height) - Draw a filled ellipse
Gdip_DrawCurve (Pen, Points(), Count, Tension.f) - Draw a curve
Gdip_DrawClosedCurve (Pen, Points(), Count, Tension.f) - Draw a closed curve
Gdip_FillClosedCurve (Brush, Points(), Count, Tension.f,  FillMode) - Draw a filled closed curve
This is how my current test code looks like

Code: Select all

OpenWindow(0, 0, 0, 300, 200, #PB_Window_SystemMenu | #PB_Window_ScreenCentered, "GdiPlus demo")

CreateImage(0, 300, 200) 
If StartDrawing(ImageOutput()) 
  If Gdip_StartGraphics()

    Gdip_SetSmoothingMode(#Gdip_SmoothingModeAntiAlias)

    brush1 = Gdip_CreateHatchBrush(#Gdip_HatchStyleDottedDiamond,Gdip_ARGB(255,255,255,255),Gdip_ARGB(255,255,0,0))
    brush2 = Gdip_CreateSolidBrush(Gdip_ARGB(255,50,50,255))
    pen1 = Gdip_CreateSolidPen(#Gdip_Salmon,4,#Gdip_UnitPixel)

    Gdip_FillEllipse(brush1, 50,70,80,80)
    
    Gdip_DrawRectangle(pen1, 70,100,80,50)
    
    Dim Points.Point(5)
    Points(0)\x = 10
    Points(0)\y = 20
    Points(1)\x = 30
    Points(1)\y = 40
    Points(2)\x = 50
    Points(2)\y = 120
    Points(3)\x = 10
    Points(3)\y = 40
    Points(4)\x = 60
    Points(4)\y = 30
    Points(5)\x = 50
    Points(5)\y = 50
    Gdip_FillClosedCurve(brush1,Points(), 6, 1, #Gdip_FillModeWinding)

    Gdip_DeletePen(pen1)
    Gdip_DeleteBrush(brush1)

    Gdip_StopGraphics()

  EndIf
  StopDrawing()
EndIf


CreateGadgetList(WindowID())
ImageGadget(0, 0, 0, 300, 300, UseImage(0)) 

Repeat
  EventID = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow

Posted: Fri Sep 10, 2004 2:10 pm
by Justin
Why not just put a check in your code.
If OpenLibrary(0,"gdiplus.dll")=0
MessageRequester("Error","Unable to open GDI+",0)
EndIf
That would be a solution, but i wonder what would happen if i compile an exe and use GdiplusStartup_() without openlibrary() to check gdi+, then i run that exe in a pc that does not have gdiplus.dll, i'm just curious about the result, crash or function error.

Re: GDI+ dll definition

Posted: Fri Sep 10, 2004 2:47 pm
by NoahPhense
I've heard a bit about this DLL.. what is it's main purpose. And before
I get fancy on it.. ;) is it ok for commercial usage?

- np

Posted: Fri Sep 10, 2004 5:46 pm
by Justin
it's a MS dll, i think it comes with W98 or 2000 and later

about graphics, drawing, images, etc..

an extension of GDI (Graphic Device Interface) , more powerfull but the api is not supported by MS only the class wrappers, although this is not a big problem, the function names are similar.

any hint on how to reduce the bitmap depth?

Posted: Fri Sep 10, 2004 6:22 pm
by wilbert
Justin wrote:any hint on how to reduce the bitmap depth?

Code: Select all

GdipBitmapConvertFormat(IN GpBitmap *pInputBitmap, PixelFormat format, DitherType dithertype, PaletteType palettetype, ColorPalette *palette, REAL alphaThresholdPercent)

Posted: Sat Sep 11, 2004 12:21 am
by Justin
seems that's the way to go, and here's an example

http://msdn.microsoft.com/library/en-us ... Format.asp

the fun part is that GdipBitmapConvertFormat() is not in the dll, although is listed in the flat api, but not in the class methods. looks like something very new or yet not implemented