Reference Codebot.Graphics.pas
Part of the Codebot Controls package
The Codebot.Graphics unit creates the drawing objects declared in Codebot.Graphics.Types, so this is the unit you use whenever you draw with a surface. NewPen, NewBrush, NewFont, NewSurface, NewBitmap, NewMatrix, NewSplash, and NewScreenCapture create pens, solid, bitmap, and gradient brushes, fonts, surfaces for a canvas or a control, bitmaps, splash windows, and captures of the screen. Each one is made by the drawing backend of the platform, which is Cairo on Linux, Direct2D on Windows, and Quartz on macOS. GraphicsEngine tells you which one is in use.
The unit also gives you:
- TSurfaceBitmap, a TGraphic that holds a bitmap, so you can use one as a published property and edit it in the object inspector.
- TImageStrip, a component that holds a series of images of the same size for your controls to share.
- Routines that draw the shapes controls use most, such as FillRectColor, StrokeRectColor, FillRectState, FillRectSelected, and DrawShadow, along with routines that draw hue and saturation boxes for color pickers.
- A helper that adds drawing methods to every control, such as DrawText, DrawCaption, DrawTextState, and DrawBitmap, which draw in the control's own font and colors.
- The themes used to draw controls. TDefaultTheme and TRedmondTheme come with the unit, ThemeChange switches every control to a theme by name, and ThemeNames lists them.
- Brush styles, which you can create by name with StrToBrush and add to with RegisterBrushStyle.
- CaptureScreen and CaptureScreenRect, which copy the screen into an LCL bitmap.
Items 162 items
| Name | Kind | Line |
|---|---|---|
| Brushes | record | 306 |
| Beam | function | 312 |
| Brick | function | 315 |
| Checker | function | 311 |
| Circles | function | 316 |
| Clovers | function | 318 |
| Cross | function | 313 |
| Dither | function | 310 |
| FloorTile | function | 320 |
| Pipes | function | 322 |
| SnakeSkin | function | 321 |
| Squares | function | 317 |
| Tooth | function | 319 |
| Transparent | function | 308 |
| ZigZag | function | 314 |
| CaptureScreen | procedure | 292 |
| CaptureScreenRect | procedure | 294 |
| DefaulHeaderHeight | constant | 339 |
| DefaultFooterHeight | constant | 340 |
| DefBrushSize | constant | 302 |
| DefPenWidth | constant | 300 |
| DrawDesaturationBox | function | 278 |
| DrawDummyBitmap | function | 270 |
| DrawEasing | procedure | 287 |
| DrawHueLinear | function | 272 |
| DrawHueRadial | function | 274 |
| DrawSaturationBox | function | 276 |
| DrawShadow | procedure | 280 |
| DrawTextIcons | function | 283 |
| EnumBrushStyles | function | 335 |
| FillRectColor | procedure | 259 |
| FillRectSelected | procedure | 268 |
| FillRectState | procedure | 263 |
| FillRectStateOutlined | procedure | 266 |
| GraphicsEngine | function | 500 |
| LoadCursor | procedure | 290 |
| NewBitmap | function | 48 |
| NewBrush | function | 30, 32, 34, 36, 38 |
| NewFont | function | 40, 42 |
| NewMatrix | function | 24 |
| NewPen | function | 26, 28 |
| NewScreenCapture | function | 52 |
| NewSplash | function | 50 |
| NewSurface | function | 44, 46 |
| RegisterBrushStyle | procedure | 333 |
| StrokeRectColor | procedure | 261 |
| StrToBrush | function | 331 |
| TBitmapHelper | helper | 226 |
| Colorize | procedure | 229 |
| TBrushStyle | procedural | 327 |
| TCalculateRectEvent | procedural | 254 |
| TDrawControlHelper | helper | 345 |
| DrawBitmap | procedure | 358, 359 |
| DrawCaption | procedure | 361 |
| DrawDummyBlock | procedure | 356 |
| DrawRectState | procedure | 367 |
| DrawText | procedure | 363 |
| DrawTextState | procedure | 365 |
| TextHeight | function | 352 |
| TextSize | function | 354 |
| CurrentColor | property | 369 |
| ParentCurrentColor | property | 371 |
| ParentEnabled | property | 373 |
| TDrawEvent | procedural | 237 |
| TDrawIndexDefaultEvent | procedural | 248 |
| TDrawIndexEvent | procedural | 243 |
| TDrawRectEvent | procedural | 239 |
| TDrawStage | enum | 250 |
| dsPreProcess | enum value | 250 |
| dsProcessing | enum value | 250 |
| dsPostProcess | enum value | 250 |
| TDrawStageEvent | procedural | 252 |
| TDrawStateEvent | procedural | 241 |
| Theme | function | 485 |
| ThemeChange | procedure | 491 |
| ThemeFind | function | 489 |
| ThemeNames | procedure | 497 |
| ThemeNotifyAdd | procedure | 493 |
| ThemeNotifyRemove | procedure | 495 |
| ThemeRegisiter | procedure | 487 |
| TImageStrip | class | 155 |
| Add | procedure | 206, 207 |
| Assign | procedure | 176 |
| BeginUpdate | procedure | 178 |
| Change | procedure | 170 |
| Clear | procedure | 215 |
| Colorize | procedure | 182 |
| CopyTo | procedure | 184 |
| Create | constructor | 173 |
| DefineProperties | procedure | 168 |
| Destroy | destructor | 174 |
| Draw | procedure | 199, 201, 203 |
| EndUpdate | procedure | 180 |
| Insert | procedure | 209 |
| LoadFromFile | procedure | 190 |
| LoadFromStream | procedure | 192 |
| LoadRange | procedure | 188 |
| Move | procedure | 213 |
| ReadData | procedure | 166 |
| Remove | procedure | 211 |
| Resample | procedure | 186 |
| SaveToFile | procedure | 194 |
| SaveToStream | procedure | 196 |
| WriteData | procedure | 167 |
| Count | property | 217 |
| OnChange | property | 221 |
| Size | property | 219 |
| TMeasureIndexEvent | procedural | 245 |
| TNotifyIndexEvent | procedural | 235 |
| TSurfaceBitmap | class | 59 |
| ClipTo | procedure | 128 |
| Colorize | procedure | 117 |
| CopyReference | procedure | 101 |
| Create | constructor | 93 |
| Darken | procedure | 124 |
| Desaturate | procedure | 120 |
| Draw | procedure | 103, 105 |
| GetSupportedSourceMimeTypes | procedure | 115 |
| Lighten | procedure | 122 |
| LoadFromFile | procedure | 107 |
| LoadFromStream | procedure | 109 |
| Resample | procedure | 130 |
| ResizeTo | procedure | 126 |
| SaveToFile | procedure | 111 |
| SaveToStream | procedure | 113 |
| SetSize | procedure | 132 |
| Bitmap | property | 134 |
| ClientRect | property | 138 |
| Format | property | 146 |
| FrameCount | property | 142 |
| Frames | property | 140 |
| Opacity | property | 148 |
| Pixels | property | 144 |
| Surface | property | 136 |
| TTheme | class | 382 |
| Control | field | 387 |
| Font | field | 391 |
| State | field | 393 |
| Surface | field | 389 |
| Deselect | procedure | 401 |
| DrawBorder | procedure | 417 |
| DrawButton | procedure | 405 |
| DrawButtonThin | procedure | 407 |
| DrawEditBorder | procedure | 421 |
| DrawFooter | procedure | 429 |
| DrawFooterGrip | procedure | 431 |
| DrawHeader | procedure | 425 |
| DrawHeaderColumn | procedure | 423 |
| DrawHeaderShadow | procedure | 427 |
| DrawSplit | procedure | 409 |
| DrawThumbThin | procedure | 413 |
| MeasureBorder | function | 415 |
| MeasureEditBorder | function | 419 |
| MeasureThumbThin | function | 411 |
| Name | function | 403 |
| Select | procedure | 395, 397, 399 |
| Selected | property | 433 |
| TThemeClass | classref | 438 |
| TThemeClassArray | alias | 442 |
| TThemeOrientation | enum | 378 |
| toVertical | enum value | 378 |
| toHorizontal | enum value | 378 |