Download Now
Forums

    Reference Codebot.Render.Graphics.pas

    Part of the Codebot Render package

    The Codebot.Render.Graphics unit gives you ICanvas, which draws smooth antialiased 2D vector graphics with OpenGL using Codebot.Render.NanoVG. You build up a path with MoveTo, LineTo, Rect, RoundRect, Circle, Ellipse, and the other path methods, and then Fill or Stroke it with a color, a pen, or a brush. The canvas also draws images, sprites, and text, and its matrix lets you rotate, scale, and move what you draw. Drawing happens between two calls to Flip on the canvas's IBackBuffer.

    Interface Description
    IPen Strokes paths.
    ISolidBrush, ILinearGradientBrush, IRadialGradientBrush, IBoxGradientBrush, IBitmapBrush Fill paths with a color, a gradient, or an image.
    IFont Describes how text is drawn.
    IBitmap An image. IRenderBitmap is an image you can draw into.
    ISprite Draws one cell of a sprite sheet.
    ITextWriter Writes formatted text over several lines.
    IMatrix A 2D transform.

    NewCanvas, NewPen, NewBrush, NewSprite, NewMatrix, NewColorF, NewHSL, and the other New routines create them. A canvas must be created and used while an OpenGL context is current, which the scene hosts take care of for you.

    Items 295 items

    NameKindLine
    BitmapsCreatedvariable36
    BitmapsDestroyedvariable37
    Clampfunction653
    FontsCreatedvariable34
    FontsDestroyedvariable35
    IBackBufferinterface642
    BeginFrameprocedure645
    EndFrameprocedure647
    Flipprocedure649
    IBitmapinterface131
    GetClientRectfunction135
    GetHeightfunction137
    GetNamefunction134
    GetWidthfunction136
    ClientRectproperty142
    Heightproperty145
    Nameproperty140
    Widthproperty144
    IBitmapBrushinterface348
    GetAnglefunction353
    GetBitmapfunction351
    GetOffsetfunction355
    GetOpacityfunction359
    GetScalefunction357
    SetAngleprocedure354
    SetBitmapprocedure352
    SetOffsetprocedure356
    SetOpacityprocedure360
    SetScaleprocedure358
    Angleproperty365
    Bitmapproperty363
    Offsetproperty367
    Opacityproperty371
    Scaleproperty369
    IBoxGradientBrushinterface324
    GetFeatherfunction331
    GetRadiusfunction329
    GetRectfunction327
    SetFeatherprocedure332
    SetRadiusprocedure330
    SetRectprocedure328
    Featherproperty339
    Radiusproperty337
    Rectproperty335
    IBrushinterface244
    ICanvasinterface534
    Arcprocedure596
    ArcToprocedure590
    BeginPathprocedure581
    BezierToprocedure592
    Circleprocedure598
    Clearprocedure563
    Clipprocedure558, 560
    ClosePathprocedure584
    DrawImageprocedure575, 577
    DrawSpriteprocedure579
    DrawTextprocedure571
    DrawTextMemoprocedure573
    Ellipseprocedure600, 601
    Fillprocedure613, 614
    FillCircleprocedure619
    FillRectprocedure621
    FillRoundRectprocedure623
    GetBlendModefunction537
    GetFillRulefunction547
    GetMatrixfunction541
    GetOpacityfunction539
    GetTextScalefunction543
    GetWindingfunction545
    LineToprocedure588
    MeasureAdvancefunction567
    MeasureMemofunction569
    MeasureTextfunction565
    MoveToprocedure586
    Polygonprocedure609
    Popprocedure553
    Pushprocedure551
    QuadToprocedure594
    Rectprocedure603, 604
    RoundRectprocedure606, 607
    RoundRectVaryingprocedure611
    SetBlendModeprocedure538
    SetFillRuleprocedure548
    SetMatrixprocedure542
    SetOpacityprocedure540
    SetTextScaleprocedure544
    SetWindingprocedure546
    Strokeprocedure616, 617
    StrokeCircleprocedure620
    StrokeRectprocedure622
    StrokeRoundRectprocedure624
    BlendModeproperty626
    FillRuleproperty637
    Matrixproperty630
    Opacityproperty628
    TextScaleproperty633
    Windingproperty635
    IFontinterface168
    GetAlignfunction178
    GetBlurfunction182
    GetColorfunction172
    GetHeightfunction176
    GetLayoutfunction180
    GetLetterSpacingfunction184
    GetLineSpacingfunction186
    GetNamefunction171
    GetSizefunction174
    SetAlignprocedure179
    SetBlurprocedure183
    SetColorprocedure173
    SetHeightprocedure177
    SetLayoutprocedure181
    SetLetterSpacingprocedure185
    SetLineSpacingprocedure187
    SetSizeprocedure175
    Alignproperty198
    Blurproperty202
    Colorproperty192
    Heightproperty196
    Layoutproperty200
    LetterSpacingproperty204
    LineSpacingproperty206
    Nameproperty190
    Sizeproperty194
    IGradientBrushinterface278
    GetFarStopfunction282
    GetNearStopfunction281
    FarStopproperty287
    NearStopproperty285
    IGradientStopinterface262
    GetColorfunction267
    GetOffsetfunction265
    SetColorprocedure268
    SetOffsetprocedure266
    Colorproperty273
    Offsetproperty271
    ILinearGradientBrushinterface293
    GetAfunction296
    GetBfunction298
    SetAprocedure297
    SetBprocedure299
    Aproperty302
    Bproperty304
    IMatrixinterface85
    Copyprocedure88, 90
    Identityprocedure92
    Inversefunction94
    Multiplyfunction114, 118
    Popprocedure122
    Pushprocedure120
    Rotateprocedure98
    RotateAtprocedure100
    Scaleprocedure102
    ScaleAtprocedure104
    SkewXprocedure106
    SkewYprocedure108
    Transformprocedure110
    Translateprocedure96
    IPeninterface212
    GetBrushfunction217
    GetColorfunction215
    GetLineCapfunction223
    GetLineJoinfunction225
    GetMiterLimitfunction221
    GetWidthfunction219
    SetBrushprocedure218
    SetColorprocedure216
    SetLineCapprocedure224
    SetLineJoinprocedure226
    SetMiterLimitprocedure222
    SetWidthprocedure220
    Brushproperty231
    Colorproperty229
    LineCapproperty237
    LineJoinproperty239
    MiterLimitproperty235
    Widthproperty233
    IRadialGradientBrushinterface310
    GetRectfunction313
    SetRectprocedure314
    Rectproperty317
    IRenderBitmapinterface156
    Bindprocedure159
    Resizeprocedure163
    Unbindprocedure161
    IResourceStoreinterface472
    DisposeBitmapprocedure509
    LoadBitmapfunction483, 489, 492, 497
    LoadBitmapAssetfunction506
    LoadBitmapResourcefunction500
    LoadFontfunction512, 515, 517
    LoadFontAssetfunction523
    LoadFontResourcefunction519
    NewBitmapfunction480
    NewTextWriterfunction475, 477
    ISolidBrushinterface250
    GetColorfunction253
    SetColorprocedure254
    Colorproperty257
    ISpriteinterface377
    GetBitmapfunction380
    GetCellfunction386
    GetColsfunction382
    GetOpacityfunction396
    GetPivotfunction388
    GetPositionfunction390
    GetRotationfunction392
    GetRowsfunction384
    GetScalefunction394
    SetBitmapprocedure381
    SetCellprocedure387
    SetColsprocedure383
    SetOpacityprocedure397
    SetPivotprocedure389
    SetPositionprocedure391
    SetRotationprocedure393
    SetRowsprocedure385
    SetScaleprocedure395
    Bitmapproperty400
    Cellproperty408
    Colsproperty402
    Opacityproperty419
    Pivotproperty411
    Positionproperty413
    Rotationproperty415
    Rowsproperty404
    Scaleproperty417
    ITextWriterinterface443
    GetShadowfunction445
    Indentprocedure450
    NewLineprocedure454
    NewPageprocedure452
    Paperprocedure448
    SetShadowprocedure446
    Writeprocedure456
    WriteAtprocedure462
    WriteColumnprocedure458
    WriteLineprocedure460
    Shadowproperty464
    MatrixCreatedvariable32
    MatrixDestroyedvariable33
    MatrixPushPopvariable31
    NewBrushfunction667, 668, 669, 670, 671
    NewCanvasfunction675
    NewColorBfunction657
    NewColorFfunction658
    NewHSLfunction659
    NewMatrixfunction664
    NewPenfunction665, 666
    NewPointFfunction660
    NewRectFfunction661, 662
    NewSpritefunction673
    PointZeroconstant680
    RectEmptyconstant681
    TBlendModeenum80
    blendAlphaenum value80
    blendAdditiveenum value80
    blendSubtractiveenum value80
    blendLightenenum value81
    blendDarkenenum value81
    blendInvertenum value81
    blendNegativeenum value81
    TFillRuleenum76
    fillWindingenum value76
    fillNonZeroenum value76
    fillEvenOddenum value76
    TFontAlignenum64
    fontLeftenum value64
    fontCenterenum value64
    fontRightenum value64
    TFontLayoutenum66
    fontTopenum value66
    fontMiddleenum value66
    fontBaselineenum value66
    fontBottomenum value66
    TLineCapenum62
    capButtenum value62
    capSquareenum value62
    capRoundenum value62
    TLineJoinenum60
    joinMiterenum value60
    joinBevelenum value60
    joinRoundenum value60
    TTextLayoutenum425
    textLeftenum value427
    textTopenum value429
    textRightenum value431
    textBottomenum value433
    textMiddleLeftenum value435
    textMiddleenum value437
    textMiddleRightenum value439
    textMemoenum value441
    TWindingenum68
    windCCWenum value68
    windCWenum value68