[33] | 1 | ' Classes/System/Drawing/Graphics.ab
|
---|
| 2 |
|
---|
| 3 | #ifndef __SYSTEM_DRAWING_GRAPHICS_AB__
|
---|
| 4 | #define __SYSTEM_DRAWING_GRAPHICS_AB__
|
---|
| 5 |
|
---|
[104] | 6 | Class Brush : End Class
|
---|
| 7 | Class Pen : End Class
|
---|
| 8 | Class StringFormat : End Class
|
---|
| 9 | Class Image : End Class
|
---|
| 10 | Class ImageAttributes : End Class
|
---|
| 11 | Class Metafile : End Class
|
---|
| 12 | Class Region : End Class
|
---|
| 13 | Class GraphicsPath : End Class
|
---|
| 14 | Class CachedBitmap : End Class
|
---|
| 15 |
|
---|
[33] | 16 | Class Graphics
|
---|
| 17 | Public
|
---|
| 18 | '=========================================================================
|
---|
| 19 | ' Properties
|
---|
| 20 | '=========================================================================
|
---|
| 21 | Const Function Clip() As Region
|
---|
[212] | 22 | Dim r As Region
|
---|
[33] | 23 | GetClip(r)
|
---|
| 24 | Return r
|
---|
| 25 | End Function
|
---|
| 26 |
|
---|
[212] | 27 | Sub Clip(region As /*Const*/ Region)
|
---|
[33] | 28 | SetClip(region, CombineMode.Replace)
|
---|
| 29 | End Sub
|
---|
| 30 |
|
---|
| 31 | Const Function ClipBounds() As RectangleF
|
---|
| 32 | Dim rc As RectangleF
|
---|
| 33 | GetClipBounds(rc)
|
---|
| 34 | Return rc
|
---|
| 35 | End Function
|
---|
| 36 |
|
---|
| 37 | Sub ClipBounds(rc As RectangleF)
|
---|
| 38 | SetClipBounds(rc)
|
---|
| 39 | End Sub
|
---|
| 40 |
|
---|
| 41 | Function CompositingMode() As CompositingMode
|
---|
| 42 | Return GetCompositingMode()
|
---|
| 43 | End Function
|
---|
| 44 |
|
---|
| 45 | Sub CompositingMode(mode As CompositingMode)
|
---|
| 46 | SetCompositingMode(mode)
|
---|
| 47 | End Sub
|
---|
| 48 |
|
---|
| 49 | Function CompositingQuality() As CompositingQuality
|
---|
| 50 | Return GetCompositingQuality()
|
---|
| 51 | End Function
|
---|
| 52 |
|
---|
| 53 | Sub CompositingQuality(cq As CompositingQuality)
|
---|
| 54 | SetCompositingQuality(cq)
|
---|
| 55 | End Sub
|
---|
| 56 |
|
---|
| 57 | Const Function DpiX() As Single
|
---|
| 58 | Dim dpi As Single
|
---|
| 59 | SetStatus(GdipGetDpiX(nativeGraphics, dpi))
|
---|
| 60 | Return dpi
|
---|
| 61 | End Function
|
---|
| 62 |
|
---|
| 63 | Const Function DpiY() As Single
|
---|
| 64 | Dim dpi As Single
|
---|
| 65 | SetStatus(GdipGetDpiY(nativeGraphics, dpi))
|
---|
| 66 | Return dpi
|
---|
| 67 | End Function
|
---|
| 68 |
|
---|
| 69 | Const Function InterpolationMode() As InterpolationMode
|
---|
| 70 | Return GetInterpolationMode()
|
---|
| 71 | End Function
|
---|
| 72 |
|
---|
| 73 | Sub InterpolationMode(im As InterpolationMode)
|
---|
| 74 | SetInterpolationMode(im)
|
---|
| 75 | End Sub
|
---|
| 76 |
|
---|
| 77 | Const Function IsClipEmpty() As BOOL
|
---|
| 78 | Dim b = FALSE As BOOL
|
---|
| 79 | SetStatus(GdipIsClipEmpty(nativeGraphics, b))
|
---|
| 80 | Return b
|
---|
| 81 | End Function
|
---|
| 82 |
|
---|
| 83 | Const Function IsVisibleClipEmpty() As BOOL
|
---|
| 84 | Dim b = FALSE As BOOL
|
---|
| 85 | SetStatus(GdipIsVisibleClipEmpty(nativeGraphics, b))
|
---|
| 86 | Return b
|
---|
| 87 | End Function
|
---|
| 88 |
|
---|
| 89 | Function PageScale(scale As Single) As Status
|
---|
| 90 | Return SetStatus(GdipSetPageScale(nativeGraphics, scale))
|
---|
| 91 | End Function
|
---|
| 92 |
|
---|
| 93 | Const Function PageScale() As Single
|
---|
| 94 | Dim scale As Single
|
---|
| 95 | SetStatus(GdipGetPageScale(nativeGraphics, scale))
|
---|
| 96 | Return scale
|
---|
| 97 | End Function
|
---|
| 98 |
|
---|
| 99 | Const Function PageUnit() As GraphicsUnit
|
---|
| 100 | Dim unit As GraphicsUnit
|
---|
| 101 | SetStatus(GdipGetPageUnit(nativeGraphics, unit))
|
---|
| 102 | Return unit
|
---|
| 103 | End Function
|
---|
| 104 |
|
---|
| 105 | Function PageUnit(unit As GraphicsUnit) As Status
|
---|
| 106 | Return SetStatus(GdipSetPageUnit(nativeGraphics, unit))
|
---|
| 107 | End Function
|
---|
| 108 |
|
---|
| 109 | Function PixelOffsetMode() As PixelOffsetMode
|
---|
| 110 | Return GetPixelOffsetMode()
|
---|
| 111 | End Function
|
---|
| 112 |
|
---|
| 113 | Sub PixelOffsetMode(mode As PixelOffsetMode)
|
---|
| 114 | SetPixelOffsetMode(mode)
|
---|
| 115 | End Sub
|
---|
| 116 |
|
---|
| 117 | Function RenderingOrigin() As Point
|
---|
| 118 | Dim pt As Point
|
---|
| 119 | GetRenderingOrigin(pt.X, pt.Y)
|
---|
| 120 | Return pt
|
---|
| 121 | End Function
|
---|
| 122 |
|
---|
| 123 | Sub RenderingOrigin(pt As Point)
|
---|
| 124 | SetRenderingOrigin(pt.X, pt.Y)
|
---|
| 125 | End Sub
|
---|
| 126 |
|
---|
| 127 | Function SmoothingMode() As SmoothingMode
|
---|
| 128 | Return GetSmoothingMode()
|
---|
| 129 | End Function
|
---|
| 130 |
|
---|
| 131 | Sub SmoothingMode(mode As SmoothingMode)
|
---|
| 132 | SetSmoothingMode(mode)
|
---|
| 133 | End Sub
|
---|
| 134 |
|
---|
| 135 | Function TextContrast() As DWord
|
---|
| 136 | Return GetTextContrast()
|
---|
| 137 | End Function
|
---|
| 138 |
|
---|
| 139 | Sub TextContrast(contrast As DWord)
|
---|
| 140 | SetTextContrast(contrast)
|
---|
| 141 | End Sub
|
---|
| 142 |
|
---|
| 143 | Function TextRenderingHint() As TextRenderingHint
|
---|
| 144 | Return GetTextRenderingHint()
|
---|
| 145 | End Function
|
---|
| 146 |
|
---|
| 147 | Sub TextRenderingHint(mode As TextRenderingHint)
|
---|
| 148 | SetTextRenderingHint(mode)
|
---|
| 149 | End Sub
|
---|
| 150 |
|
---|
| 151 | Function Transform() As Matrix
|
---|
| 152 | Dim matrix As Matrix
|
---|
| 153 | GetTransform(matrix)
|
---|
| 154 | Return matrix
|
---|
| 155 | End Function
|
---|
| 156 |
|
---|
[212] | 157 | Sub Transform(matrix As Matrix)
|
---|
[33] | 158 | SetTransform(matirx)
|
---|
| 159 | End Sub
|
---|
| 160 |
|
---|
| 161 | Function VisibleClipBounds() As RectangleF
|
---|
| 162 | Dim rc As RectangleF
|
---|
| 163 | GetVisibleClipBounds(rc)
|
---|
| 164 | Return rc
|
---|
| 165 | End Function
|
---|
| 166 |
|
---|
| 167 | '=========================================================================
|
---|
| 168 | ' Methods
|
---|
| 169 | '=========================================================================
|
---|
[212] | 170 | Static Function FromHDC(hdc As HDC) As Graphics
|
---|
[33] | 171 | Return New Graphics(hdc)
|
---|
| 172 | End Function
|
---|
| 173 |
|
---|
[212] | 174 | Static Function FromHDC(hdc As HDC, hdevice As HANDLE) As Graphics
|
---|
[33] | 175 | Return New Graphics(hdc, hdevice)
|
---|
| 176 | End Function
|
---|
| 177 |
|
---|
[212] | 178 | Static Function FromHWND(hwnd As HWND) As Graphics
|
---|
[33] | 179 | Return New Graphics(hwnd, FALSE)
|
---|
| 180 | End Function
|
---|
| 181 |
|
---|
[212] | 182 | Static Function FromHWND(hwnd As DWord, icm As BOOL) As Graphics
|
---|
[33] | 183 | Return New Graphics(hwnd, icm)
|
---|
| 184 | End Function
|
---|
| 185 |
|
---|
[212] | 186 | Static Function FromImage(image As Image) As Graphics
|
---|
[33] | 187 | Return New Graphics(image)
|
---|
| 188 | End Function
|
---|
| 189 |
|
---|
| 190 | Sub Graphics(hdc As HDC)
|
---|
[212] | 191 | Dim graphics = 0 As GpGraphics
|
---|
[33] | 192 | lastResult = GdipCreateFromHDC(hdc, graphics)
|
---|
| 193 | SetNativeGraphics(graphics)
|
---|
| 194 | End Sub
|
---|
| 195 |
|
---|
| 196 | Sub Graphics(hdc As HDC, hdevice As HANDLE)
|
---|
| 197 | Dim graphics = 0 As *GpGraphics
|
---|
| 198 | lastResult = GdipCreateFromHDC2(hdc, hdevice, graphics)
|
---|
| 199 | SetNativeGraphics(graphics)
|
---|
| 200 | End Sub
|
---|
| 201 |
|
---|
| 202 | Sub Graphics(hwnd As HWND)
|
---|
| 203 | Dim graphics = 0 As *GpGraphics
|
---|
| 204 | lastResult = GdipCreateFromHWND(hwnd, graphics)
|
---|
| 205 | SetNativeGraphics(graphics)
|
---|
| 206 | End Sub
|
---|
| 207 |
|
---|
| 208 | Sub Graphics(hwnd As HWND, icm As BOOL)
|
---|
| 209 | Dim graphics = 0 As *GpGraphics
|
---|
| 210 | If icm <> FALSE Then
|
---|
| 211 | lastResult = GdipCreateFromHWNDICM(hwnd, graphics)
|
---|
| 212 | Else
|
---|
| 213 | lastResult = GdipCreateFromHWND(hwnd, graphics)
|
---|
| 214 | End If
|
---|
| 215 | SetNativeGraphics(graphics)
|
---|
| 216 | End Sub
|
---|
| 217 |
|
---|
[212] | 218 | Sub Graphics(image As Image)
|
---|
[33] | 219 | Dim graphics = 0 As *GpGraphics
|
---|
| 220 | If (image != 0)
|
---|
[104] | 221 | lastResult = GdipGetImageGraphicsContext(image->NativeImage, graphics)
|
---|
[33] | 222 | End If
|
---|
| 223 | SetNativeGraphics(graphics)
|
---|
| 224 | End Sub
|
---|
| 225 |
|
---|
| 226 | Sub ~Graphics()
|
---|
| 227 | GdipDeleteGraphics(nativeGraphics)
|
---|
| 228 | End Sub
|
---|
| 229 |
|
---|
| 230 | Sub Flush()
|
---|
| 231 | GdipFlush(nativeGraphics, FlushIntention.Flush)
|
---|
| 232 | End Sub
|
---|
| 233 |
|
---|
| 234 | Sub Flush(intention As FlushIntention)
|
---|
| 235 | GdipFlush(nativeGraphics, intention)
|
---|
| 236 | End Sub
|
---|
| 237 |
|
---|
| 238 | '------------------------------------------------------------------------
|
---|
| 239 | ' GDI Interop methods
|
---|
| 240 | '------------------------------------------------------------------------
|
---|
| 241 |
|
---|
| 242 | ' Locks the graphics until ReleaseDC is called
|
---|
| 243 |
|
---|
| 244 | Function GetHDC() As HDC
|
---|
| 245 | Dim hdc = 0 As HDC
|
---|
| 246 | SetStatus(GdipGetDC(nativeGraphics, hdc))
|
---|
| 247 | Return hdc
|
---|
| 248 | End Function
|
---|
| 249 |
|
---|
| 250 | Sub ReleaseHDC(hdc As HDC)
|
---|
| 251 | SetStatus(GdipReleaseDC(nativeGraphics, hdc))
|
---|
| 252 | End Sub
|
---|
| 253 |
|
---|
| 254 | '------------------------------------------------------------------------
|
---|
| 255 | ' Rendering modes
|
---|
| 256 | '------------------------------------------------------------------------
|
---|
| 257 |
|
---|
| 258 | Function SetRenderingOrigin(x As Long, y As Long) As Status
|
---|
| 259 | Return SetStatus(GdipSetRenderingOrigin(nativeGraphics, x, y))
|
---|
| 260 | End Function
|
---|
| 261 |
|
---|
[212] | 262 | Const Function GetRenderingOrigin(x As Long, y As Long) As Status
|
---|
[33] | 263 | Return SetStatus(GdipGetRenderingOrigin(nativeGraphics, x, y))
|
---|
| 264 | End Function
|
---|
| 265 |
|
---|
| 266 | Function SetCompositingMode(compositingMode As CompositingMode) As Status
|
---|
| 267 | Return SetStatus(GdipSetCompositingMode(nativeGraphics, compositingMode))
|
---|
| 268 | End Function
|
---|
| 269 |
|
---|
| 270 | Const Function GetCompositingMode() As CompositingMode
|
---|
| 271 | Dim mode As CompositingMode
|
---|
| 272 | SetStatus(GdipGetCompositingMode(nativeGraphics, mode))
|
---|
| 273 | Return mode
|
---|
| 274 | End Function
|
---|
| 275 |
|
---|
| 276 | Function SetCompositingQuality(compositingQuality As CompositingQuality)
|
---|
| 277 | Return SetStatus(GdipSetCompositingQuality(nativeGraphics, compositingQuality))
|
---|
| 278 | End Function
|
---|
| 279 |
|
---|
| 280 | Const Function GetCompositingQuality() As CompositingQuality
|
---|
| 281 | Dim quality As CompositingQuality
|
---|
| 282 | SetStatus(GdipGetCompositingQuality(nativeGraphics, quality))
|
---|
| 283 | Return quality
|
---|
| 284 | End Function
|
---|
| 285 |
|
---|
| 286 | Function SetTextRenderingHint(newMode As TextRenderingHint) As Status
|
---|
| 287 | Return SetStatus(GdipSetTextRenderingHint(nativeGraphics, newMode))
|
---|
| 288 | End Function
|
---|
| 289 |
|
---|
| 290 | Const Function GetTextRenderingHint() As TextRenderingHint
|
---|
| 291 | Dim hint As TextRenderingHint
|
---|
| 292 | SetStatus(GdipGetTextRenderingHint(nativeGraphics, hint))
|
---|
| 293 | Return hint
|
---|
| 294 | End Function
|
---|
| 295 |
|
---|
| 296 | Function SetTextContrast(contrast As DWord) As Status
|
---|
| 297 | Return SetStatus(GdipSetTextContrast(nativeGraphics, contrast))
|
---|
| 298 | End Function
|
---|
| 299 |
|
---|
| 300 | Const Function GetTextContrast() As DWord
|
---|
| 301 | Dim contrast As DWord
|
---|
| 302 | SetStatus(GdipGetTextContrast(nativeGraphics, contrast))
|
---|
| 303 | Return contrast
|
---|
| 304 | End Function
|
---|
| 305 |
|
---|
| 306 | Const Function GetInterpolationMode() As InterpolationMode
|
---|
| 307 | Dim mode = InterpolationMode.Invalid As InterpolationMode
|
---|
| 308 | SetStatus(GdipGetInterpolationMode(nativeGraphics, mode))
|
---|
| 309 | Return mode
|
---|
| 310 | End Function
|
---|
| 311 |
|
---|
| 312 | Function SetInterpolationMode(interpolationMode As InterpolationMode) As Status
|
---|
| 313 | Return SetStatus(GdipSetInterpolationMode(nativeGraphics, interpolationMode))
|
---|
| 314 | End Function
|
---|
| 315 |
|
---|
| 316 | Const Function GetSmoothingMode() As SmoothingMode
|
---|
| 317 | Dim smoothingMode = SmoothingMode.Invalid As SmoothingMode
|
---|
| 318 | SetStatus(GdipGetSmoothingMode(nativeGraphics, smoothingMode))
|
---|
| 319 | Return smoothingMode
|
---|
| 320 | End Function
|
---|
| 321 |
|
---|
| 322 | Function SetSmoothingMode(smoothingMode As SmoothingMode) As Status
|
---|
| 323 | Return SetStatus(GdipSetSmoothingMode(nativeGraphics, smoothingMode))
|
---|
| 324 | End Function
|
---|
| 325 |
|
---|
| 326 | Const Function GetPixelOffsetMode() As PixelOffsetMode
|
---|
| 327 | Dim pixelOffsetMode = PixelOffsetMode.Invalid As PixelOffsetMode
|
---|
| 328 | SetStatus(GdipGetPixelOffsetMode(nativeGraphics, pixelOffsetMode))
|
---|
| 329 | Return pixelOffsetMode
|
---|
| 330 | End Function
|
---|
| 331 |
|
---|
| 332 | Function SetPixelOffsetMode(pixelOffsetMode As PixelOffsetMode) As Status
|
---|
| 333 | Return SetStatus(GdipSetPixelOffsetMode(nativeGraphics, pixelOffsetMode))
|
---|
| 334 | End Function
|
---|
| 335 |
|
---|
| 336 | '------------------------------------------------------------------------
|
---|
| 337 | ' Manipulate current world transform
|
---|
| 338 | '------------------------------------------------------------------------
|
---|
| 339 |
|
---|
[212] | 340 | Function SetTransform(matrix As /*Const*/ *Matrix) As Status
|
---|
[33] | 341 | Return SetStatus(GdipSetWorldTransform(nativeGraphics, matrix->nativeMatrix))
|
---|
| 342 | End Function
|
---|
| 343 |
|
---|
| 344 | Function ResetTransform() As Status
|
---|
| 345 | Return SetStatus(GdipResetWorldTransform(nativeGraphics))
|
---|
| 346 | End Function
|
---|
| 347 |
|
---|
[212] | 348 | Function MultiplyTransform(matrix As /*Const*/ Matrix) As Status
|
---|
[33] | 349 | Return SetStatus(GdipMultiplyWorldTransform(nativeGraphics, matrix->nativeMatrix, MatrixOrder.Prepend))
|
---|
| 350 | End Function
|
---|
| 351 |
|
---|
[212] | 352 | Function MultiplyTransform(matrix As /*Const*/ Matrix, order As MatrixOrder) As Status
|
---|
[33] | 353 | Return SetStatus(GdipMultiplyWorldTransform(nativeGraphics, matrix->nativeMatrix, order))
|
---|
| 354 | End Function
|
---|
| 355 |
|
---|
| 356 | Function TranslateTransform(dx As Single, dy As Single) As Status
|
---|
| 357 | Return SetStatus(GdipTranslateWorldTransform(nativeGraphics, dx, dy, MatrixOrder.Prepend))
|
---|
| 358 | End Function
|
---|
| 359 |
|
---|
| 360 | Function TranslateTransform(dx As Single, dy As Single, order As MatrixOrder) As Status
|
---|
| 361 | Return SetStatus(GdipTranslateWorldTransform(nativeGraphics, dx, dy, order))
|
---|
| 362 | End Function
|
---|
| 363 |
|
---|
| 364 | Function ScaleTransform(sx As Single, sy As Single) As Status
|
---|
| 365 | Return SetStatus(GdipScaleWorldTransform(nativeGraphics, sx, sy, MatrixOrder.Prepend))
|
---|
| 366 | End Function
|
---|
| 367 |
|
---|
| 368 | Function ScaleTransform(sx As Single, sy As Single, order As MatrixOrder) As Status
|
---|
| 369 | Return SetStatus(GdipScaleWorldTransform(nativeGraphics, sx, sy, order))
|
---|
| 370 | End Function
|
---|
| 371 |
|
---|
| 372 | Function RotateTransform(angle As Single) As Status
|
---|
| 373 | Return SetStatus(GdipRotateWorldTransform(nativeGraphics, angle, MatrixOrder.Prepend))
|
---|
| 374 | End Function
|
---|
| 375 |
|
---|
| 376 | Function RotateTransform(angle As Single, order As MatrixOrder) As Status
|
---|
| 377 | Return SetStatus(GdipRotateWorldTransform(nativeGraphics, angle, order))
|
---|
| 378 | End Function
|
---|
| 379 |
|
---|
[212] | 380 | Const Function GetTransform(matrix As Matrix) As Status
|
---|
[33] | 381 | Return SetStatus(GdipGetWorldTransform(nativeGraphics, matrix->nativeMatrix))
|
---|
| 382 | End Function
|
---|
| 383 |
|
---|
| 384 | Const Function TransformPoints(destSpace As CoordinateSpace, srcSpace As CoordinateSpace, pts As PointF, count As Long) As Status
|
---|
| 385 | Return SetStatus(GdipTransformPoints(nativeGraphics, destSpace, srcSpace, pts, count))
|
---|
| 386 | End Function
|
---|
| 387 |
|
---|
| 388 | Const Function TransformPoints(destSpace As CoordinateSpace, srcSpace As CoordinateSpace, pts As Point, count As Long) As Status
|
---|
| 389 | Return SetStatus(GdipTransformPointsI(nativeGraphics, destSpace, srcSpace, pts, count))
|
---|
| 390 | End Function
|
---|
| 391 |
|
---|
| 392 | '------------------------------------------------------------------------
|
---|
| 393 | ' GetNearestColor (for <= 8bpp surfaces). Note: Alpha is ignored.
|
---|
| 394 | '------------------------------------------------------------------------
|
---|
| 395 |
|
---|
[212] | 396 | Const Function GetNearestColor(color As Color) As Status
|
---|
[33] | 397 | Dim argb = color->Value
|
---|
| 398 | Dim status = SetStatus(GdipGetNearestColor(nativeGraphics, argb))
|
---|
| 399 | color->Value = argb
|
---|
| 400 | Return status
|
---|
| 401 | End Function
|
---|
| 402 |
|
---|
[212] | 403 | Function DrawLine(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Status
|
---|
[33] | 404 | Return SetStatus(GdipDrawLine(nativeGraphics, pen->nativePen, x1, y1, x2, y2))
|
---|
| 405 | End Function
|
---|
| 406 |
|
---|
[212] | 407 | Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF) As Status
|
---|
[33] | 408 | Return DrawLine(pen, pt1.X, pt1.Y, pt2.X, pt2.Y)
|
---|
| 409 | End Function
|
---|
| 410 |
|
---|
[212] | 411 | Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 412 | Return SetStatus(GdipDrawLines(nativeGraphics, pen->nativePen, points, count))
|
---|
| 413 | End Function
|
---|
| 414 |
|
---|
[212] | 415 | Function DrawLine(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long) As Status
|
---|
[33] | 416 | Return SetStatus(GdipDrawLineI(nativeGraphics, pen->nativePen, x1, y1, x2, y2))
|
---|
| 417 | End Function
|
---|
| 418 |
|
---|
[212] | 419 | Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point) As Status
|
---|
[33] | 420 | Return DrawLine(pen, pt1.X, pt1.Y, pt2.X, pt2.Y)
|
---|
| 421 | End Function
|
---|
| 422 |
|
---|
[212] | 423 | Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 424 | Return SetStatus(GdipDrawLinesI(nativeGraphics, pen->nativePen, points, count))
|
---|
| 425 | End Function
|
---|
| 426 |
|
---|
[212] | 427 | Function DrawArc(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 428 | Return SetStatus(GdipDrawArc(nativeGraphics, pen->nativePen, x, y, width, height, startAngle, sweepAngle))
|
---|
| 429 | End Function
|
---|
| 430 |
|
---|
[212] | 431 | Function DrawArc(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 432 | Return DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
|
---|
| 433 | End Function
|
---|
| 434 |
|
---|
[212] | 435 | Function DrawArc(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 436 | Return SetStatus(GdipDrawArcI(nativeGraphics, pen->nativePen, x, y, width, height, startAngle, sweepAngle))
|
---|
| 437 | End Function
|
---|
| 438 |
|
---|
[212] | 439 | Function DrawArc(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 440 | Return DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
|
---|
| 441 | End Function
|
---|
| 442 |
|
---|
[212] | 443 | Function DrawBezier(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single, x3 As Single, y3 As Single, x4 As Single, y4 As Single) As Status
|
---|
[33] | 444 | Return SetStatus(GdipDrawBezier(nativeGraphics, pen->nativePen, x1, y1,x2, y2, x3, y3, x4, y4))
|
---|
| 445 | End Function
|
---|
| 446 |
|
---|
[212] | 447 | Function DrawBezier(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF, pt3 As /*Const*/ PointF, pt4 As /*Const*/ PointF) As Status
|
---|
[33] | 448 | Return DrawBezier(pen, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y)
|
---|
| 449 | End Function
|
---|
| 450 |
|
---|
[212] | 451 | Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 452 | Return SetStatus(GdipDrawBeziers(nativeGraphics, pen->nativePen, points, count))
|
---|
| 453 | End Function
|
---|
| 454 |
|
---|
[212] | 455 | Function DrawBezier(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long, x3 As Long, y3 As Long, x4 As Long, y4 As Long) As Status
|
---|
[33] | 456 | Return SetStatus(GdipDrawBezierI(nativeGraphics, pen->nativePen, x1, y1, x2, y2, x3, y3, x4, y4))
|
---|
| 457 | End Function
|
---|
| 458 |
|
---|
[212] | 459 | Function DrawBezier(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point, pt3 As /*Const*/ Point, pt4 As /*Const*/ Point) As Status
|
---|
[33] | 460 | Return DrawBezier(pen pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y)
|
---|
| 461 | End Function
|
---|
| 462 |
|
---|
[212] | 463 | Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 464 | Return SetStatus(GdipDrawBeziersI(nativeGraphics, pen->nativePen, points, count))
|
---|
| 465 | End Function
|
---|
| 466 |
|
---|
[212] | 467 | Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status
|
---|
[33] | 468 | Return DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 469 | End Function
|
---|
| 470 |
|
---|
[212] | 471 | Function DrawRectangle(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status
|
---|
[33] | 472 | Return SetStatus(GdipDrawRectangle(nativeGraphics, pen->nativePen, x, y, width, height))
|
---|
| 473 | End Function
|
---|
| 474 |
|
---|
[212] | 475 | Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *RectangleF, count As Long) As Status
|
---|
[33] | 476 | Return SetStatus(GdipDrawRectangles(nativeGraphics, pen->nativePen, rects, count))
|
---|
| 477 | End Function
|
---|
| 478 |
|
---|
[212] | 479 | Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status
|
---|
[33] | 480 | Return DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 481 | End Function
|
---|
| 482 |
|
---|
[212] | 483 | Function DrawRectangle(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
|
---|
[33] | 484 | Return SetStatus(GdipDrawRectangleI(nativeGraphics, pen->nativePen, x, y, width, height))
|
---|
| 485 | End Function
|
---|
| 486 |
|
---|
[212] | 487 | Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *Rectangle, count As Long) As Status
|
---|
[33] | 488 | Return SetStatus(GdipDrawRectanglesI(nativeGraphics, pen->nativePen, rects, count))
|
---|
| 489 | End Function
|
---|
| 490 |
|
---|
[212] | 491 | Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status
|
---|
[33] | 492 | Return DrawEllipse(pen, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 493 | End Function
|
---|
| 494 |
|
---|
[212] | 495 | Function DrawEllipse(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status
|
---|
[33] | 496 | Return SetStatus(GdipDrawEllipse(nativeGraphics, pen->nativePen, x, y, width, height))
|
---|
| 497 | End Function
|
---|
| 498 |
|
---|
[212] | 499 | Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status
|
---|
[33] | 500 | Return DrawEllipse(pen, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 501 | End Function
|
---|
| 502 |
|
---|
[212] | 503 | Function DrawEllipse(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
|
---|
[33] | 504 | Return SetStatus(GdipDrawEllipseI(nativeGraphics, pen->nativePen, x, y, width, height))
|
---|
| 505 | End Function
|
---|
| 506 |
|
---|
[212] | 507 | Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 508 | Return DrawPie(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
|
---|
| 509 | End Function
|
---|
| 510 |
|
---|
[212] | 511 | Function DrawPie(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 512 | Return SetStatus(GdipDrawPie(nativeGraphics, pen->nativePen, x, y, width, height, startAngle, sweepAngle))
|
---|
| 513 | End Function
|
---|
| 514 |
|
---|
[212] | 515 | Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 516 | Return DrawPie(pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
|
---|
| 517 | End Function
|
---|
| 518 |
|
---|
[212] | 519 | Function DrawPie(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 520 | Return SetStatus(GdipDrawPieI(nativeGraphics, pen->nativePen, x, y, width, height, startAngle, sweepAngle))
|
---|
| 521 | End Function
|
---|
| 522 |
|
---|
[212] | 523 | Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 524 | Return SetStatus(GdipDrawPolygon(nativeGraphics, pen->nativePen, points, count))
|
---|
| 525 | End Function
|
---|
| 526 |
|
---|
[212] | 527 | Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 528 | Return SetStatus(GdipDrawPolygonI(nativeGraphics, pen->nativePen, points, count))
|
---|
| 529 | End Function
|
---|
| 530 |
|
---|
[212] | 531 | Function DrawPath(pen As /*Const*/ Pen, path As /*Const*/ GraphicsPath) As Status
|
---|
[33] | 532 | Return SetStatus(GdipDrawPath(nativeGraphics, pen->nativePen, path->nativePath))
|
---|
| 533 | ' Return SetStatus(GdipDrawPath(nativeGraphics, pen ? pen->nativePen : NULL, path ? path->nativePath : NULL))
|
---|
| 534 | End Function
|
---|
| 535 |
|
---|
[212] | 536 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 537 | Return SetStatus(GdipDrawCurve(nativeGraphics, pen->nativePen, points, count))
|
---|
| 538 | End Function
|
---|
| 539 |
|
---|
[212] | 540 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, tension As Single) As Status
|
---|
[33] | 541 | Return SetStatus(GdipDrawCurve2(nativeGraphics, pen->nativePen, points,count, tension))
|
---|
| 542 | End Function
|
---|
| 543 |
|
---|
[212] | 544 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, offset As Long, numberOfSegments As Long) As Status
|
---|
[33] | 545 | Return SetStatus(GdipDrawCurve3(nativeGraphics, pen->nativePen, points, count, offset,numberOfSegments, 0.5))
|
---|
| 546 | End Function
|
---|
| 547 |
|
---|
[212] | 548 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status
|
---|
[33] | 549 | Return SetStatus(GdipDrawCurve3(nativeGraphics, pen->nativePen, points, count, offset,numberOfSegments, tension))
|
---|
| 550 | End Function
|
---|
| 551 |
|
---|
[212] | 552 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 553 | Return SetStatus(GdipDrawCurveI(nativeGraphics, pen->nativePen, points, count))
|
---|
| 554 | End Function
|
---|
| 555 |
|
---|
[212] | 556 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status
|
---|
[33] | 557 | Return SetStatus(GdipDrawCurve2I(nativeGraphics, pen->nativePen, points, count, tension))
|
---|
| 558 | End Function
|
---|
| 559 |
|
---|
[212] | 560 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, offset As Long, numberOfSegments As Long) As Status
|
---|
[33] | 561 | Return SetStatus(GdipDrawCurve3I(nativeGraphics, pen->nativePen, points, count, offset, numberOfSegments, 0.5))
|
---|
| 562 | End Function
|
---|
| 563 |
|
---|
[212] | 564 | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status
|
---|
[33] | 565 | Return SetStatus(GdipDrawCurve3I(nativeGraphics, pen->nativePen, points, count, offset, numberOfSegments, tension))
|
---|
| 566 | End Function
|
---|
| 567 |
|
---|
[212] | 568 | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 569 | Return SetStatus(GdipDrawClosedCurve(nativeGraphics, pen->nativePen, points, count))
|
---|
| 570 | End Function
|
---|
| 571 |
|
---|
[212] | 572 | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, tension As Single) As Status
|
---|
[33] | 573 | Return SetStatus(GdipDrawClosedCurve2(nativeGraphics, pen->nativePen, points, count, tension))
|
---|
| 574 | End Function
|
---|
| 575 |
|
---|
[212] | 576 | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 577 | Return SetStatus(GdipDrawClosedCurveI(nativeGraphics, pen->nativePen, points, count))
|
---|
| 578 | End Function
|
---|
| 579 |
|
---|
[212] | 580 | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status
|
---|
[33] | 581 | Return SetStatus(GdipDrawClosedCurve2I(nativeGraphics, pen->nativePen, points, count, tension))
|
---|
| 582 | End Function
|
---|
| 583 |
|
---|
[212] | 584 | Function Clear(color As /*Const*/ Color) As Status
|
---|
[33] | 585 | Return SetStatus(GdipGraphicsClear(nativeGraphics, color.Value))
|
---|
| 586 | End Function
|
---|
| 587 |
|
---|
[212] | 588 | Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status
|
---|
[33] | 589 | Return FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 590 | End Function
|
---|
| 591 |
|
---|
[212] | 592 | Function FillRectangle(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status
|
---|
[33] | 593 | Return SetStatus(GdipFillRectangle(nativeGraphics, brush->nativeBrush, x, y, width, height))
|
---|
| 594 | End Function
|
---|
| 595 |
|
---|
[212] | 596 | Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *RectangleF, count As Long) As Status
|
---|
[33] | 597 | Return SetStatus(GdipFillRectangles(nativeGraphics,brush->nativeBrush,rects, count))
|
---|
| 598 | End Function
|
---|
| 599 |
|
---|
[212] | 600 | Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status
|
---|
[33] | 601 | Return FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 602 | End Function
|
---|
| 603 |
|
---|
[212] | 604 | Function FillRectangle(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
|
---|
[33] | 605 | Return SetStatus(GdipFillRectangleI(nativeGraphics, brush->nativeBrush, x, y, width, height))
|
---|
| 606 | End Function
|
---|
| 607 |
|
---|
[212] | 608 | Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *Rectangle, count As Long) As Status
|
---|
[33] | 609 | Return SetStatus(GdipFillRectanglesI(nativeGraphics, brush->nativeBrush, rects, count))
|
---|
| 610 | End Function
|
---|
| 611 |
|
---|
[212] | 612 | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 613 | Return FillPolygon(brush, points, count, FillModeAlternate)
|
---|
| 614 | End Function
|
---|
| 615 |
|
---|
[212] | 616 | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode) As Status
|
---|
[33] | 617 | Return SetStatus(GdipFillPolygon(nativeGraphics, brush->nativeBrush, points, count, fillMode))
|
---|
| 618 | End Function
|
---|
| 619 |
|
---|
[212] | 620 | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 621 | Return FillPolygon(brush, points, count, FillModeAlternate)
|
---|
| 622 | End Function
|
---|
| 623 |
|
---|
[212] | 624 | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status
|
---|
[33] | 625 | Return SetStatus(GdipFillPolygonI(nativeGraphics, brush->nativeBrush, points, count, fillMode))
|
---|
| 626 | End Function
|
---|
| 627 |
|
---|
[212] | 628 | Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status
|
---|
[33] | 629 | Return FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 630 | End Function
|
---|
| 631 |
|
---|
[212] | 632 | Function FillEllipse(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status
|
---|
[33] | 633 | Return SetStatus(GdipFillEllipse(nativeGraphics, brush->nativeBrush, x, y, width, height))
|
---|
| 634 | End Function
|
---|
| 635 |
|
---|
[212] | 636 | Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status
|
---|
[33] | 637 | Return FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 638 | End Function
|
---|
| 639 |
|
---|
[212] | 640 | Function FillEllipse(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
|
---|
[33] | 641 | Return SetStatus(GdipFillEllipseI(nativeGraphics, brush->nativeBrush, x, y, width, height))
|
---|
| 642 | End Function
|
---|
| 643 |
|
---|
[212] | 644 | Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 645 | Return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
|
---|
| 646 | End Function
|
---|
| 647 |
|
---|
[212] | 648 | Function FillPie(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 649 | Return SetStatus(GdipFillPie(nativeGraphics, brush->nativeBrush, x, y, width, height, startAngle, sweepAngle))
|
---|
| 650 | End Function
|
---|
| 651 |
|
---|
[212] | 652 | Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 653 | Return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)
|
---|
| 654 | End Function
|
---|
| 655 |
|
---|
[212] | 656 | Function FillPie(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status
|
---|
[33] | 657 | Return SetStatus(GdipFillPieI(nativeGraphics, brush->nativeBrush, x, y, width, height, startAngle, sweepAngle))
|
---|
| 658 | End Function
|
---|
| 659 |
|
---|
[212] | 660 | Function FillPath(brush As /*Const*/ Brush, path As /*Const*/ GraphicsPath) As Status
|
---|
[33] | 661 | Return SetStatus(GdipFillPath(nativeGraphics, brush->nativeBrush, path->nativePath))
|
---|
| 662 | End Function
|
---|
| 663 |
|
---|
[212] | 664 | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long) As Status
|
---|
[33] | 665 | Return SetStatus(GdipFillClosedCurve(nativeGraphics, brush->nativeBrush, points, count))
|
---|
| 666 | End Function
|
---|
| 667 |
|
---|
[212] | 668 | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode) As Status
|
---|
[33] | 669 | Return SetStatus(GdipFillClosedCurve2(nativeGraphics, brush->nativeBrush, points, count, 0.5, fillMode))
|
---|
| 670 | End Function
|
---|
| 671 |
|
---|
[212] | 672 | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode, tension As Single) As Status
|
---|
[33] | 673 | Return SetStatus(GdipFillClosedCurve2(nativeGraphics, brush->nativeBrush, points, count, tension, fillMode))
|
---|
| 674 | End Function
|
---|
| 675 |
|
---|
[212] | 676 | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long) As Status
|
---|
[33] | 677 | Return SetStatus(GdipFillClosedCurveI(nativeGraphics, brush->nativeBrush, points, count))
|
---|
| 678 | End Function
|
---|
| 679 |
|
---|
[212] | 680 | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status
|
---|
[33] | 681 | Return SetStatus(GdipFillClosedCurve2I(nativeGraphics, brush->nativeBrush, points, count, 0.5, fillMode))
|
---|
| 682 | End Function
|
---|
| 683 |
|
---|
[212] | 684 | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode, tension As Single) As Status
|
---|
[33] | 685 | Return SetStatus(GdipFillClosedCurve2I(nativeGraphics, brush->nativeBrush, points, count, tension, fillMode))
|
---|
| 686 | End Function
|
---|
| 687 |
|
---|
[212] | 688 | Function FillRegion(brush As /*Const*/ Brush, region As /*Const*/ Region) As Status
|
---|
[33] | 689 | Return SetStatus(GdipFillRegion(nativeGraphics, brush->nativeBrush, region->nativeRegion))
|
---|
| 690 | End Function
|
---|
| 691 |
|
---|
[212] | 692 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF) As Status
|
---|
[33] | 693 | Dim nativeFont As *GpFont
|
---|
| 694 | If VarPtr(font) <> 0 Then
|
---|
| 695 | nativeFont = font.nativeFormat
|
---|
| 696 | Else
|
---|
| 697 | nativeFont = 0
|
---|
| 698 | End If
|
---|
| 699 | Return SetStatus(GdipDrawString( nativeGraphics, str, length, nativeFont, layoutRect, 0, 0))
|
---|
| 700 | End Function
|
---|
| 701 |
|
---|
[212] | 702 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ Rectangle,
|
---|
| 703 | stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
|
---|
[33] | 704 |
|
---|
| 705 | Dim nativeFont As *GpFont
|
---|
| 706 | If VarPtr(font) <> 0 Then
|
---|
| 707 | nativeFont = font.nativeFormat
|
---|
| 708 | Else
|
---|
| 709 | nativeFont = 0
|
---|
| 710 | End If
|
---|
| 711 | Dim nativeFormat As *GpStringFormat
|
---|
| 712 | If VarPtr(layoutRect) <> 0 Then
|
---|
| 713 | nativeFormat = layoutRect.nativeFormat
|
---|
| 714 | Else
|
---|
| 715 | nativeFormat = 0
|
---|
| 716 | End If
|
---|
[104] | 717 | Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, 0))
|
---|
[33] | 718 | End Function
|
---|
| 719 |
|
---|
[212] | 720 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
|
---|
| 721 | stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
|
---|
[33] | 722 |
|
---|
| 723 | Dim nativeFont As *GpFont
|
---|
| 724 | If VarPtr(font) <> 0 Then
|
---|
| 725 | nativeFont = font.nativeFormat
|
---|
| 726 | Else
|
---|
| 727 | nativeFont = 0
|
---|
| 728 | End If
|
---|
| 729 | Dim nativeFormat As *GpStringFormat
|
---|
| 730 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 731 | nativeFormat = stringFormat.nativeFormat
|
---|
| 732 | Else
|
---|
| 733 | nativeFormat = 0
|
---|
| 734 | End If
|
---|
| 735 | Dim nativeBrush As *GpBrush
|
---|
| 736 | If VarPtr(brush) <> 0 Then
|
---|
| 737 | nativeBrush = brush.nativeFormat
|
---|
| 738 | Else
|
---|
| 739 | nativeBrush = 0
|
---|
| 740 | End If
|
---|
| 741 | Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, nativeBrush))
|
---|
| 742 | End Function
|
---|
| 743 |
|
---|
[212] | 744 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ Point) As Status
|
---|
[33] | 745 | Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
|
---|
| 746 | Dim nativeFont As *GpFont
|
---|
| 747 | If VarPtr(font) <> 0 Then
|
---|
| 748 | nativeFont = font.nativeFormat
|
---|
| 749 | Else
|
---|
| 750 | nativeFont = 0
|
---|
| 751 | End If
|
---|
| 752 | Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, 0))
|
---|
| 753 | End Function
|
---|
| 754 |
|
---|
[212] | 755 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF,
|
---|
| 756 | brush As /*Const*/ Brush) As Status
|
---|
[33] | 757 |
|
---|
| 758 | Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
|
---|
| 759 | Dim nativeFont As *GpFont
|
---|
| 760 | If VarPtr(font) <> 0 Then
|
---|
| 761 | nativeFont = font.nativeFormat
|
---|
| 762 | Else
|
---|
| 763 | nativeFont = 0
|
---|
| 764 | End If
|
---|
| 765 | Dim nativeBrush As *GpBrush
|
---|
| 766 | If VarPtr(brush) <> 0 Then
|
---|
| 767 | nativeBrush = brush.nativeFormat
|
---|
| 768 | Else
|
---|
| 769 | nativeBrush = 0
|
---|
| 770 | End If
|
---|
| 771 | Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, nativeBrush))
|
---|
| 772 | End Function
|
---|
| 773 |
|
---|
[212] | 774 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF) As Status
|
---|
[33] | 775 | Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
|
---|
| 776 | Dim nativeFont As *GpFont
|
---|
| 777 | If VarPtr(font) <> 0 Then
|
---|
| 778 | nativeFont = font.nativeFormat
|
---|
| 779 | Else
|
---|
| 780 | nativeFont = 0
|
---|
| 781 | End If
|
---|
| 782 | Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, 0, 0))
|
---|
| 783 | End Function
|
---|
| 784 |
|
---|
[212] | 785 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF,
|
---|
| 786 | stringFormat As /*Const*/ StringFormat) As Status
|
---|
[33] | 787 |
|
---|
| 788 | Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
|
---|
| 789 | Dim nativeFont As *GpFont
|
---|
| 790 | If VarPtr(font) <> 0 Then
|
---|
| 791 | nativeFont = font.nativeFormat
|
---|
| 792 | Else
|
---|
| 793 | nativeFont = 0
|
---|
| 794 | End If
|
---|
| 795 | Dim nativeFormat As *GpStringFormat
|
---|
| 796 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 797 | nativeFormat = stringFormat.nativeFormat
|
---|
| 798 | Else
|
---|
| 799 | nativeFormat = 0
|
---|
| 800 | End If
|
---|
| 801 | Return SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, rect, nativeFormat, 0))
|
---|
| 802 | End Function
|
---|
| 803 |
|
---|
[212] | 804 | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF,
|
---|
| 805 | stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
|
---|
[33] | 806 |
|
---|
| 807 | Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
|
---|
| 808 | Dim nativeFont As *GpFont
|
---|
| 809 | If VarPtr(font) <> 0 Then
|
---|
| 810 | nativeFont = font.nativeFormat
|
---|
| 811 | Else
|
---|
| 812 | nativeFont = 0
|
---|
| 813 | End If
|
---|
| 814 | Dim nativeFormat As *GpStringFormat
|
---|
| 815 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 816 | nativeFormat = stringFormat.nativeFormat
|
---|
| 817 | Else
|
---|
| 818 | nativeFormat = 0
|
---|
| 819 | End If
|
---|
| 820 | If VarPtr(brush) <> 0 Then
|
---|
| 821 | nativeBrush = brush.nativeFormat
|
---|
| 822 | Else
|
---|
| 823 | nativeBrush = 0
|
---|
| 824 | End If
|
---|
| 825 | Return SetStatus(GdipDrawString( nativeGraphics, str, length, nativeFont, rect, nativeFormat, nativeBrush))
|
---|
| 826 | End Function
|
---|
| 827 |
|
---|
[212] | 828 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
|
---|
| 829 | stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF) As Status
|
---|
[33] | 830 |
|
---|
| 831 | Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, ByVal 0, ByVal 0)
|
---|
| 832 | End Function
|
---|
| 833 |
|
---|
[212] | 834 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
|
---|
| 835 | stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF,
|
---|
| 836 | codepointsFitted As Long) As Status
|
---|
[33] | 837 |
|
---|
| 838 | Return MeasureString(str, length, font, layoutRect, stringFormat, boundingBox, codepointsFitted, ByVal 0)
|
---|
| 839 | End Function
|
---|
| 840 |
|
---|
[212] | 841 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
|
---|
| 842 | stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF,
|
---|
| 843 | codepointsFitted As Long, linesFilled As Long) As Status
|
---|
[33] | 844 |
|
---|
| 845 | Dim nativeFont As *GpFont
|
---|
| 846 | If VarPtr(font) <> 0 Then
|
---|
| 847 | nativeFont = font.nativeFormat
|
---|
| 848 | Else
|
---|
| 849 | nativeFont = 0
|
---|
| 850 | End If
|
---|
| 851 | Dim nativeFormat As *GpStringFormat
|
---|
| 852 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 853 | nativeFormat = stringFormat.nativeFormat
|
---|
| 854 | Else
|
---|
| 855 | nativeFormat = 0
|
---|
| 856 | End If
|
---|
| 857 | Return SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat,
|
---|
| 858 | boundingBox, codepointsFitted, linesFilled))
|
---|
| 859 | End Function
|
---|
| 860 |
|
---|
[212] | 861 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 862 | layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat,
|
---|
| 863 | size As SizeF) As Status
|
---|
[33] | 864 |
|
---|
[104] | 865 | Return MeasureString(str, length, font, layoutRectSize, stringFormat, size, ByVal 0, ByVal 0)
|
---|
[33] | 866 | End Function
|
---|
| 867 |
|
---|
[212] | 868 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 869 | layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat,
|
---|
| 870 | size As SizeF, codepointsFitted As Long) As Status
|
---|
[33] | 871 |
|
---|
[104] | 872 | Return MeasureString(str, length, font, layoutRectSize, stringFormat, size, codepointsFitted, ByVal 0)
|
---|
[33] | 873 | End Function
|
---|
| 874 |
|
---|
[212] | 875 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 876 | layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat,
|
---|
| 877 | size As SizeF, codepointsFitted As Long, linesFilled As Long) As Status
|
---|
[33] | 878 |
|
---|
| 879 | Dim layoutRect As RectangleF(0, 0, layoutRectSize.Width, layoutRectSize.Height)
|
---|
| 880 | Dim boundingBox As RectangleF, pBoundingBox As *RectangleF
|
---|
| 881 | If VarPtr(size) <> 0 Then
|
---|
| 882 | pBoundingBox = VarPtr(boundingBox)
|
---|
| 883 | Else
|
---|
| 884 | pBoundingBox = 0
|
---|
| 885 | End If
|
---|
| 886 |
|
---|
| 887 | Dim nativeFont As *GpFont
|
---|
| 888 | If VarPtr(font) <> 0 Then
|
---|
| 889 | nativeFont = font.nativeFormat
|
---|
| 890 | Else
|
---|
| 891 | nativeFont = 0
|
---|
| 892 | End If
|
---|
| 893 | Dim nativeFormat As *GpStringFormat
|
---|
| 894 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 895 | nativeFormat = stringFormat.nativeFormat
|
---|
| 896 | Else
|
---|
| 897 | nativeFormat = 0
|
---|
| 898 | End If
|
---|
| 899 | Dim status = SetStatus(GdipMeasureString(nativeGraphics, str, length,
|
---|
| 900 | nativeFont, layoutRect, nativeFormat, pBoundingBox, codepointsFitted, linesFilled))
|
---|
| 901 |
|
---|
[104] | 902 | If VarPtr(size) <> 0 And status = Status.Ok Then
|
---|
[33] | 903 | size.Width = boundingBox.Width
|
---|
| 904 | size.Height = boundingBox.Height
|
---|
| 905 | End Function
|
---|
| 906 |
|
---|
| 907 | Return status
|
---|
| 908 | End Function
|
---|
| 909 |
|
---|
[212] | 910 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 911 | origin As /*Const*/ PointF, stringFormat As /*Const*/ StringFormat,
|
---|
| 912 | boundingBox As RectangleF) As Status
|
---|
[33] | 913 |
|
---|
| 914 | Dim rect As RectangleF(origin.X, origin.Y, 0.0f, 0.0f)
|
---|
| 915 | Dim nativeFont As *GpFont
|
---|
| 916 | If VarPtr(font) <> 0 Then
|
---|
| 917 | nativeFont = font.nativeFormat
|
---|
| 918 | Else
|
---|
| 919 | nativeFont = 0
|
---|
| 920 | End If
|
---|
| 921 | Dim nativeFormat As *GpStringFormat
|
---|
| 922 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 923 | nativeFormat = stringFormat.nativeFormat
|
---|
| 924 | Else
|
---|
| 925 | nativeFormat = 0
|
---|
| 926 | End If
|
---|
| 927 |
|
---|
| 928 | Return SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, rect, nativeFormat, boundingBox, 0, 0))
|
---|
| 929 | End Function
|
---|
| 930 |
|
---|
[212] | 931 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 932 | layoutRect As /*Const*/ RectangleF, boundingBox As RectangleF) As Status
|
---|
[33] | 933 |
|
---|
| 934 | Dim nativeFont As *GpFont
|
---|
| 935 | If VarPtr(font) <> 0 Then
|
---|
| 936 | nativeFont = font.nativeFormat
|
---|
| 937 | Else
|
---|
| 938 | nativeFont = 0
|
---|
| 939 | End If
|
---|
| 940 |
|
---|
| 941 | Return SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, layoutRect, 0, boundingBox, 0, 0))
|
---|
| 942 | End Function
|
---|
| 943 |
|
---|
[212] | 944 | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 945 | origin As /*Const*/ PointF, boundingBox As RectangleF) As Status
|
---|
[33] | 946 | Dim rect As RectangleF(origin.X, origin.Y, 0.0, 0.0)
|
---|
| 947 |
|
---|
| 948 | Dim nativeFont As *GpFont
|
---|
| 949 | If VarPtr(font) <> 0 Then
|
---|
| 950 | nativeFont = font.nativeFormat
|
---|
| 951 | Else
|
---|
| 952 | nativeFont = 0
|
---|
| 953 | End If
|
---|
| 954 | Return SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, rect, 0, boundingBox, 0, 0))
|
---|
| 955 | End Function
|
---|
| 956 |
|
---|
[212] | 957 | Const Function MeasureCharacterRanges(str As PCWSTR, length As Long, font As /*Const*/ Font,
|
---|
| 958 | layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat,
|
---|
[33] | 959 | regionCount As Long, regions As *Region) As Status
|
---|
| 960 | If regions = 0 Or regionCount <= 0 Then
|
---|
| 961 | Return InvalidParameter
|
---|
| 962 | End If
|
---|
| 963 |
|
---|
| 964 | Dim nativeRegions = _System_malloc(regionCount * SizeOf (GpRegion*)) As **GpRegion
|
---|
| 965 |
|
---|
| 966 | If nativeRegions = 0 Then
|
---|
| 967 | Return OutOfMemory
|
---|
| 968 | End If
|
---|
| 969 |
|
---|
| 970 | Dim i As Long
|
---|
| 971 | For i = 0 To regionCount
|
---|
| 972 | nativeRegions[i] = regions[i].nativeRegion
|
---|
| 973 | Next
|
---|
| 974 |
|
---|
| 975 | Dim nativeFont As *GpFont
|
---|
| 976 | If VarPtr(font) <> 0 Then
|
---|
| 977 | nativeFont = font.nativeFormat
|
---|
| 978 | Else
|
---|
| 979 | nativeFont = 0
|
---|
| 980 | End If
|
---|
| 981 | Dim nativeFormat As *GpStringFormat
|
---|
| 982 | If VarPtr(stringFormat) <> 0 Then
|
---|
| 983 | nativeFormat = stringFormat.nativeFormat
|
---|
| 984 | Else
|
---|
| 985 | nativeFormat = 0
|
---|
| 986 | End If
|
---|
| 987 |
|
---|
| 988 | Dim status = SetStatus(GdipMeasureCharacterRanges(nativeGraphics,
|
---|
| 989 | str, length, nativeFont, layoutRect, nativeFormat,regionCount, nativeRegions))
|
---|
| 990 | _System_free(nativeRegions)
|
---|
| 991 | Return status
|
---|
| 992 | End Function
|
---|
| 993 |
|
---|
[212] | 994 | Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font,
|
---|
| 995 | brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long) As Status
|
---|
[33] | 996 |
|
---|
| 997 | Return DrawDriverString(text, length, font, brush, positions, flags, ByVal 0)
|
---|
| 998 | End Function
|
---|
| 999 |
|
---|
[212] | 1000 | Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font,
|
---|
| 1001 | brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix) As Status
|
---|
[33] | 1002 |
|
---|
| 1003 | Dim nativeFont As *GpFont
|
---|
| 1004 | If VarPtr(font) <> 0 Then
|
---|
| 1005 | nativeFont = font.nativeFormat
|
---|
| 1006 | Else
|
---|
| 1007 | nativeFont = 0
|
---|
| 1008 | End If
|
---|
| 1009 | Dim nativeBrush As *GpBrush
|
---|
| 1010 | If VarPtr(brush) <> 0 Then
|
---|
| 1011 | nativeBrush = brush.nativeBrush
|
---|
| 1012 | Else
|
---|
| 1013 | nativeBrush = 0
|
---|
| 1014 | End If
|
---|
| 1015 | Dim nativeMatrix As *GpMatrix
|
---|
| 1016 | If VarPtr(matrix) <> 0 Then
|
---|
| 1017 | nativeMatrix = matrix.nativeMatrix
|
---|
| 1018 | Else
|
---|
| 1019 | nativeMatrix = 0
|
---|
| 1020 | End If
|
---|
| 1021 | Return SetStatus(GdipDrawDriverString(nativeGraphics, text, length, nativeFont, nativeBrush, positions, flags, nativeMatrix))
|
---|
| 1022 | End Function
|
---|
| 1023 |
|
---|
[212] | 1024 | Const Function MeasureDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font,
|
---|
| 1025 | positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix, boundingBox As RectangleF) As Status
|
---|
[33] | 1026 |
|
---|
| 1027 | Dim nativeFont As *GpFont
|
---|
| 1028 | If VarPtr(font) <> 0 Then
|
---|
| 1029 | nativeFont = font.nativeFormat
|
---|
| 1030 | Else
|
---|
| 1031 | nativeFont = 0
|
---|
| 1032 | End If
|
---|
| 1033 | Dim nativeMatrix As *GpMatrix
|
---|
| 1034 | If VarPtr(matrix) <> 0 Then
|
---|
| 1035 | nativeMatrix = matrix.nativeMatrix
|
---|
| 1036 | Else
|
---|
| 1037 | nativeMatrix = 0
|
---|
| 1038 | End If
|
---|
| 1039 | Return SetStatus(GdipMeasureDriverString(nativeGraphics, text, length, nativeFont, positions, flags, nativeMatrix, boundingBox))
|
---|
| 1040 | End Function
|
---|
| 1041 |
|
---|
| 1042 | ' Draw a cached bitmap on this graphics destination offset by
|
---|
| 1043 | ' x, y. Note this will fail with WrongState if the CachedBitmap
|
---|
| 1044 | ' native format differs from this Graphics.
|
---|
| 1045 |
|
---|
[212] | 1046 | Function DrawCachedBitmap(cb As CachedBitmap, x As Long, y As Long) As Status
|
---|
[33] | 1047 | Return SetStatus(GdipDrawCachedBitmap(nativeGraphics, cb->nativeCachedBitmap, x, y))
|
---|
| 1048 | End Function
|
---|
| 1049 |
|
---|
[212] | 1050 | Function DrawImage(image As Image, point As /*Const*/ PointF) As Status
|
---|
[33] | 1051 | Return DrawImage(image, point.X, point.Y)
|
---|
| 1052 | End Function
|
---|
| 1053 |
|
---|
[212] | 1054 | Function DrawImage(image As Image, x As Single, y As Single) As Status
|
---|
[33] | 1055 | Dim nativeImage As *GpImage
|
---|
| 1056 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1057 | nativeImage = image.NativeImage
|
---|
[33] | 1058 | Else
|
---|
| 1059 | nativeImage = 0
|
---|
| 1060 | End If
|
---|
| 1061 | Return SetStatus(GdipDrawImage(nativeGraphics, nativeImage, x, y))
|
---|
| 1062 | End Function
|
---|
| 1063 |
|
---|
[212] | 1064 | Function DrawImage(image As Image, rect As /*Const*/ RectangleF) As Status
|
---|
[33] | 1065 | Return DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 1066 | End Function
|
---|
| 1067 |
|
---|
[212] | 1068 | Function DrawImage(image As Image, x As Single, y As Single, width As Single, height As Single) As Status
|
---|
[33] | 1069 | Dim nativeImage As *GpImage
|
---|
| 1070 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1071 | nativeImage = image.NativeImage
|
---|
[33] | 1072 | Else
|
---|
| 1073 | nativeImage = 0
|
---|
| 1074 | End If
|
---|
| 1075 | Return SetStatus(GdipDrawImageRect(nativeGraphics, nativeImage, x, y, width, height))
|
---|
| 1076 | End Function
|
---|
| 1077 |
|
---|
[212] | 1078 | Function DrawImage(image As Image, point As /*Const*/ Point) As Status
|
---|
[33] | 1079 | Return DrawImage(image, point.X, point.Y) As Status
|
---|
| 1080 | End Function
|
---|
| 1081 |
|
---|
[212] | 1082 | Function DrawImage(image As Image, x As Long, y As Long) As Status
|
---|
[33] | 1083 | Dim nativeImage As *GpImage
|
---|
| 1084 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1085 | nativeImage = image.NativeImage
|
---|
[33] | 1086 | Else
|
---|
| 1087 | nativeImage = 0
|
---|
| 1088 | End If
|
---|
| 1089 | Return SetStatus(GdipDrawImageI(nativeGraphics, nativeImage, x, y))
|
---|
| 1090 | End Function
|
---|
| 1091 |
|
---|
[212] | 1092 | Function DrawImage(image As Image, rect As /*Const*/ Rectangle) As Status
|
---|
[33] | 1093 | Return DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height)
|
---|
| 1094 | End Function
|
---|
| 1095 |
|
---|
[212] | 1096 | Function DrawImage(image As Image, x As Long, y As Long, width As Long, height As Long) As Status
|
---|
[33] | 1097 | Dim nativeImage As *GpImage
|
---|
| 1098 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1099 | nativeImage = image.NativeImage
|
---|
[33] | 1100 | Else
|
---|
| 1101 | nativeImage = 0
|
---|
| 1102 | End If
|
---|
| 1103 | Return SetStatus(GdipDrawImageRectI(nativeGraphics, nativeImage, x, y, width, height))
|
---|
| 1104 | End Function
|
---|
| 1105 |
|
---|
| 1106 | ' Affine Draw Image
|
---|
| 1107 | ' destPoints.length = 3: rect => parallelogram
|
---|
| 1108 | ' destPoints[0] <=> top-left corner of the source rectangle
|
---|
| 1109 | ' destPoints[1] <=> top-right corner
|
---|
| 1110 | ' destPoints[2] <=> bottom-left corner
|
---|
| 1111 | ' destPoints.length = 4: rect => quad
|
---|
| 1112 | ' destPoints[3] <=> bottom-right corner
|
---|
| 1113 |
|
---|
[212] | 1114 | Function DrawImage(image As Image, destPoints As /*Const*/ PointF, count As Long) As Status
|
---|
[33] | 1115 | If count <> 3 And count <> 4 Then
|
---|
| 1116 | Return SetStatus(InvalidParameter)
|
---|
| 1117 | End If
|
---|
| 1118 |
|
---|
| 1119 | Dim nativeImage As *GpImage
|
---|
| 1120 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1121 | nativeImage = image.NativeImage
|
---|
[33] | 1122 | Else
|
---|
| 1123 | nativeImage = 0
|
---|
| 1124 | End If
|
---|
| 1125 | Return SetStatus(GdipDrawImagePoints(nativeGraphics, nativeImage, destPoints, count))
|
---|
| 1126 | End Function
|
---|
| 1127 |
|
---|
[212] | 1128 | Function DrawImage(image As Image, destPoints As /*Const*/ Point, count As Long) As Status
|
---|
[33] | 1129 | If count <> 3 And count <> 4 Then
|
---|
| 1130 | Return SetStatus(InvalidParameter)
|
---|
| 1131 | End If
|
---|
| 1132 |
|
---|
| 1133 | Dim nativeImage As *GpImage
|
---|
| 1134 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1135 | nativeImage = image.NativeImage
|
---|
[33] | 1136 | Else
|
---|
| 1137 | nativeImage = 0
|
---|
| 1138 | End If
|
---|
| 1139 | Return SetStatus(GdipDrawImagePointsI(nativeGraphics, nativeImage, destPoints, count))
|
---|
| 1140 | End Function
|
---|
| 1141 |
|
---|
[212] | 1142 | Function DrawImage(image As Image, x As Single, y As Single,
|
---|
[33] | 1143 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit) As Status
|
---|
| 1144 |
|
---|
| 1145 | Dim nativeImage As *GpImage
|
---|
| 1146 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1147 | nativeImage = image.NativeImage
|
---|
[33] | 1148 | Else
|
---|
| 1149 | nativeImage = 0
|
---|
| 1150 | End If
|
---|
| 1151 | Return SetStatus(GdipDrawImagePointRect(nativeGraphics, nativeImage, x, y, srcx, srcy, srcwidth, srcheight, srcUnit))
|
---|
| 1152 | End Function
|
---|
| 1153 |
|
---|
[212] | 1154 | Function DrawImage(image As Image, destRect As /*Const*/ RectangleF,
|
---|
[33] | 1155 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit) As Status
|
---|
| 1156 |
|
---|
| 1157 | Return DrawImage(image, destRect, srcx, srcy, srcwidth, srcheight, srcUnit, 0, 0, 0)
|
---|
| 1158 | End Function
|
---|
| 1159 |
|
---|
[212] | 1160 | Function DrawImage(image As Image, destRect As /*Const*/ RectangleF,
|
---|
[33] | 1161 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1162 | imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1163 |
|
---|
| 1164 | Return DrawImage(image, destRect, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, 0, 0)
|
---|
| 1165 | End Function
|
---|
| 1166 |
|
---|
[212] | 1167 | Function DrawImage(image As Image, destRect As /*Const*/ RectangleF,
|
---|
[33] | 1168 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1169 | imageAttributes As /*Const*/ ImageAttributes,
|
---|
[33] | 1170 | callback As DrawImageAbort) As Status
|
---|
| 1171 |
|
---|
| 1172 | Return DrawImage(image, destRect, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, 0)
|
---|
| 1173 | End Function
|
---|
| 1174 |
|
---|
[212] | 1175 | Function DrawImage(image As Image, destRect As /*Const*/ RectangleF,
|
---|
[33] | 1176 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1177 | imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort, callbackData As VoidPtr) As Status
|
---|
[33] | 1178 |
|
---|
| 1179 | Dim nativeImage As *GpImage
|
---|
| 1180 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1181 | nativeImage = image.NativeImage
|
---|
[33] | 1182 | Else
|
---|
| 1183 | nativeImage = 0
|
---|
| 1184 | End If
|
---|
| 1185 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1186 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1187 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1188 | Else
|
---|
| 1189 | nativeImageAttr = 0
|
---|
| 1190 | End If
|
---|
| 1191 |
|
---|
| 1192 | Return SetStatus(GdipDrawImageRectRect(nativeGraphics, nativeImageAttr,
|
---|
| 1193 | destRect.X, destRect.Y, destRect.Width, destRect.Height, srcx, srcy, srcwidth, srcheight,
|
---|
| 1194 | srcUnit, nativeImageAttr, callback, callbackData))
|
---|
| 1195 | End Function
|
---|
| 1196 |
|
---|
[212] | 1197 | Function DrawImage(image As Image, destPoints As /*Const*/ PointF, count As Long,
|
---|
[33] | 1198 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit) As Status
|
---|
| 1199 |
|
---|
| 1200 | Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, 0, 0, 0)
|
---|
| 1201 | End Function
|
---|
| 1202 |
|
---|
[212] | 1203 | Function DrawImage(image As Image, destPoints As /*Const*/ PointF, count As Long,
|
---|
[33] | 1204 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1205 | imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1206 |
|
---|
| 1207 | Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, 0, 0)
|
---|
| 1208 | End Function
|
---|
| 1209 |
|
---|
[212] | 1210 | Function DrawImage(image As Image, destPoints As /*Const*/ PointF, count As Long,
|
---|
[33] | 1211 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1212 | imageAttributes As /*Const*/ ImageAttributes,
|
---|
[33] | 1213 | callback As DrawImageAbort) As Status
|
---|
| 1214 |
|
---|
| 1215 | Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, 0)
|
---|
| 1216 | End Function
|
---|
| 1217 |
|
---|
[212] | 1218 | Function DrawImage(image As Image, destPoints As /*Const*/ PointF, count As Long,
|
---|
[33] | 1219 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1220 | imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort, callbackData As VoidPtr) As Status
|
---|
[33] | 1221 |
|
---|
| 1222 | Dim nativeImage As *GpImage
|
---|
| 1223 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1224 | nativeImage = image.NativeImage
|
---|
[33] | 1225 | Else
|
---|
| 1226 | nativeImage = 0
|
---|
| 1227 | End If
|
---|
| 1228 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1229 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1230 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1231 | Else
|
---|
| 1232 | nativeImageAttr = 0
|
---|
| 1233 | End If
|
---|
| 1234 |
|
---|
| 1235 | Return SetStatus(GdipDrawImagePointsRect(nativeGraphics, nativeImage, destPoints, count,
|
---|
| 1236 | srcx, srcy, srcwidth, srcheight, srcUnit, nativeImageAttr, callback, callbackData))
|
---|
| 1237 | End Function
|
---|
| 1238 |
|
---|
[212] | 1239 | Function DrawImage(image As Image, x As Long, y As Long,
|
---|
[33] | 1240 | srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit) As Status
|
---|
| 1241 |
|
---|
| 1242 | Dim nativeImage As *GpImage
|
---|
| 1243 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1244 | nativeImage = image.NativeImage
|
---|
[33] | 1245 | Else
|
---|
| 1246 | nativeImage = 0
|
---|
| 1247 | End If
|
---|
| 1248 | Return SetStatus(GdipDrawImagePointRectI(nativeGraphics, nativeImage, x, y, srcx, srcy, srcwidth, srcheight, srcUnit))
|
---|
| 1249 | End Function
|
---|
| 1250 |
|
---|
[212] | 1251 | Function DrawImage(image As Image, destRect As /*Const*/ Rectangle,
|
---|
[33] | 1252 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit) As Status
|
---|
| 1253 |
|
---|
| 1254 | Return DrawImage(image, destRect, srcx, srcy, srcwidth, srcheight, srcUnit, 0, 0, 0)
|
---|
| 1255 | End Function
|
---|
| 1256 |
|
---|
[212] | 1257 | Function DrawImage(image As Image, destRect As /*Const*/ Rectangle,
|
---|
[33] | 1258 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1259 | imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1260 |
|
---|
| 1261 | Return DrawImage(image, destRect, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, 0, 0)
|
---|
| 1262 | End Function
|
---|
| 1263 |
|
---|
[212] | 1264 | Function DrawImage(image As Image, destRect As /*Const*/ Rectangle,
|
---|
[33] | 1265 | srcx As Single, srcy As Single, srcwidth As Single, srcheight As Single, srcUnit As GraphicsUnit,
|
---|
[212] | 1266 | imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort) As Status
|
---|
[33] | 1267 |
|
---|
| 1268 | Return DrawImage(image, destRect, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, 0)
|
---|
| 1269 | End Function
|
---|
| 1270 |
|
---|
[212] | 1271 | Function DrawImage(image As Image, destRect As /*Const*/ Rectangle,
|
---|
[33] | 1272 | srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit,
|
---|
[212] | 1273 | imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort, callbackData As VoidPtr) As Status
|
---|
[33] | 1274 |
|
---|
| 1275 | Dim nativeImage As *GpImage
|
---|
| 1276 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1277 | nativeImage = image.NativeImage
|
---|
[33] | 1278 | Else
|
---|
| 1279 | nativeImage = 0
|
---|
| 1280 | End If
|
---|
| 1281 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1282 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1283 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1284 | Else
|
---|
| 1285 | nativeImageAttr = 0
|
---|
| 1286 | End If
|
---|
| 1287 |
|
---|
| 1288 | Return SetStatus(GdipDrawImageRectRectI(nativeGraphics, nativeImage,
|
---|
| 1289 | destRect.X, destRect.Y, destRect.Width, destRect.Height,
|
---|
| 1290 | srcx, srcy, srcwidth, srcheight, srcUnit, nativeImageAttr, callback, callbackData))
|
---|
| 1291 | End Function
|
---|
| 1292 |
|
---|
[212] | 1293 | Function DrawImage(image As Image, destPoints As /*Const*/ Point, count As Long,
|
---|
[33] | 1294 | srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit) As Status
|
---|
| 1295 |
|
---|
| 1296 | Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, 0, 0, 0)
|
---|
| 1297 | End Function
|
---|
| 1298 |
|
---|
[212] | 1299 | Function DrawImage(image As Image, destPoints As /*Const*/ Point, count As Long,
|
---|
[33] | 1300 | srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit,
|
---|
[212] | 1301 | imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1302 |
|
---|
| 1303 | Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, 0, 0)
|
---|
| 1304 | End Function
|
---|
| 1305 |
|
---|
[212] | 1306 | Function DrawImage(image As Image, destPoints As /*Const*/ Point, count As Long, _
|
---|
[104] | 1307 | srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit, _
|
---|
[212] | 1308 | imageAttributes As /*Const*/ ImageAttributes,
|
---|
[104] | 1309 | callback As DrawImageAbort) As Status
|
---|
[33] | 1310 |
|
---|
| 1311 | Return DrawImage(image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, 0)
|
---|
| 1312 | End Function
|
---|
| 1313 |
|
---|
[212] | 1314 | Function DrawImage(image As Image, destPoints As /*Const*/ Point, count As Long,
|
---|
[33] | 1315 | srcx As Long, srcy As Long, srcwidth As Long, srcheight As Long, srcUnit As GraphicsUnit,
|
---|
[212] | 1316 | imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort, callbackData As VoidPtr) As Status
|
---|
[33] | 1317 |
|
---|
| 1318 | Dim nativeImage As *GpImage
|
---|
| 1319 | If VarPtr(image) <> 0 Then
|
---|
[104] | 1320 | nativeImage = image.NativeImage
|
---|
[33] | 1321 | Else
|
---|
| 1322 | nativeImage = 0
|
---|
| 1323 | End If
|
---|
| 1324 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1325 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1326 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1327 | Else
|
---|
| 1328 | nativeImageAttr = 0
|
---|
| 1329 | End If
|
---|
| 1330 |
|
---|
| 1331 | Return SetStatus(GdipDrawImagePointsRectI(nativeGraphics, nativeImage, destPoints, count,
|
---|
| 1332 | srcx, srcy, srcwidth, srcheight, srcUnit, nativeImageAttr, callback, callbackData))
|
---|
| 1333 | End Function
|
---|
| 1334 |
|
---|
[212] | 1335 | Function DrawImage(image As Image, destPoints As /*Const*/ *Point, count As Long, srcRect As Rectangle, srcUnit As GraphicsUnit) As Status
|
---|
[33] | 1336 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit)
|
---|
| 1337 | End Function
|
---|
| 1338 |
|
---|
[212] | 1339 | Function DrawImage(image As Image, destPoints As /*Const*/ *PointF, count As Long, srcRect As RectangleF, srcUnit As GraphicsUnit) As Status
|
---|
[33] | 1340 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit)
|
---|
| 1341 | End Function
|
---|
| 1342 |
|
---|
[212] | 1343 | Function DrawImage(image As Image, x As Long, y As Long, srcRect As Rectangle, srcUnit As GraphicsUnit) As Status
|
---|
[33] | 1344 | Return DrawImage(image, x, y, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit)
|
---|
| 1345 | End Function
|
---|
| 1346 |
|
---|
[212] | 1347 | Function DrawImage(image As Image, x As Single, y As Single, srcRect As RectangleF, srcUnit As GraphicsUnit) As Status
|
---|
[33] | 1348 | Return DrawImage(image, x, y, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit)
|
---|
| 1349 | End Function
|
---|
| 1350 |
|
---|
[212] | 1351 | Function DrawImage(image As Image, destPoints As /*Const*/ *Point, count As Long, srcRect As Rectangle, srcUnit As GraphicsUnit, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1352 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttributes)
|
---|
| 1353 | End Function
|
---|
| 1354 |
|
---|
[212] | 1355 | Function DrawImage(image As Image, destPoints As /*Const*/ *PointF, count As Long, srcRect As RectangleF, srcUnit As GraphicsUnit, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1356 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttributes)
|
---|
| 1357 | End Function
|
---|
| 1358 |
|
---|
[212] | 1359 | Function DrawImage(image As Image, destPoints As /*Const*/ *Point, count As Long, srcRect As Rectangle, srcUnit As GraphicsUnit, imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort) As Status
|
---|
[33] | 1360 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttributes, callback)
|
---|
| 1361 | End Function
|
---|
| 1362 |
|
---|
[212] | 1363 | Function DrawImage(image As Image, destPoints As /*Const*/ *PointF, count As Long, srcRect As RectangleF, srcUnit As GraphicsUnit, imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort) As Status
|
---|
[33] | 1364 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttributes, callback)
|
---|
| 1365 | End Function
|
---|
| 1366 |
|
---|
[212] | 1367 | Function DrawImage(image As Image, destPoints As /*Const*/ *Point, count As Long, srcRect As Rectangle, srcUnit As GraphicsUnit, imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort, callbackData As VoidPtr) As Status
|
---|
[33] | 1368 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttributes, callback, callbackData)
|
---|
| 1369 | End Function
|
---|
| 1370 |
|
---|
[212] | 1371 | Function DrawImage(image As Image, destPoints As /*Const*/ *PointF, count As Long, srcRect As RectangleF, srcUnit As GraphicsUnit, imageAttributes As /*Const*/ ImageAttributes, callback As DrawImageAbort, callbackData As VoidPtr) As Status
|
---|
[33] | 1372 | Return DrawImage(image, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, srcUnit, imageAttributes, callback, callbackData)
|
---|
| 1373 | End Function
|
---|
| 1374 |
|
---|
| 1375 | ' The following methods are for playing an EMF+ to a graphics
|
---|
| 1376 | ' via the enumeration interface. Each record of the EMF+ is
|
---|
| 1377 | ' sent to the callback (along with the callbackData). Then
|
---|
| 1378 | ' the callback can invoke the Metafile::PlayRecord method
|
---|
| 1379 | ' to play the particular record.
|
---|
| 1380 |
|
---|
[212] | 1381 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoint As /*Const*/ PointF,
|
---|
[33] | 1382 | callback As EnumerateMetafileProc) As Status
|
---|
| 1383 |
|
---|
| 1384 | Return EnumerateMetafile(metafile, destPoint, callback, 0, 0)
|
---|
| 1385 | End Function
|
---|
| 1386 |
|
---|
[212] | 1387 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoint As /*Const*/ PointF,
|
---|
[33] | 1388 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1389 |
|
---|
| 1390 | Return EnumerateMetafile(metafile, destPoint, callback, callbackData, 0)
|
---|
| 1391 | End Function
|
---|
| 1392 |
|
---|
[212] | 1393 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoint As /*Const*/ PointF,
|
---|
| 1394 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1395 |
|
---|
| 1396 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1397 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1398 | nativeImage = metafile.NativeImage
|
---|
[33] | 1399 | Else
|
---|
| 1400 | nativeImage = 0
|
---|
| 1401 | End If
|
---|
| 1402 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1403 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1404 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1405 | Else
|
---|
| 1406 | nativeImageAttr = 0
|
---|
| 1407 | End If
|
---|
| 1408 |
|
---|
| 1409 | Return SetStatus(GdipEnumerateMetafileDestPoint(nativeGraphics,
|
---|
| 1410 | nativeImage, destPoint, callback, callbackData,nativeImageAttr))
|
---|
| 1411 | End Function
|
---|
| 1412 |
|
---|
[212] | 1413 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoint As /*Const*/ Point,
|
---|
[33] | 1414 | callback As EnumerateMetafileProc) As Status
|
---|
| 1415 |
|
---|
| 1416 | Return EnumerateMetafile(metafile, destPoint, callback, 0, 0)
|
---|
| 1417 | End Function
|
---|
| 1418 |
|
---|
[212] | 1419 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoint As /*Const*/ Point,
|
---|
[33] | 1420 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1421 |
|
---|
| 1422 | Return EnumerateMetafile(metafile, destPoint, callback, callbackData, 0)
|
---|
| 1423 | End Function
|
---|
| 1424 |
|
---|
[212] | 1425 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoint As /*Const*/ Point,
|
---|
| 1426 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1427 |
|
---|
| 1428 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1429 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1430 | nativeImage = metafile.NativeImage
|
---|
[33] | 1431 | Else
|
---|
| 1432 | nativeImage = 0
|
---|
| 1433 | End If
|
---|
| 1434 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1435 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1436 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1437 | Else
|
---|
| 1438 | nativeImageAttr = 0
|
---|
| 1439 | End If
|
---|
| 1440 |
|
---|
| 1441 | Return SetStatus(GdipEnumerateMetafileDestPointI(nativeGraphics,
|
---|
| 1442 | nativeImage, destPoint, callback, callbackData,nativeImageAttr))
|
---|
| 1443 | End Function
|
---|
| 1444 |
|
---|
[212] | 1445 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destRect As /*Const*/ RectangleF,
|
---|
[33] | 1446 | callback As EnumerateMetafileProc) As Status
|
---|
| 1447 |
|
---|
| 1448 | Return EnumerateMetafile(metafile, destRect, callback, 0, 0)
|
---|
| 1449 | End Function
|
---|
| 1450 |
|
---|
[212] | 1451 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destRect As /*Const*/ RectangleF,
|
---|
[33] | 1452 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1453 |
|
---|
| 1454 | Return EnumerateMetafile(metafile, destRect, callback, callbackData, 0)
|
---|
| 1455 | End Function
|
---|
| 1456 |
|
---|
[212] | 1457 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destRect As /*Const*/ RectangleF,
|
---|
| 1458 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1459 |
|
---|
| 1460 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1461 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1462 | nativeImage = metafile.NativeImage
|
---|
[33] | 1463 | Else
|
---|
| 1464 | nativeImage = 0
|
---|
| 1465 | End If
|
---|
| 1466 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1467 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1468 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1469 | Else
|
---|
| 1470 | nativeImageAttr = 0
|
---|
| 1471 | End If
|
---|
| 1472 |
|
---|
| 1473 | Return SetStatus(GdipEnumerateMetafileDestRect(nativeGraphics,
|
---|
| 1474 | nativeImage, destRect, callback, callbackData, nativeImageAttr))
|
---|
| 1475 | End Function
|
---|
| 1476 |
|
---|
[212] | 1477 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destRect As /*Const*/ Rectangle,
|
---|
[33] | 1478 | callback As EnumerateMetafileProc) As Status
|
---|
| 1479 |
|
---|
| 1480 | Return EnumerateMetafile(metafile, destRect, callback, 0, 0)
|
---|
| 1481 | End Function
|
---|
| 1482 |
|
---|
[212] | 1483 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destRect As /*Const*/ Rectangle,
|
---|
[33] | 1484 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1485 |
|
---|
| 1486 | Return EnumerateMetafile(metafile, destRect, callback, callbackData, 0)
|
---|
| 1487 | End Function
|
---|
| 1488 |
|
---|
[212] | 1489 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destRect As /*Const*/ Rectangle,
|
---|
| 1490 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1491 |
|
---|
| 1492 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1493 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1494 | nativeImage = metafile.NativeImage
|
---|
[33] | 1495 | Else
|
---|
| 1496 | nativeImage = 0
|
---|
| 1497 | End If
|
---|
| 1498 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1499 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1500 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1501 | Else
|
---|
| 1502 | nativeImageAttr = 0
|
---|
| 1503 | End If
|
---|
| 1504 |
|
---|
| 1505 | Return SetStatus(GdipEnumerateMetafileDestRectI(nativeGraphics,
|
---|
| 1506 | nativeImage, destRect, callback, callbackData, nativeImageAttr))
|
---|
| 1507 | End Function
|
---|
| 1508 |
|
---|
[212] | 1509 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoints As /*Const*/ *PointF, count As Long,
|
---|
[33] | 1510 | callback As EnumerateMetafileProc) As Status
|
---|
| 1511 |
|
---|
| 1512 | Return EnumerateMetafile(metafile, destPoints, count, callback, 0, 0)
|
---|
| 1513 | End Function
|
---|
| 1514 |
|
---|
[212] | 1515 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoints As /*Const*/ *PointF, count As Long,
|
---|
[33] | 1516 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1517 |
|
---|
| 1518 | Return EnumerateMetafile(metafile, destPoints, count, callback, callbackData, 0)
|
---|
| 1519 | End Function
|
---|
| 1520 |
|
---|
[212] | 1521 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoints As /*Const*/ *PointF, count As Long,
|
---|
| 1522 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1523 |
|
---|
| 1524 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1525 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1526 | nativeImage = metafile.NativeImage
|
---|
[33] | 1527 | Else
|
---|
| 1528 | nativeImage = 0
|
---|
| 1529 | End If
|
---|
| 1530 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1531 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1532 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1533 | Else
|
---|
| 1534 | nativeImageAttr = 0
|
---|
| 1535 | End If
|
---|
| 1536 |
|
---|
| 1537 | Return SetStatus(GdipEnumerateMetafileDestPoints(nativeGraphics,
|
---|
| 1538 | nativeImage,destPoints, count, callback, callbackData, nativeImageAttr))
|
---|
| 1539 | End Function
|
---|
| 1540 |
|
---|
[212] | 1541 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoints As /*Const*/ *Point, count As Long,
|
---|
[33] | 1542 | callback As EnumerateMetafileProc) As Status
|
---|
| 1543 |
|
---|
| 1544 | Return EnumerateMetafile(metafile, destPoints, count, callback, 0, 0)
|
---|
| 1545 | End Function
|
---|
| 1546 |
|
---|
[212] | 1547 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoints As /*Const*/ *Point, count As Long,
|
---|
[33] | 1548 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1549 |
|
---|
| 1550 | Return EnumerateMetafile(metafile, destPoints, count, callback, callbackData, 0)
|
---|
| 1551 | End Function
|
---|
| 1552 |
|
---|
[212] | 1553 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, destPoints As /*Const*/ *Point, count As Long,
|
---|
| 1554 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1555 |
|
---|
| 1556 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1557 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1558 | nativeImage = metafile.NativeImage
|
---|
[33] | 1559 | Else
|
---|
| 1560 | nativeImage = 0
|
---|
| 1561 | End If
|
---|
| 1562 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1563 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1564 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1565 | Else
|
---|
| 1566 | nativeImageAttr = 0
|
---|
| 1567 | End If
|
---|
| 1568 |
|
---|
| 1569 | Return SetStatus(GdipEnumerateMetafileDestPointsI(nativeGraphics,
|
---|
| 1570 | nativeImage,destPoints, count, callback, callbackData, nativeImageAttr))
|
---|
| 1571 | End Function
|
---|
| 1572 |
|
---|
[212] | 1573 | Function EnumerateMetafile(metafile As /*Const*/ Metafile,
|
---|
| 1574 | destPoint As /*Const*/ PointF, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
|
---|
[33] | 1575 | callback As EnumerateMetafileProc) As Status
|
---|
| 1576 |
|
---|
| 1577 | Return EnumerateMetafile(metafile, destPoint, count, srcUnit, callback, 0, 0)
|
---|
| 1578 | End Function
|
---|
| 1579 |
|
---|
[212] | 1580 | Function EnumerateMetafile(metafile As /*Const*/ Metafile,
|
---|
| 1581 | destPoint As /*Const*/ PointF, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
|
---|
[33] | 1582 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1583 |
|
---|
| 1584 | Return EnumerateMetafile(metafile, destPoint, srcRect, srcUnit, callback, callbackData, 0)
|
---|
| 1585 | End Function
|
---|
| 1586 |
|
---|
[212] | 1587 | Function EnumerateMetafile(metafile As /*Const*/ Metafile,
|
---|
| 1588 | destPoint As /*Const*/ PointF, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit,
|
---|
| 1589 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1590 |
|
---|
| 1591 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1592 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1593 | nativeImage = metafile.NativeImage
|
---|
[33] | 1594 | Else
|
---|
| 1595 | nativeImage = 0
|
---|
| 1596 | End If
|
---|
| 1597 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1598 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1599 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1600 | Else
|
---|
| 1601 | nativeImageAttr = 0
|
---|
| 1602 | End If
|
---|
| 1603 |
|
---|
[104] | 1604 | Return SetStatus(GdipEnumerateMetafileSrcRectDestPoint(nativeGraphics, _
|
---|
| 1605 | nativeImage, destPoint, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
|
---|
[33] | 1606 | End Function
|
---|
| 1607 |
|
---|
[212] | 1608 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1609 | destPoint As /*Const*/ Point, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
[33] | 1610 | callback As EnumerateMetafileProc) As Status
|
---|
| 1611 |
|
---|
| 1612 | Return EnumerateMetafile(metafile, destPoint, count, srcUnit, callback, 0, 0)
|
---|
| 1613 | End Function
|
---|
| 1614 |
|
---|
[212] | 1615 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1616 | destPoint As /*Const*/ Point, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
[33] | 1617 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1618 |
|
---|
| 1619 | Return EnumerateMetafile(metafile, destPoint, srcRect, srcUnit, callback, callbackData, 0)
|
---|
| 1620 | End Function
|
---|
| 1621 |
|
---|
[212] | 1622 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1623 | destPoint As /*Const*/ Point, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
| 1624 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1625 |
|
---|
| 1626 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1627 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1628 | nativeImage = metafile.NativeImage
|
---|
[33] | 1629 | Else
|
---|
| 1630 | nativeImage = 0
|
---|
| 1631 | End If
|
---|
| 1632 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1633 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1634 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1635 | Else
|
---|
| 1636 | nativeImageAttr = 0
|
---|
| 1637 | End If
|
---|
| 1638 |
|
---|
[104] | 1639 | Return SetStatus(GdipEnumerateMetafileSrcRectDestPointI(nativeGraphics, _
|
---|
| 1640 | nativeImage, destPoint, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
|
---|
[33] | 1641 | End Function
|
---|
| 1642 |
|
---|
[212] | 1643 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1644 | destRect As /*Const*/ RectangleF, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
|
---|
[33] | 1645 | callback As EnumerateMetafileProc) As Status
|
---|
| 1646 |
|
---|
| 1647 | Return EnumerateMetafile(metafile, destRect, count, srcUnit, callback, 0, 0)
|
---|
| 1648 | End Function
|
---|
| 1649 |
|
---|
[212] | 1650 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1651 | destRect As /*Const*/ RectangleF, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
|
---|
[33] | 1652 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1653 |
|
---|
| 1654 | Return EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, callbackData, 0)
|
---|
| 1655 | End Function
|
---|
| 1656 |
|
---|
[212] | 1657 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1658 | destRect As /*Const*/ RectangleF, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
|
---|
| 1659 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1660 |
|
---|
| 1661 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1662 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1663 | nativeImage = metafile.NativeImage
|
---|
[33] | 1664 | Else
|
---|
| 1665 | nativeImage = 0
|
---|
| 1666 | End If
|
---|
| 1667 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1668 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1669 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1670 | Else
|
---|
| 1671 | nativeImageAttr = 0
|
---|
| 1672 | End If
|
---|
| 1673 |
|
---|
[104] | 1674 | Return SetStatus(GdipEnumerateMetafileSrcRectDestRect(nativeGraphics, _
|
---|
[33] | 1675 | nativeImage, destRect, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
|
---|
| 1676 | End Function
|
---|
| 1677 |
|
---|
[212] | 1678 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1679 | destRect As /*Const*/ Rectangle, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
[33] | 1680 | callback As EnumerateMetafileProc) As Status
|
---|
| 1681 |
|
---|
| 1682 | Return EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, 0, 0)
|
---|
| 1683 | End Function
|
---|
| 1684 |
|
---|
[212] | 1685 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1686 | destRect As /*Const*/ Rectangle, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
[33] | 1687 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1688 |
|
---|
| 1689 | Return EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, callbackData, 0)
|
---|
| 1690 | End Function
|
---|
| 1691 |
|
---|
[212] | 1692 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1693 | destRect As /*Const*/ Rectangle, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
| 1694 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1695 |
|
---|
| 1696 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1697 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1698 | nativeImage = metafile.NativeImage
|
---|
[33] | 1699 | Else
|
---|
| 1700 | nativeImage = 0
|
---|
| 1701 | End If
|
---|
| 1702 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1703 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1704 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1705 | Else
|
---|
| 1706 | nativeImageAttr = 0
|
---|
| 1707 | End If
|
---|
| 1708 |
|
---|
[104] | 1709 | Return SetStatus(GdipEnumerateMetafileSrcRectDestRectI(nativeGraphics, _
|
---|
[33] | 1710 | nativeImage, destRect, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
|
---|
| 1711 | End Function
|
---|
| 1712 |
|
---|
[212] | 1713 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1714 | destPoints As /*Const*/ *PointF, count As Long, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
|
---|
[33] | 1715 | callback As EnumerateMetafileProc) As Status
|
---|
| 1716 |
|
---|
| 1717 | Return EnumerateMetafile(metafile, destPoints, count, srcRect, srcUnit, callback, 0, 0)
|
---|
| 1718 | End Function
|
---|
| 1719 |
|
---|
[212] | 1720 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1721 | destPoints As /*Const*/ *PointF, count As Long, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
|
---|
[33] | 1722 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1723 |
|
---|
| 1724 | Return EnumerateMetafile(metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, 0)
|
---|
| 1725 | End Function
|
---|
| 1726 |
|
---|
[212] | 1727 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1728 | destPoints As /*Const*/ *PointF, count As Long, srcRect As /*Const*/ RectangleF, srcUnit As GraphicsUnit, _
|
---|
| 1729 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1730 |
|
---|
| 1731 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1732 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1733 | nativeImage = metafile.NativeImage
|
---|
[33] | 1734 | Else
|
---|
| 1735 | nativeImage = 0
|
---|
| 1736 | End If
|
---|
| 1737 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1738 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1739 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1740 | Else
|
---|
| 1741 | nativeImageAttr = 0
|
---|
| 1742 | End If
|
---|
| 1743 |
|
---|
[104] | 1744 | Return SetStatus(GdipEnumerateMetafileSrcRectDestPoints(nativeGraphics, _
|
---|
| 1745 | nativeImage, destPoints, count, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
|
---|
[33] | 1746 | End Function
|
---|
| 1747 |
|
---|
[212] | 1748 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1749 | destPoints As /*Const*/ *Point, count As Long, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
[33] | 1750 | callback As EnumerateMetafileProc) As Status
|
---|
| 1751 |
|
---|
| 1752 | Return EnumerateMetafile(metafile, destPoints, count, srcRect, srcUnit, callback, 0, 0)
|
---|
| 1753 | End Function
|
---|
| 1754 |
|
---|
[212] | 1755 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1756 | destPoints As /*Const*/ *Point, count As Long, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
[33] | 1757 | callback As EnumerateMetafileProc, callbackData As VoidPtr) As Status
|
---|
| 1758 |
|
---|
| 1759 | Return EnumerateMetafile(metafile, destPoints, count, srcRect, srcUnit, callback, callbackData, 0)
|
---|
| 1760 | End Function
|
---|
| 1761 |
|
---|
[212] | 1762 | Function EnumerateMetafile(metafile As /*Const*/ Metafile, _
|
---|
| 1763 | destPoints As /*Const*/ *Point, count As Long, srcRect As /*Const*/ Rectangle, srcUnit As GraphicsUnit, _
|
---|
| 1764 | callback As EnumerateMetafileProc, callbackData As VoidPtr, imageAttributes As /*Const*/ ImageAttributes) As Status
|
---|
[33] | 1765 |
|
---|
| 1766 | Dim nativeImage As /*Const*/ *GpMetafile
|
---|
| 1767 | If VarPtr(metafile) <> 0 Then
|
---|
[104] | 1768 | nativeImage = metafile.NativeImage
|
---|
[33] | 1769 | Else
|
---|
| 1770 | nativeImage = 0
|
---|
| 1771 | End If
|
---|
| 1772 | Dim nativeImageAttr As *GpImageAttributes
|
---|
| 1773 | If VarPtr(imageAttributes) <> 0 Then
|
---|
[104] | 1774 | nativeImageAttr = image.NativeImageAttr
|
---|
[33] | 1775 | Else
|
---|
| 1776 | nativeImageAttr = 0
|
---|
| 1777 | End If
|
---|
| 1778 |
|
---|
[104] | 1779 | Return SetStatus(GdipEnumerateMetafileSrcRectDestPointsI(nativeGraphics, nativeImage, _
|
---|
| 1780 | destPoints, count, srcRect, srcUnit, callback, callbackData, nativeImageAttr))
|
---|
[33] | 1781 | End Function
|
---|
| 1782 |
|
---|
[212] | 1783 | Function SetClip(g As /*Const*/ Graphics) As Status
|
---|
[33] | 1784 | Return SetClip(g, CombineMode.Replace)
|
---|
| 1785 | End Function
|
---|
| 1786 |
|
---|
[212] | 1787 | Function SetClip(rc As /*Const*/ RectangleF) As Status
|
---|
[33] | 1788 | Return SetStatus(GdipSetClipRect(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, CombineMode.Replace))
|
---|
| 1789 | End Function
|
---|
| 1790 |
|
---|
[212] | 1791 | Function SetClip(rc As /*Const*/ Rectangle) As Status
|
---|
[33] | 1792 | Return SetStatus(GdipSetClipRectI(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, CombineMode.Replace))
|
---|
| 1793 | End Function
|
---|
| 1794 |
|
---|
[212] | 1795 | Function SetClip(path As /*Const*/ GraphicsPath) As Status
|
---|
[33] | 1796 | Return SetStatus(GdipSetClipPath(nativeGraphics, path->nativePath, CombineMode.Replace))
|
---|
| 1797 | End Function
|
---|
| 1798 |
|
---|
[212] | 1799 | Function SetClip(region As /*Const*/ Region) As Status
|
---|
[33] | 1800 | Return SetStatus(GdipSetClipRegion(nativeGraphics, region->nativeRegion, CombineMode.Replace))
|
---|
| 1801 | End Function
|
---|
| 1802 |
|
---|
[212] | 1803 | Function SetClip(g As /*Const*/ Graphics, combineMode As CombineMode) As Status
|
---|
[33] | 1804 | Return SetStatus(GdipSetClipGraphics(nativeGraphics, g->nativeGraphics, combineMode))
|
---|
| 1805 | End Function
|
---|
| 1806 |
|
---|
[212] | 1807 | Function SetClip(rc As /*Const*/ RectangleF, combineMode As CombineMode) As Status
|
---|
[33] | 1808 | Return SetStatus(GdipSetClipRect(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, combineMode))
|
---|
| 1809 | End Function
|
---|
| 1810 |
|
---|
[212] | 1811 | Function SetClip(rc As /*Const*/ Rectangle, combineMode As CombineMode) As Status
|
---|
[33] | 1812 | Return SetStatus(GdipSetClipRectI(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, combineMode))
|
---|
| 1813 | End Function
|
---|
| 1814 |
|
---|
[212] | 1815 | Function SetClip(path As /*Const*/ GraphicsPath, combineMode As CombineMode) As Status
|
---|
[33] | 1816 | Return SetStatus(GdipSetClipPath(nativeGraphics, path->nativePath, combineMode))
|
---|
| 1817 | End Function
|
---|
| 1818 |
|
---|
[212] | 1819 | Function SetClip(region As /*Const*/ Region, combineMode As CombineMode) As Status
|
---|
[33] | 1820 | Return SetStatus(GdipSetClipRegion(nativeGraphics, region->nativeRegion, combineMode))
|
---|
| 1821 | End Function
|
---|
| 1822 |
|
---|
| 1823 | ' This is different than the other SetClip methods because it assumes
|
---|
| 1824 | ' that the HRGN is already in device units, so it doesn't transform
|
---|
| 1825 | ' the coordinates in the HRGN.
|
---|
| 1826 |
|
---|
| 1827 | Function SetClip(hrgn As HRGN, combineMode As CombineMode /* = CombineModeReplace*/) As Status
|
---|
| 1828 | Return SetStatus(GdipSetClipHrgn(nativeGraphics, hrgn, combineMode))
|
---|
| 1829 | End Function
|
---|
| 1830 |
|
---|
[212] | 1831 | Function IntersectClip(rc As /*Const*/ RectangleF) As Status
|
---|
[33] | 1832 | Return SetStatus(GdipSetClipRect(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, CombineMode.Intersect))
|
---|
| 1833 | End Function
|
---|
| 1834 |
|
---|
[212] | 1835 | Function IntersectClip(rc As /*Const*/ Rectangle) As Status
|
---|
[33] | 1836 | Return SetStatus(GdipSetClipRectI(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, CombineMode.Intersect))
|
---|
| 1837 | End Function
|
---|
| 1838 |
|
---|
[212] | 1839 | Function IntersectClip(region As /*Const*/ Region) As Status
|
---|
[33] | 1840 | Return SetStatus(GdipSetClipRegion(nativeGraphics, region->nativeRegion, CombineMode.Intersect))
|
---|
| 1841 | End Function
|
---|
| 1842 |
|
---|
[212] | 1843 | Function ExcludeClip(rc As /*Const*/ RectangleF) As Status
|
---|
[33] | 1844 | Return SetStatus(GdipSetClipRect(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, CombineMode.Exclude))
|
---|
| 1845 | End Function
|
---|
| 1846 |
|
---|
[212] | 1847 | Function ExcludeClip(rc As /*Const*/ Rectangle) As Status
|
---|
[33] | 1848 | Return SetStatus(GdipSetClipRectI(nativeGraphics, rc.X, rc.Y, rc.Width, rc.Height, CombineMode.Exclude))
|
---|
| 1849 | End Function
|
---|
| 1850 |
|
---|
[212] | 1851 | Function ExcludeClip(region As /*Const*/ Region) As Status
|
---|
[33] | 1852 | Return SetStatus(GdipSetClipRegion(nativeGraphics, region->nativeRegion, CombineMode.Exclude))
|
---|
| 1853 | End Function
|
---|
| 1854 |
|
---|
| 1855 | Function ResetClip() As Status
|
---|
| 1856 | Return SetStatus(GdipResetClip(nativeGraphics))
|
---|
| 1857 | End Function
|
---|
| 1858 |
|
---|
| 1859 | Function TranslateClip(dx As Single, dy As Single) As Status
|
---|
| 1860 | Return SetStatus(GdipTranslateClip(nativeGraphics, dx, dy))
|
---|
| 1861 | End Function
|
---|
| 1862 |
|
---|
| 1863 | Function TranslateClip(dx As Long, dy As Long) As Status
|
---|
| 1864 | Return SetStatus(GdipTranslateClipI(nativeGraphics, dx, dy))
|
---|
| 1865 | End Function
|
---|
| 1866 |
|
---|
[212] | 1867 | Const Function GetClip(region As Region) As Status
|
---|
[33] | 1868 | Return SetStatus(GdipGetClip(nativeGraphics, region->nativeRegion))
|
---|
| 1869 | End Function
|
---|
| 1870 |
|
---|
[212] | 1871 | Const Function GetClipBounds(rc As RectangleF) As Status
|
---|
[33] | 1872 | Return SetStatus(GdipGetClipBounds(nativeGraphics, rc))
|
---|
| 1873 | End Function
|
---|
| 1874 |
|
---|
[212] | 1875 | Const Function GetClipBounds(rc As Rectangle) As Status
|
---|
[33] | 1876 | Return SetStatus(GdipGetClipBoundsI(nativeGraphics, rc))
|
---|
| 1877 | End Function
|
---|
| 1878 |
|
---|
[212] | 1879 | Const Function GetVisibleClipBounds(rc As RectangleF) As Status
|
---|
[33] | 1880 | Return SetStatus(GdipGetVisibleClipBounds(nativeGraphics, rc))
|
---|
| 1881 | End Function
|
---|
| 1882 |
|
---|
[212] | 1883 | Const Function GetVisibleClipBounds(rc As Rectangle) As Status
|
---|
[33] | 1884 | Return SetStatus(GdipGetVisibleClipBoundsI(nativeGraphics, rc))
|
---|
| 1885 | End Function
|
---|
| 1886 |
|
---|
| 1887 | Const Function IsVisible(x As Long, y As Long) As BOOL
|
---|
| 1888 | Dim b = FALSE As BOOL
|
---|
| 1889 | SetStatus(GdipIsVisiblePointI(nativeGraphics, x, y, b))
|
---|
| 1890 | Return b
|
---|
| 1891 | End Function
|
---|
| 1892 |
|
---|
[212] | 1893 | Const Function IsVisible(pt As /*Const*/ Point) As BOOL
|
---|
[33] | 1894 | Return IsVisible(pt.X, pt.Y)
|
---|
| 1895 | End Function
|
---|
| 1896 |
|
---|
| 1897 | Const Function IsVisible(x As Long, y As Long, width As Long, height As Long) As BOOL
|
---|
| 1898 | Dim b = FALSE As BOOL
|
---|
| 1899 | SetStatus(GdipIsVisibleRectI(nativeGraphics, x, y, width, height, b))
|
---|
| 1900 | Return b
|
---|
| 1901 | End Function
|
---|
| 1902 |
|
---|
[212] | 1903 | Const Function IsVisible(rc As /*Const*/ Rectangle) As BOOL
|
---|
[33] | 1904 | Return IsVisible(rc.X, rc.Y, rc.Width, rc.Height)
|
---|
| 1905 | End Function
|
---|
| 1906 |
|
---|
| 1907 | Const Function IsVisible(x As Single, y As Single) As BOOL
|
---|
| 1908 | Dim b = FALSE As BOOL
|
---|
| 1909 | SetStatus(GdipIsVisiblePoint(nativeGraphics, x, y, b))
|
---|
| 1910 | Return b
|
---|
| 1911 | End Function
|
---|
| 1912 |
|
---|
[212] | 1913 | Const Function IsVisible(point As /*Const*/ PointF) As BOOL
|
---|
[33] | 1914 | Return IsVisible(pt.X, pt.Y)
|
---|
| 1915 | End Function
|
---|
| 1916 |
|
---|
| 1917 | Const Function IsVisible(x As Single, y As Single, width As Single, height As Single) As BOOL
|
---|
| 1918 | Dim b = FALSE As BOOL
|
---|
| 1919 | SetStatus(GdipIsVisibleRect(nativeGraphics, x, y, width, height, b))
|
---|
| 1920 | Return b
|
---|
| 1921 | End Function
|
---|
| 1922 |
|
---|
[212] | 1923 | Const Function IsVisible(rect As /*Const*/ RectangleF) As BOOL
|
---|
[33] | 1924 | Return IsVisible(rc.X, rc.Y, rc.Width, rc.Height)
|
---|
| 1925 | End Function
|
---|
| 1926 |
|
---|
| 1927 | Const Function Save() As GraphicsState
|
---|
| 1928 | Dim gstate As GraphicsState
|
---|
| 1929 | SetStatus(GdipSaveGraphics(nativeGraphics, state))
|
---|
| 1930 | Return gstate
|
---|
| 1931 | End Function
|
---|
| 1932 |
|
---|
| 1933 | Function Restore(gstate As GraphicsState)
|
---|
| 1934 | Return SetStatus(GdipRestoreGraphics(nativeGraphics, gstate))
|
---|
| 1935 | End Function
|
---|
| 1936 |
|
---|
[212] | 1937 | Function BeginContainer(dstrect As /*Const*/ RectangleF, srcrect As /*Const*/ RectangleF, unit As GraphicsUnit) As GraphicsContainer
|
---|
[33] | 1938 | Dim state As GraphicsContainer
|
---|
| 1939 | SetStatus(GdipBeginContainer(nativeGraphics, dstrect, srcrect, unit, state))
|
---|
| 1940 | Return state
|
---|
| 1941 | End Function
|
---|
| 1942 |
|
---|
[212] | 1943 | Function BeginContainer(dstrect As /*Const*/ Rectangle, srcrect As /*Const*/ Rectangle, unit As GraphicsUnit) As GraphicsContainer
|
---|
[33] | 1944 | Dim state As GraphicsContainer
|
---|
| 1945 | SetStatus(GdipBeginContainerI(nativeGraphics, dstrect, srcrect, unit, state))
|
---|
| 1946 | Return state
|
---|
| 1947 | End Function
|
---|
| 1948 |
|
---|
| 1949 | Function BeginContainer() As GraphicsContainer
|
---|
| 1950 | Dim state As GraphicsContainer
|
---|
| 1951 | SetStatus(GdipBeginContainer2(nativeGraphics, state))
|
---|
| 1952 | Return state
|
---|
| 1953 | End Function
|
---|
| 1954 |
|
---|
| 1955 | Function EndContainer(state As GraphicsContainer) As Status
|
---|
| 1956 | Return SetStatus(GdipEndContainer(nativeGraphics, state))
|
---|
| 1957 | End Function
|
---|
| 1958 |
|
---|
| 1959 | ' Only valid when recording metafiles.
|
---|
| 1960 |
|
---|
| 1961 | Function AddMetafileComment(data As /*Const*/ *Byte, sizeData As DWord)
|
---|
| 1962 | Return SetStatus(GdipComment(nativeGraphics, sizeData, data))
|
---|
| 1963 | End Function
|
---|
| 1964 |
|
---|
| 1965 | Static Function GetHalftonePalette() As HPALETTE
|
---|
| 1966 | Return GdipCreateHalftonePalette()
|
---|
| 1967 | End Function
|
---|
| 1968 |
|
---|
| 1969 | Const Function GetLastStatus() As Status
|
---|
| 1970 | Dim lastStatus = lastResult
|
---|
| 1971 | lastResult = Status.Ok
|
---|
| 1972 | Return lastStatus
|
---|
| 1973 | End Function
|
---|
| 1974 |
|
---|
| 1975 | Private
|
---|
[212] | 1976 | ' Sub Graphics(gr As Graphics)
|
---|
[104] | 1977 | ' Debug
|
---|
| 1978 | ' End Sub
|
---|
[212] | 1979 | Sub Operator =(gr As Graphics)
|
---|
[33] | 1980 | Debug
|
---|
| 1981 | End Sub
|
---|
| 1982 |
|
---|
| 1983 | Protected
|
---|
| 1984 | Sub Graphics(graphics As *GpGraphics)
|
---|
[104] | 1985 | lastResult = Status.Ok
|
---|
[33] | 1986 | SetNativeGraphics(graphics)
|
---|
| 1987 | End Sub
|
---|
| 1988 |
|
---|
| 1989 | Sub SetNativeGraphics(graphics As *GpGraphics)
|
---|
| 1990 | This.nativeGraphics = graphics
|
---|
| 1991 | End Sub
|
---|
| 1992 |
|
---|
| 1993 | Const Function SetStatus(status As Status) As Status
|
---|
| 1994 | If status <> Status.Ok Then
|
---|
| 1995 | lastResult = status
|
---|
| 1996 | End If
|
---|
| 1997 | Return status
|
---|
| 1998 | End Function
|
---|
| 1999 |
|
---|
| 2000 | Const Function GetNativeGraphics() As *GpGraphics
|
---|
| 2001 | Return This.nativeGraphics
|
---|
| 2002 | End Function
|
---|
| 2003 |
|
---|
[104] | 2004 | Function GetNativePen(pen As /*Const*/ *Pen) As *GpPen
|
---|
[33] | 2005 | Return pen->nativePen
|
---|
| 2006 | End Function
|
---|
| 2007 |
|
---|
| 2008 | Protected
|
---|
| 2009 | nativeGraphics As *GpGraphics
|
---|
| 2010 | lastResult As /*Mutable*/ Status
|
---|
| 2011 | End Class
|
---|
| 2012 |
|
---|
| 2013 | #endif
|
---|