KUIML
Blue Cat's User Interface Programming Language
Kt::Graphics Namespace Reference

drawing script classes (experimental). More...

Classes

class  Bitmap
 
class  Context
 Interface for 2D vector graphics drawing (experimental). More...
 
class  DrawFont
 interface to access the font used to draw text in a graphics context (experimental). More...
 
class  DrawPath
 path creation (experimental). More...
 
class  DrawPattern
 pattern used for drawing on target graphics context (experimental). More...
 
class  DrawPatternFactory
 interface to create patterns to be used with a graphics context (experimental). More...
 
class  DrawPatternSelect
 interface to select patterns in a graphics context (experimental). More...
 
class  DrawSettings
 drawing settings (experimental). More...
 
class  DrawTransform
 2D transform applied to graphics context (experimental). More...
 
class  GradientDrawPattern
 special type of DrawPattern for gradients (experimental). More...
 
class  Rectangle
 
class  XYCoordinates
 

Enumerations

enum  BlendMode {
  kDrawOpOver, kDrawOpXor, kDrawOpAdd, kDrawOpMultiply,
  kDrawOpDifference
}
 Blend mode used for rendering on the target graphics (experimental). More...
 
enum  PatternExtend { kExtendNone, kExtendRepeat, kExtendReflect, kExtendPad }
 pattern extension mode used for rendering on the target graphics (experimental). More...
 
enum  PatternFilter {
  kFilterFast, kFilterGood, kFilterBest, kFilterNearest,
  kFilterBilinear, kFilterGaussian
}
 pattern anti alias filter used for rendering on the target graphics (experimental). More...
 
enum  FontSlant { kFontSlantNormal, kFontSlantItalic }
 font slant (experimental). More...
 
enum  FontWeight { kFontWeightNormal, kFontWeightBold }
 font weight (experimental). More...
 
enum  TextExtentMode { kTextBoundaries, kTextAsTypographicLine }
 text extent measurement mode (experimental). More...
 

Functions

class Kt::Graphics::Context GetCurrentContext ()
 Returns a handle to current context. May return NULL if not in a render callback.
 
BitmapLoadImageFile (const string &filePath)
 Loads the content of an image file into a bitmap object (experimental). returns NULL if the file could not be loaded.
 
bool SaveImageFile (const Bitmap &bmp, const string &filePath)
 Saves the content of a bitmap object into a png file (experimental). returns false if the file could not be saved.
 
BitmapCreateBitmap (int width, int height)
 Creates a bitmap object with specified dimensions (experimental). returns NULL if the bitmap could not be created.
 

Detailed Description

Classes in this namespace are experimental and may be subject to changes. Use at your own risk.

Enumeration Type Documentation

◆ BlendMode

Enumerator
kDrawOpOver 

draw source layer on top of destination layer [DEFAULT]

kDrawOpXor 

source and destination are shown where there is only one of them

kDrawOpAdd 

add source pattern and destination content.

kDrawOpMultiply 

multiply source and destination. The result is at least as dark as the darker inputs.

◆ FontSlant

◆ FontWeight

◆ PatternExtend

◆ PatternFilter

◆ TextExtentMode

Enumerator
kTextBoundaries 

strict boundaries of the text

kTextAsTypographicLine 

boundaries of the text as part of a typographic line (usually larger than text boundaries)