const Bmp.Constants | [src] |
BI_BITFIELDS | s32 | |
BI_RGB | s32 | |
BI_RLE4 | s32 | |
BI_RLE8 | s32 | |
ClipperScaleCoords | f64 | |
InvalidRenderTargetHandle | RenderTargetHandle | |
InvalidRenderTargetSurfaceHandle | RenderTargetSurfaceHandle | |
InvalidShaderHandle | ShaderHandle | |
InvalidShaderParamHandle | ShaderParamHandle | |
InvalidTextureHandle | TextureHandle | |
MaxAAEdge | s32 |
type alias Clipper.Type Aliases | [src] |
CInt | Clipper.CInt | |
RenderTargetHandle | RenderTargetHandle | |
RenderTargetSurfaceHandle | RenderTargetSurfaceHandle | |
ShaderHandle | ShaderHandle | |
ShaderParamHandle | ShaderParamHandle | |
TextureHandle | TextureHandle |
enum Pixel.Argb | [src] |
AliceBlue | |
AntiqueWhite | |
Aqua | |
Aquamarine | |
Azure | |
Beige | |
Bisque | |
Black | |
BlanchedAlmond | |
Blue | |
BlueViolet | |
Brown | |
BurlyWood | |
CadetBlue | |
Chartreuse | |
Chocolate | |
Coral | |
CornflowerBlue | |
Cornsilk | |
Crimson | |
Cyan | |
DarkBlue | |
DarkCyan | |
DarkGoldenrod | |
DarkGray | |
DarkGreen | |
DarkKhaki | |
DarkMagenta | |
DarkOliveGreen | |
DarkOrange | |
DarkOrchid | |
DarkRed | |
DarkSalmon | |
DarkSeaGreen | |
DarkSlateBlue | |
DarkSlateGray | |
DarkTurquoise | |
DarkViolet | |
DeepPink | |
DeepSkyBlue | |
DimGray | |
DodgerBlue | |
Firebrick | |
FloralWhite | |
ForestGreen | |
Fuchsia | |
Gainsboro | |
GhostWhite | |
Gold | |
Goldenrod | |
Gray | |
Green | |
GreenYellow | |
Honeydew | |
HotPink | |
IndianRed | |
Indigo | |
Ivory | |
Khaki | |
Lavender | |
LavenderBlush | |
LawnGreen | |
LemonChiffon | |
LightBlue | |
LightCoral | |
LightCyan | |
LightGoldenrodYellow | |
LightGray | |
LightGreen | |
LightPink | |
LightSalmon | |
LightSeaGreen | |
LightSkyBlue | |
LightSlateGray | |
LightSteelBlue | |
LightYellow | |
Lime | |
LimeGreen | |
Linen | |
Magenta | |
Maroon | |
MediumAquamarine | |
MediumBlue | |
MediumOrchid | |
MediumPurple | |
MediumSeaGreen | |
MediumSlateBlue | |
MediumSpringGreen | |
MediumTurquoise | |
MediumVioletRed | |
MidnightBlue | |
MintCream | |
MistyRose | |
Moccasin | |
NavajoWhite | |
Navy | |
OldLace | |
Olive | |
OliveDrab | |
Orange | |
OrangeRed | |
Orchid | |
PaleGoldenrod | |
PaleGreen | |
PaleTurquoise | |
PaleVioletRed | |
PapayaWhip | |
PeachPuff | |
Peru | |
Pink | |
Plum | |
PowderBlue | |
Purple | |
Red | |
RosyBrown | |
RoyalBlue | |
SaddleBrown | |
Salmon | |
SandyBrown | |
SeaGreen | |
SeaShell | |
Sienna | |
Silver | |
SkyBlue | |
SlateBlue | |
SlateGray | |
Snow | |
SpringGreen | |
SteelBlue | |
Tan | |
Teal | |
Thistle | |
Tomato | |
Turquoise | |
Violet | |
Wheat | |
White | |
WhiteSmoke | |
Yellow | |
YellowGreen | |
Zero |
func Argb.fromName | [src] |
Get the Argb value that matches name.
enum Pixel.BlendingMode | [src] |
Copy | |
Alpha | |
Add | |
Sub | |
SubDst | |
Min | |
Max |
namespace Pixel.Bmp |
Decoder | |
Encoder | |
Header |
struct Bmp.Decoder | [src] |
func IImageDecoder.canDecode | [src] |
func IImageDecoder.decode | [src] |
struct Bmp.Encoder | [src] |
func IImageEncoder.canEncode | [src] |
func IImageEncoder.encode | [src] |
struct Bmp.Header | [src] |
biSize | u32 | |
biWidth | s32 | |
biHeight | s32 | |
biPlanes | u16 | |
biBitCount | u16 | |
biCompression | u32 | |
biSizeImage | u32 | |
biXPelsPerMeter | u32 | |
biYPelsPerMeter | u32 | |
biClrUsed | u32 | |
biClrImportant | u32 |
enum Pixel.BorderPos | [src] |
None | |
Inside |
struct Pixel.Brush | [src] |
color | Color | |
type | BrushType | |
hatch | HatchStyle | |
texture | Texture | |
uvMode | UVMode | |
uvRect | Core.Math.Rectangle |
createHatch | Returns a hatch brush. |
createSolid | Returns a solid color brush. |
createTexture | Returns a full texture brush. |
createTiled | Returns a tiled texture brush. |
func Brush.createHatch | [src] |
Returns a hatch brush.
func Brush.createSolid | [src] |
Returns a solid color brush.
func Brush.createTexture | [src] |
Returns a full texture brush.
func Brush.createTiled | [src] |
Returns a tiled texture brush.
enum Pixel.BrushType | [src] |
SolidColor | |
Texture | |
Hatch |
namespace Pixel.Clipper |
IntPoint | |
Transform |
ClipType | |
InitOptions | |
JoinType | |
PolyFillType | |
PolyType |
enum Clipper.ClipType | [src] |
Intersection | |
Union | |
Difference | |
Xor |
enum Clipper.InitOptions | [src] |
ReverseSolution | |
StrictlySimple | |
PreserveCollinear |
struct Clipper.IntPoint | [src] |
x | Clipper.CInt | |
y | Clipper.CInt |
enum Clipper.JoinType | [src] |
Square | |
Round | |
Miter |
enum Clipper.PolyFillType | [src] |
EvenOdd | |
NonZero | |
Positive | |
Negative |
enum Clipper.PolyType | [src] |
Subject | |
Clip |
struct Clipper.Transform | [src] |
opDrop |
func Transform.opDrop | [src] |
enum Pixel.ClippingMode | [src] |
Set | |
Clear |
struct Pixel.Color | [src] |
Represents a color with 8-bit ARGB components.
a | u8 | |
r | u8 | |
g | u8 | |
b | u8 | Blue, green, red, alpha components (0-255). |
argb | u32 | 32-bit ARGB representation. |
Provides utilities for color creation, conversion, and manipulation.
add | Add colors with clamping. |
adjustBrightness | Adjust brightness (-1.0 = black, 0.0 = no change, 1.0 = white). |
adjustSaturation | Adjust saturation (-1.0 = grayscale, 0.0 = no change, 1.0 = full saturation). |
ensureContrast | Returns a new color adjusted so that its contrast ratio against target meets or exceeds the given requiredContrast (WCAG-compatible). |
fromAbgr | Create a new Color from u32 ABGR value (reversed byte order). |
fromArgb(Argb) | Create a new Color from Argb enum value. |
fromArgb(u32) | Create a new Color from u32 ARGB value. |
fromArgb(u8, Argb) | Create a new Color from Argb enum value with custom alpha. |
fromArgb(u8, u8, u8, u8) | Create a new Color with specified ARGB values. |
fromArgbf | Create a new Color with specified ARGB float values. |
fromHsl | Create a new Color from HSL values (hue, saturation, lightness). |
fromLinear | Create a new Color from a linear-light Math.Vector4. |
fromRgb | Create a new Color with specified RGB values and opaque alpha. |
fromRgbf | Create a new Color with specified RGB float values and opaque alpha. |
fromVector4 | Create a new Color from Math.Vector4 (w=alpha, x=red, y=green, z=blue). |
generateDistinctColors | Generates N visually distinct colors. |
getBlend | Blend two colors using linear interpolation (including alpha). |
getBlendKeepAlpha | Blend two colors using linear interpolation, keeping col0s alpha channel. |
getComplementary | Get complementary color (opposite on color wheel). |
getContrastRatio | Calculates contrast ratio between this color and another. |
getContrasting | Get a contrasting color (black or white) for text readability. |
getDarker | Returns a darker version of the color by blending with black. |
getDistanceRgb | Calculate the RGB distance between this color and another (normalized to [0, 1]). |
getGrayScalef | Calculate the perceived brightness using luminance formula. |
getGrayscale | Convert to grayscale color preserving alpha. |
getLighter | Returns a lighter version of the color by blending with white. |
getRelativeLuminance | Calculate the relative luminance (Y) of the color in linear light. |
isDark | Check if the color is considered "dark" based on luminance. |
isLight | Check if the color is considered "light" based on luminance. |
isOpaque | Check if the color is fully opaque. |
multiply | Multiply color by another color (component-wise). |
rotateHue | Adjust hue by rotating around the color wheel. |
setArgb | Set all ARGB components with u8 values (0-255). |
setArgbf | Set all ARGB components with floats in the range [0, 1]. |
setHsl | Set color from HSL values (hue, saturation, lightness in range [0, 1]). |
setRgb(me, const &Color) | Copy RGB components from another color. |
setRgb(me, u8, u8, u8) | Set RGB components with u8 values (0-255). |
setRgbf | Set RGB components with floats in the range [0, 1]. |
toArgbf | Retrieve all ARGB components as floating point values between 0 and 1. |
toHsl | Convert color to HSL values (hue, saturation, lightness in range [0, 1]). |
toLinear | Convert the color to a linear-light Math.Vector4. |
toRgbf | Retrieve RGB components as floating point values between 0 and 1. |
toVector4 | Convert color to a Math.Vector4 (w=alpha, x=red, y=green, z=blue). |
withAlpha | Create a color with modified alpha. |
withAlphaf | Create a color with modified alpha (float version). |
opAffect(me, Argb) | Assignment operator for Argb enum value. |
opAffect(me, string) | Assignment operator for color name string. |
opAffect(me, u32) | Assignment operator for u32 ARGB value. |
opEquals(me, Argb) | Equality comparison with Argb enum value. |
opEquals(me, const &Color) | Equality comparison with another Color. |
opEquals(me, u32) | Equality comparison with u32 ARGB value. |
func IPokeValue.poke | [src] |
Parse a Color from a string representation.
Supports hex format (0x...), individual ARGB components, or named colors.
func Color.add | [src] |
Add colors with clamping.
func Color.adjustBrightness | [src] |
Adjust brightness (-1.0 = black, 0.0 = no change, 1.0 = white).
func Color.adjustSaturation | [src] |
Adjust saturation (-1.0 = grayscale, 0.0 = no change, 1.0 = full saturation).
func Color.ensureContrast | [src] |
Returns a new color adjusted so that its contrast ratio against target meets or exceeds the given requiredContrast (WCAG-compatible).
The function iteratively darkens or lightens the color depending on which direction increases contrast most effectively.
negative toward darker; the function automatically picks direction. - maxSteps: Maximum number of iterations (safety cap). - Returns: A new color meeting or exceeding the required contrast ratio.
func Color.fromAbgr | [src] |
Create a new Color from u32 ABGR value (reversed byte order).
func Color.fromArgb | [src] |
Create a new Color with specified ARGB values.
Create a new Color from Argb enum value.
Create a new Color from Argb enum value with custom alpha.
Create a new Color from u32 ARGB value.
func Color.fromArgbf | [src] |
Create a new Color with specified ARGB float values.
func Color.fromHsl | [src] |
Create a new Color from HSL values (hue, saturation, lightness).
func Color.fromLinear | [src] |
Create a new Color from a linear-light Math.Vector4.
Components are expected to be normalized in [0, 1]. Performs gamma correction (linear → sRGB) on the RGB channels. Useful for reconstructing an 8-bit Color after doing math in linear space.
func Color.fromRgb | [src] |
Create a new Color with specified RGB values and opaque alpha.
func Color.fromRgbf | [src] |
Create a new Color with specified RGB float values and opaque alpha.
func Color.fromVector4 | [src] |
Create a new Color from Math.Vector4 (w=alpha, x=red, y=green, z=blue).
func Color.generateDistinctColors | [src] |
Generates N visually distinct colors.
Uses golden-angle hue spacing to ensure that each color is clearly separated from the others, with slight lightness variation for good contrast against white text.
func Color.getBlend | [src] |
Blend two colors using linear interpolation (including alpha).
func Color.getBlendKeepAlpha | [src] |
Blend two colors using linear interpolation, keeping col0s alpha channel.
func Color.getComplementary | [src] |
Get complementary color (opposite on color wheel).
func Color.getContrastRatio | [src] |
Calculates contrast ratio between this color and another.
Uses the standard WCAG contrast formula: (l1 + 0.05) / (l2 + 0.05)
func Color.getContrasting | [src] |
Get a contrasting color (black or white) for text readability.
func Color.getDarker | [src] |
Returns a darker version of the color by blending with black.
func Color.getDistanceRgb | [src] |
Calculate the RGB distance between this color and another (normalized to [0, 1]).
func Color.getGrayScalef | [src] |
Calculate the perceived brightness using luminance formula.
func Color.getGrayscale | [src] |
Convert to grayscale color preserving alpha.
func Color.getLighter | [src] |
Returns a lighter version of the color by blending with white.
func Color.getRelativeLuminance | [src] |
Calculate the relative luminance (Y) of the color in linear light.
Uses the linearized RGB values from toLinear() and BT.709 coefficients (WCAG 2.x). Returns a scalar in [0, 1] representing perceived brightness. Formula: Y = 0.2126 * R_lin + 0.7152 * G_lin + 0.0722 * B_lin where R_lin, G_lin, B_lin are the linearized channels. #[Inline, ConstExpr]
func Color.isDark | [src] |
Check if the color is considered "dark" based on luminance.
func Color.isLight | [src] |
Check if the color is considered "light" based on luminance.
func Color.isOpaque | [src] |
Check if the color is fully opaque.
func Color.multiply | [src] |
Multiply color by another color (component-wise).
func Color.opAffect | [src] |
Assignment operator for u32 ARGB value.
Assignment operator for Argb enum value.
Assignment operator for color name string.
func Color.opEquals | [src] |
Equality comparison with u32 ARGB value.
Equality comparison with Argb enum value.
Equality comparison with another Color.
func Color.rotateHue | [src] |
Adjust hue by rotating around the color wheel.
func Color.setArgb | [src] |
Set all ARGB components with u8 values (0-255).
func Color.setArgbf | [src] |
Set all ARGB components with floats in the range [0, 1].
func Color.setHsl | [src] |
Set color from HSL values (hue, saturation, lightness in range [0, 1]).
func Color.setRgb | [src] |
Set RGB components with u8 values (0-255).
Alpha will be set to opaque (255).
Copy RGB components from another color.
Alpha remains unchanged.
func Color.setRgbf | [src] |
Set RGB components with floats in the range [0, 1].
Alpha will be set to opaque (255).
func Color.toArgbf | [src] |
Retrieve all ARGB components as floating point values between 0 and 1.
func Color.toHsl | [src] |
Convert color to HSL values (hue, saturation, lightness in range [0, 1]).
func Color.toLinear | [src] |
Convert the color to a linear-light Math.Vector4.
Components are normalized to [0, 1], with gamma-correct sRGB → linear conversion applied. Useful for rendering, lighting, and blending operations where linear color space is required instead of gamma-encoded sRGB.
func Color.toRgbf | [src] |
Retrieve RGB components as floating point values between 0 and 1.
func Color.toVector4 | [src] |
Convert color to a Math.Vector4 (w=alpha, x=red, y=green, z=blue).
func Color.withAlpha | [src] |
Create a color with modified alpha.
func Color.withAlphaf | [src] |
Create a color with modified alpha (float version).
struct Pixel.ColorMask | [src] |
r | bool | |
g | bool | |
b | bool | |
a | bool |
struct Pixel.Command | [src] |
id | CommandId | |
using params | {clear:{color:Color},drawTriangles:{start:u32,count:u32},transform:{tr:Core.Math.Transform2},clippingRect:{rect:Core.Math.Rectangle},clippingRegion:{mode:ClippingMode},font:{fontRef:*Font},blendingMode:{mode:BlendingMode},textureFont:{font:*Font,atlasIndex:s32},colorMask:ColorMask,renderTgt:{tgt:*RenderTarget,paintAlpha:bool},shader:{shader:*ShaderBase},shaderParam:{param:ShaderParamHandle,type:const *Swag.TypeInfo,_f32:f32,_s32:s32},texture0:{boundRect:Core.Math.Vector4,textureRect:Core.Math.Vector4,type:BrushType,hatch:HatchStyle,uvMode:UVMode,interpolationMode:InterpolationMode,texture:Texture}} |
enum Pixel.CommandId | [src] |
Clear | |
ColorMask | |
Transform | |
DrawTriangles | |
BindTexture0 | |
ResetTexture0 | |
StartFont | |
EndFont | |
BindTextureFont | |
ResetTextureFont | |
SetClippingRect | |
ResetClippingRect | |
StartClippingRegion | |
EndClippingRegion | |
ResetClippingRegion | |
SetClippingRegionMode | |
UpdateFont | |
StartNoOverlap | |
StopNoOverlap | |
SetBlendingMode | |
BindRenderTarget | |
UnbindRenderTarget | |
ReleaseRenderTarget | |
SetShader | |
SetShaderParam |
enum Pixel.DashCapStyle | [src] |
None | |
Triangle | |
Round | |
Square |
enum Pixel.DashStyle | [src] |
None | |
Pattern | |
Dot | |
Dash | |
DashDot |
struct Pixel.DecodeOptions | [src] |
decodePixels | bool | |
decodeMetaDatas | bool |
enum Pixel.DefaultShaderId | [src] |
Default | |
Blur |
enum Pixel.DrawPathListMode | [src] |
Separate | |
Merge |
struct Pixel.Element | [src] |
type | ElementType | |
position | Core.Math.Vector2 | |
p1 | Core.Math.Vector2 | |
p2 | Core.Math.Vector2 |
enum Pixel.ElementType | [src] |
Line | |
Arc | |
Bezier1 | |
Bezier2 | |
Curve |
struct Pixel.Font | [src] |
ascent | f32 | |
descent | f32 | |
height | f32 | |
underlinePos | f32 | |
underlineSize | f32 | |
forceBold | bool | |
forceItalic | bool | |
fullname | Core.String | |
typeFace | *TypeFace | |
size | u32 | |
atlases | Core.Array'(GlyphAtlas) | |
asciiRef | [128] GlyphDesc | |
unicodeRef | Core.HashTable'(rune, *GlyphDesc) | |
dirty | bool |
clearCaches | Clear internal caches. |
create(*TypeFace, u32, bool, bool) | Creates a new Font of the given typeface and size. |
create(string, u32, bool, bool) | Creates a new Font with the given filename and size. |
getGlyphDesc | Returns the glyph descriptor of a given rune. |
release | Release the given font. |
opDrop |
func Font.clearCaches | [src] |
Clear internal caches.
func Font.create | [src] |
Creates a new Font of the given typeface and size.
Creates a new Font with the given filename and size.
func Font.getGlyphDesc | [src] |
Returns the glyph descriptor of a given rune.
func Font.opDrop | [src] |
func Font.release | [src] |
Release the given font.
struct Pixel.FontFamily | [src] |
regular | *Font | |
bold | *Font | |
italic | *Font | |
boldItalic | *Font |
createTypeFace | Creates a typeface from a FontFamilyEnumerate and FontFamilyStyle. |
enumerateFromOs | Enumerate the font families available in the os. |
getFont | Get the font corresponding to the style. |
getFromOs | Get a FontFamilyEnumerate from a font family name. |
setFont | Set the font corresponding to a given style. |
func FontFamily.createTypeFace | [src] |
Creates a typeface from a FontFamilyEnumerate and FontFamilyStyle.
func FontFamily.enumerateFromOs | [src] |
Enumerate the font families available in the os.
func FontFamily.getFont | [src] |
Get the font corresponding to the style.
If not evailable, get another one.
func FontFamily.getFromOs | [src] |
Get a FontFamilyEnumerate from a font family name.
func FontFamily.setFont | [src] |
Set the font corresponding to a given style.
struct Pixel.FontFamilyEnumerate | [src] |
name | Core.String | |
faces | [4] FontFamilyStyleEnumerate |
enum Pixel.FontFamilyStyle | [src] |
Regular | |
Bold | |
Italic | |
BoldItalic |
struct Pixel.FontFamilyStyleEnumerate | [src] |
name | Core.String | |
face | Gdi32.LOGFONTW |
namespace Pixel.Gif |
Decoder |
struct Gif.Decoder | [src] |
getFrame | Create an image for the current frame. |
getNumFrames | Returns the number of frames As Gif does not store it, we need to go threw all images (!). |
init | Initialize the decoder. |
nextFrame | Get the next frame. Returns false if we have reached the end. |
rewind | Restart at frame 0. |
func IImageDecoder.canDecode | [src] |
func IImageDecoder.decode | [src] |
func Decoder.getFrame | [src] |
Create an image for the current frame.
func Decoder.getNumFrames | [src] |
Returns the number of frames As Gif does not store it, we need to go threw all images (!).
func Decoder.init | [src] |
Initialize the decoder.
func Decoder.nextFrame | [src] |
Get the next frame. Returns false if we have reached the end.
func Decoder.rewind | [src] |
Restart at frame 0.
struct Pixel.GlyphAtlas | [src] |
texture | Texture | |
width | u32 | |
height | u32 | |
bpp | u32 | |
datas | Core.Array'(u8) | |
dirty | bool | |
curX | s32 | |
curY | s32 | |
nextY | s32 |
struct Pixel.GlyphDesc | [src] |
uv | Core.Math.Rectangle | |
atlasIndex | s32 | |
advanceX | f32 | |
advanceY | f32 | |
shiftX | f32 | |
shiftY | f32 | |
width | f32 | |
height | f32 |
enum Pixel.HatchStyle | [src] |
Dot | |
Horizontal | |
HorizontalLight | |
HorizontalNarrow | |
Vertical | |
VerticalLight | |
VerticalNarrow | |
SolidDiamond | |
OutlinedDiamond | |
HorizontalDark | |
VerticalDark | |
Grid | |
GridLarge | |
GridDotted | |
Cross | |
CrossLarge | |
Percent5 | |
Percent10 | |
Percent20 | |
Percent25 | |
Percent30 | |
Percent40 | |
Percent50 | |
Percent60 | |
Percent70 | |
Percent75 | |
Percent80 | |
Percent90 | |
CheckBoard | |
CheckBoardLarge | |
Weave | |
DiagonalForward | |
DiagonalForwardLight | |
DiagonalBackward | |
DiagonalBackwardLight | |
DiagonalCross |
interface Pixel.IImageDecoder | [src] |
Interface to decode a buffer.
canDecode | func(*IImageDecoder, string)->bool | |
decode | func(*IImageDecoder, const [..] u8, DecodeOptions)->Image throw |
interface Pixel.IImageEncoder | [src] |
Interface to decode a buffer.
canEncode | func(*IImageEncoder, string)->bool | |
encode | func(*IImageEncoder, *Core.ConcatBuffer, Image, any) throw |
struct Pixel.Image | [src] |
An image buffer, in various pixel formats.
pixels | Core.Array'(u8) | All the pixels. |
size | u64 | Size in bytes. |
width | s32 | The width of the image. |
height | s32 | The height of the image. |
width8 | s32 | The width, in bytes. |
pf | PixelFormat | Format of one pixel. |
bpp | u8 | Bits per pixel. |
bpp8 | u8 | Bytes per pixel. |
metaDatas | Core.Array'(ImageMetaData) | |
workingBuffer | *Image | Temporary buffer for filters and transformations. |
addDecoder | Register an image decoder. |
addEncoder | Register an image encoder. |
allocPixels | Allocate pixels. |
allocWorkingBuffer(me) | Allocate a computing buffer with current image size. |
allocWorkingBuffer(me, s32, s32, PixelFormat) | Allocate a computing buffer with new sizes. |
applyKernel | Apply a kernel to the image. |
applyWorkingBuffer | Replace the current image content with the working buffer. |
canLoad | Returns true if the given filename has a corresponding decoder. |
canSave | Returns true if the given filename has a corresponding encoder. |
clear | Clear the content of the image. |
colorize | Colorize the image by setting the hue and saturation. |
contrast | Change the contrast. factor is [-1, 1]. |
convertToRGBA8 | Set pixel values at pixDst depending on pixel format Destination is supped to be in RGBA8 format. |
copyPixelDirect | Copy one pixel, depending on bpp. |
create | Creates a new image. |
crop(me, const &Rectangle) | |
crop(me, s32, s32, s32, s32) | Crop image. |
decode | Decode the given image buffer. |
evaluateCropScore | |
expand | Crop image. |
fade | Fade to a given color. factor is [0, 1]. |
fill | Fill image with color. |
fillGradient2 | Fill with an horizontal gradient from color0 to color1. |
fillGradient4 | Fill with a gradient with a different color at each corner. |
fillHsl | |
fitToRect | Fits the image to fill the target rectangle while maintaining aspect ratio. |
flip | Flip image vertically. |
freeWorkingBuffer | Free the working buffer if allocated. |
from(HBITMAP) | Creates an image from a windows HBITMAP. |
from(HICON) | Creates an image from a windows HICON. |
gamma | Change the gamma. |
getAspectRatio | Returns the image aspect ratio. |
getPixelColor | Returns the color at the given coordinate. |
getPixelColorDirect | Set pixel values depending on pixel format. |
grayScale | Transform image to grayscale, with a given factor. |
halfSize | Divide image size by 2 with a bilinear 2x2 filter. |
init | Initialize image informations pixels is set to null, and must be initialized after a call to that function This gives the opportunity to set the pixels with an external buffer. |
invert | Invert colors. |
isSquare | Returns true if the image is square. |
isValid | Returns true if the image is valid. |
lightness | Change the lightness. factor is [-1, 1]. |
load | Load the given image file. |
mirror | Flip image horizontally. |
mix | Mix with another image. |
noise | Fill the image with a noise. |
release | Release the content of the image. |
resize | Resize image Put newWidth or newHeight to 0 to keep aspect ratio. |
save | Save the image to a file. |
setAlpha | Change the alpha channel. |
setChannel | Change specified color channels. |
setPixelFormat | Change image pixel format. |
smartCrop | |
toApplyKernel | Apply a kernel to the image. |
toCrop(me, const &Rectangle) | |
toCrop(me, s32, s32, s32, s32) | Crop image. |
toExpand | Crop image. |
toFlip | Flip image vertically. |
toHICON | Transform an image to a windows icon. |
toHalfSize | Divide image size by 2 with a bilinear 2x2 filter. |
toMirror | Flip image horizontally. |
toMix | Mix with another image. |
toResize | Resize image Put newWidth or newHeight to 0 to keep aspect ratio. |
toSetPixelFormat | Change image pixel format. |
toTurn | Turn image by a given predefined angle. |
turn | Turn image by a given predefined angle. |
visitPixels | Macro to foreach all pixels of the image in parallel chunks. |
opDrop | |
opPostCopy | |
opVisit |
enum Image.ChannelMode | [src] |
Red | |
Green | |
Blue | |
Alpha | |
RGB | |
RGBA |
enum Image.ChannelValueMode | [src] |
Color | |
MinRGB | |
MaxRGB | |
MeanRGB | |
Alpha |
enum Image.FillHslType | [src] |
HueVert | |
HueHorz | |
SaturationVert | |
SaturationHorz | |
LightnessVert | |
LightnessHorz | |
HueSaturation | |
HueLightness | |
SaturationLightness | (h,0,1) (h,1,0.5) (h,0,0) (h,1,0). |
GreenBlue | |
RedBlue | |
RedGreen |
enum Image.Kernel | [src] |
Kernel format is : kernelSize, kernelNormalizeValue, kernelValues...
GaussianBlur3x3A | |
GaussianBlur3x3B | |
GaussianBlur5x5A | |
BoxBlur3x3A | |
BoxBlur5x5A | |
Sharpen3x3A | |
Sharpen3x3B | |
Soften3x3A | |
EmbossLeft3x3A | |
EmbossLeft3x3B | |
EmbossLeft3x3C | |
EmbossRight3x3A | |
EmbossRight3x3B | |
EmbossRight3x3C | |
EdgeDetect3x3A | |
EdgeDetect3x3B | |
EdgeDetect3x3C | |
EdgeDetect3x3D | |
EdgeDetect3x3E | |
EdgeDetect3x3F | |
SobelHorizontal3x3A | |
SobelVertical3x3A | |
PrevitHorizontal3x3A | |
PrevitVertical3x3A |
enum Image.MixMode | [src] |
Copy | |
AlphaBlend |
enum Image.ResizeMode | [src] |
Raw | |
Bilinear | |
Bicubic | |
Gaussian | |
Quadratic | |
Hermite | |
Hamming | |
Catrom |
struct Image.SmartCropSearchOpts | [src] |
Smart crop search parameters.
minCoverage | f32 | |
blurRadius | s32 | |
strideFrac | f32 | |
thirdsWeight | f32 | |
centerWeight | f32 | |
shrinkPrior | f32 | |
edgePenalty | f32 | |
faceWeight | f32 | |
maxSearchSteps | s32 | |
maxSize | s32 |
enum Image.TurnAngle | [src] |
T90 | |
T180 | |
T270 |
func Image.addDecoder | [src] |
Register an image decoder.
func Image.addEncoder | [src] |
Register an image encoder.
func Image.allocPixels | [src] |
Allocate pixels.
Pixels will not be initialized.
func Image.allocWorkingBuffer | [src] |
Allocate a computing buffer with current image size.
Allocate a computing buffer with new sizes.
func Image.applyKernel | [src] |
Apply a kernel to the image.
func Image.applyWorkingBuffer | [src] |
Replace the current image content with the working buffer.
func Image.canLoad | [src] |
Returns true if the given filename has a corresponding decoder.
func Image.canSave | [src] |
Returns true if the given filename has a corresponding encoder.
func Image.clear | [src] |
Clear the content of the image.
func Image.colorize | [src] |
Colorize the image by setting the hue and saturation.
func Image.contrast | [src] |
Change the contrast. factor is [-1, 1].
func Image.convertToRGBA8 | [src] |
Set pixel values at pixDst depending on pixel format Destination is supped to be in RGBA8 format.
func Image.copyPixelDirect | [src] |
Copy one pixel, depending on bpp.
func Image.create | [src] |
Creates a new image.
func Image.crop | [src] |
Crop image.
func Image.decode | [src] |
Decode the given image buffer.
func Image.evaluateCropScore | [src] |
func Image.expand | [src] |
Crop image.
func Image.fade | [src] |
Fade to a given color. factor is [0, 1].
func Image.fill | [src] |
Fill image with color.
func Image.fillGradient2 | [src] |
Fill with an horizontal gradient from color0 to color1.
func Image.fillGradient4 | [src] |
Fill with a gradient with a different color at each corner.
func Image.fillHsl | [src] |
func Image.fitToRect | [src] |
Fits the image to fill the target rectangle while maintaining aspect ratio.
The image is scaled to cover the entire target area, then cropped to exact dimensions. Uses center cropping to preserve the most important part of the image.
func Image.flip | [src] |
Flip image vertically.
func Image.freeWorkingBuffer | [src] |
Free the working buffer if allocated.
func Image.from | [src] |
Creates an image from a windows HICON.
Creates an image from a windows HBITMAP.
func Image.gamma | [src] |
Change the gamma.
func Image.getAspectRatio | [src] |
Returns the image aspect ratio.
func Image.getPixelColor | [src] |
Returns the color at the given coordinate.
func Image.getPixelColorDirect | [src] |
Set pixel values depending on pixel format.
func Image.grayScale | [src] |
Transform image to grayscale, with a given factor.
func Image.halfSize | [src] |
Divide image size by 2 with a bilinear 2x2 filter.
func Image.init | [src] |
Initialize image informations pixels is set to null, and must be initialized after a call to that function This gives the opportunity to set the pixels with an external buffer.
func Image.invert | [src] |
Invert colors.
func Image.isSquare | [src] |
Returns true if the image is square.
func Image.isValid | [src] |
Returns true if the image is valid.
func Image.lightness | [src] |
Change the lightness. factor is [-1, 1].
func Image.load | [src] |
Load the given image file.
func Image.mirror | [src] |
Flip image horizontally.
func Image.mix | [src] |
Mix with another image.
func Image.noise | [src] |
Fill the image with a noise.
func Image.opDrop | [src] |
func Image.opPostCopy | [src] |
func Image.opVisit | [src] |
func Image.release | [src] |
Release the content of the image.
func Image.resize | [src] |
Resize image Put newWidth or newHeight to 0 to keep aspect ratio.
func Image.save | [src] |
Save the image to a file.
func Image.setAlpha | [src] |
Change the alpha channel.
func Image.setChannel | [src] |
Change specified color channels.
func Image.setPixelFormat | [src] |
Change image pixel format.
func Image.smartCrop | [src] |
func Image.toApplyKernel | [src] |
Apply a kernel to the image.
func Image.toCrop | [src] |
Crop image.
func Image.toExpand | [src] |
Crop image.
func Image.toFlip | [src] |
Flip image vertically.
func Image.toHICON | [src] |
Transform an image to a windows icon.
func Image.toHalfSize | [src] |
Divide image size by 2 with a bilinear 2x2 filter.
func Image.toMirror | [src] |
Flip image horizontally.
func Image.toMix | [src] |
Mix with another image.
func Image.toResize | [src] |
Resize image Put newWidth or newHeight to 0 to keep aspect ratio.
func Image.toSetPixelFormat | [src] |
Change image pixel format.
func Image.toTurn | [src] |
Turn image by a given predefined angle.
func Image.turn | [src] |
Turn image by a given predefined angle.
func Image.visitPixels | [src] |
Macro to foreach all pixels of the image in parallel chunks.
Exported variables:
pix | address of the pixel |
image | the processed image |
index | the pixel index |
x | the pixel x coordinates |
y | the pixel y coordinates |
userData | as passed to the macro |
struct Pixel.ImageMetaData | [src] |
sig | u32 | |
tag | Core.Array'(u8) | |
value | Core.Array'(u8) |
isTag | Returns true if the metadata has the tag val. |
toSlice | Convert the value to a slice. |
func ImageMetaData.isTag | [src] |
Returns true if the metadata has the tag val.
func ImageMetaData.toSlice | [src] |
Convert the value to a slice.
namespace Pixel.ImageStatistics |
HaarFeatures | Structure to store Haar coefficients. |
compareHaarCoefficients | Compare Haar coefficients with multiscale weights. |
extractHaarFeatures | Extract Haar coefficients from the image. |
haarCompareTo | Compare to another image with Haar coefficients. |
quickCompareHaarCoefficients | Compare Haar coefficients (simplified version). |
quickExtractHaarFeatures | Extract Haar coefficients from the image (fast version). |
quickHaarCompareTo | Compare to another image with Haar coefficients, fast simplified version. |
struct ImageStatistics.HaarFeatures | [src] |
Structure to store Haar coefficients.
coefficients | Core.Array'(f32) | Multi-scale Haar coefficients. |
size | s32 | Representation size (power of 2). |
levels | s32 | Number of decomposition levels. |
func ImageStatistics.compareHaarCoefficients | [src] |
Compare Haar coefficients with multiscale weights.
func ImageStatistics.extractHaarFeatures | [src] |
Extract Haar coefficients from the image.
func ImageStatistics.haarCompareTo | [src] |
Compare to another image with Haar coefficients.
func ImageStatistics.quickCompareHaarCoefficients | [src] |
Compare Haar coefficients (simplified version).
func ImageStatistics.quickExtractHaarFeatures | [src] |
Extract Haar coefficients from the image (fast version).
func ImageStatistics.quickHaarCompareTo | [src] |
Compare to another image with Haar coefficients, fast simplified version.
enum Pixel.InterpolationMode | [src] |
Pixel | |
Linear |
enum Pixel.JoinStyle | [src] |
None | |
Bevel | |
Round | |
Miter | |
MiterBevel |
namespace Pixel.Jpg |
Decoder | |
EncodeOptions | |
Encoder |
struct Jpg.Decoder | [src] |
func IImageDecoder.canDecode | [src] |
func IImageDecoder.decode | [src] |
struct Jpg.EncodeOptions | [src] |
quality | u8 | Encoding quality between 1 and 100. |
struct Jpg.Encoder | [src] |
func IImageEncoder.canEncode | [src] |
func IImageEncoder.encode | [src] |
enum Pixel.LineCapStyle | [src] |
None | |
Triangle | |
Round | |
Square | |
ArrowAnchor | |
ArrowAnchor2 | |
SquareAnchor | |
RoundAnchor |
struct Pixel.LinePath | [src] |
elements | Core.Array'(Element) | |
startPoint | Core.Math.Vector2 | |
endPoint | Core.Math.Vector2 | |
isClosed | bool | |
isDirty | bool | |
serial | s32 | |
flattenQuality | PaintQuality | |
isPolyOnly | bool | |
isFlatten | bool | |
bvMin | Core.Math.Vector2 | |
bvMax | Core.Math.Vector2 | |
endPosBuffer | Core.Math.Vector2 | |
polygon | Polygon | |
triangles | Poly2Tri.Result |
arcTo | Add an arc from the previous point. |
bezierTo(me, f32, f32, f32, f32) | Add a curve from the previous point to pt. |
bezierTo(me, f32, f32, f32, f32, f32, f32) | Add a curve from the previous point to pt. |
clearCache | Clear internal cache. |
close | Close the figure Will add a line or a curve to the first point if necessary. |
curveTo | Add a curve from the previous point to pt. |
flatten | Convert the path to a list of points. |
lineTo | Add a line from the previous point to pt. |
setArc | Initialize the path with an arc. |
setCircle | Initialize the path with a circle. |
setEllipse | Initialize the path with an ellipse. |
setRect | Initialize the path with a rectangle. |
setRoundRect | Initialize the path with a round rectangle. |
start | Reset the path. |
opDrop | |
opPostCopy |
func LinePath.arcTo | [src] |
Add an arc from the previous point.
func LinePath.bezierTo | [src] |
Add a curve from the previous point to pt.
func LinePath.clearCache | [src] |
Clear internal cache.
func LinePath.close | [src] |
Close the figure Will add a line or a curve to the first point if necessary.
func LinePath.curveTo | [src] |
Add a curve from the previous point to pt.
func LinePath.flatten | [src] |
Convert the path to a list of points.
func LinePath.lineTo | [src] |
Add a line from the previous point to pt.
func LinePath.opDrop | [src] |
func LinePath.opPostCopy | [src] |
func LinePath.setArc | [src] |
Initialize the path with an arc.
func LinePath.setCircle | [src] |
Initialize the path with a circle.
func LinePath.setEllipse | [src] |
Initialize the path with an ellipse.
func LinePath.setRect | [src] |
Initialize the path with a rectangle.
func LinePath.setRoundRect | [src] |
Initialize the path with a round rectangle.
func LinePath.start | [src] |
Reset the path.
struct Pixel.LinePathList | [src] |
paths | Core.Array'(*LinePath) | |
bvMin | Core.Math.Vector2 | |
bvMax | Core.Math.Vector2 |
clean | Clean all paths They must before be flattened. |
clear | Remove all internal line paths. |
count | |
flatten | Flatten all paths. |
newPath | Returns a new path. |
offset(me, f32) | Call fast offset on all paths They must before be flattened. |
offset(me, f32, JoinStyle, f32) | Call quality offset on all paths They must before be flattened. |
opDrop | |
opPostCopy |
func LinePathList.clean | [src] |
Clean all paths They must before be flattened.
func LinePathList.clear | [src] |
Remove all internal line paths.
func LinePathList.count | [src] |
func LinePathList.flatten | [src] |
Flatten all paths.
func LinePathList.newPath | [src] |
Returns a new path.
func LinePathList.offset | [src] |
Call fast offset on all paths They must before be flattened.
Call quality offset on all paths They must before be flattened.
func LinePathList.opDrop | [src] |
func LinePathList.opPostCopy | [src] |
struct Pixel.NativeRenderOgl | [src] |
createContext(me, HDC, s32, s32, HGLRC) | |
createContext(me, HWND, s32, s32, HGLRC) | |
dropContext | |
setCurrentContext | |
swapBuffers |
func NativeRenderOgl.createContext | [src] |
func NativeRenderOgl.dropContext | [src] |
func NativeRenderOgl.setCurrentContext | [src] |
func NativeRenderOgl.swapBuffers | [src] |
enum Pixel.PaintParams | [src] |
Zero | |
Antialiased | |
Default |
enum Pixel.PaintQuality | [src] |
Draft | |
Normal |
struct Pixel.PaintState | [src] |
paintParams | PaintParams | |
paintQuality | PaintQuality | |
transform | Core.Math.Transform2 | |
blendingMode | BlendingMode | |
interpolationMode | InterpolationMode | |
clippingRect | Core.Math.Rectangle | |
stackClipRect | Core.Array'(Core.Math.Rectangle) | |
clippingRectOn | bool | |
colorMask | ColorMask |
struct Pixel.Painter | [src] |
commandBuffer | Core.Array'(Command) | |
vertexBuffer | Core.Array'(VertexLayout) | |
triangulateIdx | Core.Array'(s32) | |
fake | bool | |
sharedLinePath | LinePath | |
sharedLinePathList | LinePathList | |
sharedRoundTmp | Core.Array'({factor:f32,pos:Core.Math.Vector2}) | |
curState | PaintState | |
stackState | Core.Array'(PaintState) | |
stackTransform | Core.Array'(Core.Math.Transform2) | |
lastTexture0Type | BrushType | |
tess | Poly2Tri.Tessellate | |
stackRT | Core.Array'(*RenderTarget) | |
curRT | *RenderTarget | |
lastTexture0Handle | TextureHandle | |
hasTextureFont | bool | |
drawingBegin | bool | |
overlapMode | bool | |
canSetTexture0 | bool |
addParams | |
begin | Call this before drawing. |
bindRenderTarget | Bind a render target. |
capStyleExtent | Returns the extent in both directions of a given LineCapStyle. |
clear | Clear the rendering surface. |
computeLayout | Recompute the layout for a given rectangle. |
drawArc(me, f32, f32, f32, const &Angle, const &Angle, const &Color, f32) | Draw an arc between two angles. |
drawArc(me, f32, f32, f32, const &Angle, const &Angle, const &Pen) | |
drawBezier | |
drawCircle(me, f32, f32, f32, const &Color, f32) | Draw an empty circle. |
drawCircle(me, f32, f32, f32, const &Pen) | |
drawEllipse(me, const &Rectangle, const &Color, f32) | |
drawEllipse(me, const &Rectangle, const &Pen) | |
drawEllipse(me, f32, f32, f32, f32, const &Color, f32) | Draw an empty ellipse. |
drawEllipse(me, f32, f32, f32, f32, const &Pen) | |
drawLine(me, const &Vector2, const &Vector2, const &Pen) | Draw a line. |
drawLine(me, f32, f32, f32, f32, const &Color, f32) | |
drawLine(me, f32, f32, f32, f32, const &Pen) | |
drawPath(me, *LinePath, const &Color, f32) | Draw a line path. |
drawPath(me, *LinePath, const &Pen) | |
drawPath(me, *LinePathList, const &Color, f32, DrawPathListMode) | |
drawPath(me, *LinePathList, const &Pen, DrawPathListMode) | Draw a list of paths. |
drawRect(me, const &Rectangle, const &Color, f32) | |
drawRect(me, const &Rectangle, const &Pen) | |
drawRect(me, f32, f32, f32, f32, const &Color, f32) | Draw an empty rectangle. |
drawRect(me, f32, f32, f32, f32, const &Pen) | |
drawRichString | Draw a rich string. |
drawRoundRect(me, const &Rectangle, f32, f32, const &Color, f32) | |
drawRoundRect(me, const &Rectangle, f32, f32, const &Pen) | |
drawRoundRect(me, f32, f32, f32, f32, f32, f32, const &Color, f32) | Draw an empty round rectangle. |
drawRoundRect(me, f32, f32, f32, f32, f32, f32, const &Pen) | |
drawString(me, f32, f32, string, *Font, const &Brush, UnderlineStyle, f32) | Draw a simple string. |
drawString(me, f32, f32, string, *Font, const &Color, UnderlineStyle, f32) | Draw a simple string. |
drawStringCenter | Draw a simple string (centered). |
drawTexture(me, const &Rectangle, const &Rectangle, const &Texture, const &Color) | |
drawTexture(me, const &Rectangle, const &Texture, const &Color) | |
drawTexture(me, f32, f32, const &Rectangle, const &Texture, const &Color) | |
drawTexture(me, f32, f32, const &Texture, const &Color) | |
drawTexture(me, f32, f32, f32, f32, const &Rectangle, const &Texture, const &Color) | Draw a portion of an image. |
drawTexture(me, f32, f32, f32, f32, const &Texture, const &Color) | Draw a texture image. |
end | Call this after drawing. |
endClippingRegion | Stop painting in the clipping buffer. Back to normal. |
fillCircle(me, f32, f32, f32, const &Brush) | Draw a solid circle. |
fillCircle(me, f32, f32, f32, const &Color) | |
fillEllipse(me, const &Rectangle, const &Brush) | |
fillEllipse(me, const &Rectangle, const &Color) | |
fillEllipse(me, f32, f32, f32, f32, const &Brush) | Draw a solid ellipse. |
fillEllipse(me, f32, f32, f32, f32, const &Color) | |
fillPath(me, *LinePath, const &Brush) | |
fillPath(me, *LinePath, const &Color) | |
fillPath(me, *LinePathList, const &Brush) | Fill a list of paths. |
fillPath(me, *LinePathList, const &Color) | Fill a list of paths. |
fillPolygon(me, *LinePath, const &Brush) | Fill the polygon with the given brush. |
fillPolygon(me, *LinePath, const &Color) | Fill the polygon with the given color. |
fillPolygon(me, [..] Vector2, const &Brush) | Fill the polygon with the given brush. |
fillRect(me, const &Rectangle, const &Brush) | |
fillRect(me, const &Rectangle, const &Color) | |
fillRect(me, f32, f32, f32, f32, const &Brush) | Draw a filled rectangle. |
fillRect(me, f32, f32, f32, f32, const &Color) | |
fillRoundRect(me, const &Rectangle, f32, f32, const &Brush) | |
fillRoundRect(me, const &Rectangle, f32, f32, const &Color) | |
fillRoundRect(me, f32, f32, f32, f32, f32, f32, const &Brush) | Draw a filled round rectangle. |
fillRoundRect(me, f32, f32, f32, f32, f32, f32, const &Color) | |
getClippingRect | Get the current clipping rectangle. |
getGlyphs(const &Array'(rune), *Font) | Returns all the glyphs for a given string and font. |
getGlyphs(string, *Font) | Returns all the glyphs for a given string and font. |
getParams | |
getQuality | |
getTransform | Returns the current tranformation. |
isEmptyClippingRect | Returns true if the current clipping rectangle is empty (no drawing !). |
measureRune | Get a rune size for a given font. |
measureString(const &Array'(const *GlyphDesc)) | Returns the bounding rectangle of a given text, at a given position. |
measureString(string, *Font) | Returns the metrics of a given text. |
popClippingRect | Restore the original clipping rectangle. |
popState | Restore the last paint state. |
popTransform | Restore the pushed transformation. |
pushClippingRect | Interface the given rectangle with the current clipping rectangle. |
pushClippingSurfaceRect | Interface the given rectangle with the current clipping rectangle. |
pushState | Save the current paint state. |
pushTransform | Push the current transformation. |
releaseRenderTarget | Release the render target. |
removeParams | |
resetClippingRect | Reset the current clipping rectangle. |
resetClippingRegion | Reset clipping buffer to its default value (no more clipping). |
resetState | Reset the current painting state. |
resetTransform | Reset the paint position, rotation, scale. |
rotateTransform(me, const &Angle) | Set the paint rotation. |
rotateTransform(me, const &Angle, f32, f32) | Set the paint rotation. |
rotateTransformInPlace | Set the paint rotation. |
scaleTransform(me, f32) | Set the paint scale. |
scaleTransform(me, f32, f32) | Set the paint scale. |
setAntialiased | Set antialiased mode on/off. |
setBlendingMode | Set the current blending mode. |
setClippingRect(me, const &Rectangle) | Set the current clipping rectangle. |
setClippingRect(me, f32, f32, f32, f32) | Set the current clipping rectangle. |
setClippingRegionMode | Set the clipping region mode. |
setColorMask(me, bool, bool, bool, bool) | Set color mask. |
setColorMask(me, const &ColorMask) | Set color mask. |
setColorMaskAlpha | |
setColorMaskColor | |
setColorMaskFull | |
setInterpolationMode | Set the texture interpolation mode. |
setParams | Set the paint parameters. |
setQuality | Set the paint quality. |
setShader | Set the current shader. |
setShaderParam(me, ShaderParamHandle, f32) | Set a shader parameter. |
setShaderParam(me, ShaderParamHandle, s32) | Set a shader parameter. |
setState | Set the current painting state. |
setTransform | Set the paint transformation. |
startClippingRegion | Start painting in the clipping buffer. |
translateTransform | Set the paint position. |
unbindRenderTarget | Bind a render target. |
func Painter.addParams | [src] |
func Painter.begin | [src] |
Call this before drawing.
func Painter.bindRenderTarget | [src] |
Bind a render target.
func Painter.capStyleExtent | [src] |
Returns the extent in both directions of a given LineCapStyle.
Returns the width and the length.
func Painter.clear | [src] |
Clear the rendering surface.
func Painter.computeLayout | [src] |
Recompute the layout for a given rectangle.
func Painter.drawArc | [src] |
Draw an arc between two angles.
func Painter.drawBezier | [src] |
func Painter.drawCircle | [src] |
Draw an empty circle.
func Painter.drawEllipse | [src] |
Draw an empty ellipse.
func Painter.drawLine | [src] |
Draw a line.
func Painter.drawPath | [src] |
Draw a line path.
Draw a list of paths.
func Painter.drawRect | [src] |
Draw an empty rectangle.
func Painter.drawRichString | [src] |
Draw a rich string.
A rich string can be multiline, and accepts internal formats. The layout will be computed at the first call, and each time pos has changed.
func Painter.drawRoundRect | [src] |
Draw an empty round rectangle.
func Painter.drawString | [src] |
Draw a simple string.
func Painter.drawStringCenter | [src] |
Draw a simple string (centered).
func Painter.drawTexture | [src] |
Draw a texture image.
Draw a portion of an image.
func Painter.end | [src] |
Call this after drawing.
func Painter.endClippingRegion | [src] |
Stop painting in the clipping buffer. Back to normal.
func Painter.fillCircle | [src] |
Draw a solid circle.
func Painter.fillEllipse | [src] |
Draw a solid ellipse.
func Painter.fillPath | [src] |
Fill a list of paths.
Fill a list of paths.
If the path is clockwise, it will be filled. If the path is anti-clockwise, it will be considered as a hole.
func Painter.fillPolygon | [src] |
Fill the polygon with the given color.
Fill the polygon with the given brush.
func Painter.fillRect | [src] |
Draw a filled rectangle.
func Painter.fillRoundRect | [src] |
Draw a filled round rectangle.
func Painter.getClippingRect | [src] |
Get the current clipping rectangle.
func Painter.getGlyphs | [src] |
Returns all the glyphs for a given string and font.
func Painter.getParams | [src] |
func Painter.getQuality | [src] |
func Painter.getTransform | [src] |
Returns the current tranformation.
func Painter.isEmptyClippingRect | [src] |
Returns true if the current clipping rectangle is empty (no drawing !).
func Painter.measureRune | [src] |
Get a rune size for a given font.
func Painter.measureString | [src] |
Returns the metrics of a given text.
Returns the bounding rectangle of a given text, at a given position.
func Painter.popClippingRect | [src] |
Restore the original clipping rectangle.
func Painter.popState | [src] |
Restore the last paint state.
func Painter.popTransform | [src] |
Restore the pushed transformation.
func Painter.pushClippingRect | [src] |
Interface the given rectangle with the current clipping rectangle.
func Painter.pushClippingSurfaceRect | [src] |
Interface the given rectangle with the current clipping rectangle.
func Painter.pushState | [src] |
Save the current paint state.
func Painter.pushTransform | [src] |
Push the current transformation.
func Painter.releaseRenderTarget | [src] |
Release the render target.
func Painter.removeParams | [src] |
func Painter.resetClippingRect | [src] |
Reset the current clipping rectangle.
func Painter.resetClippingRegion | [src] |
Reset clipping buffer to its default value (no more clipping).
func Painter.resetState | [src] |
Reset the current painting state.
func Painter.resetTransform | [src] |
Reset the paint position, rotation, scale.
func Painter.rotateTransform | [src] |
Set the paint rotation.
func Painter.rotateTransformInPlace | [src] |
Set the paint rotation.
Will rotate around the current transformation position.
func Painter.scaleTransform | [src] |
Set the paint scale.
func Painter.setAntialiased | [src] |
Set antialiased mode on/off.
func Painter.setBlendingMode | [src] |
Set the current blending mode.
func Painter.setClippingRect | [src] |
Set the current clipping rectangle.
func Painter.setClippingRegionMode | [src] |
Set the clipping region mode.
func Painter.setColorMask | [src] |
Set color mask.
func Painter.setColorMaskAlpha | [src] |
func Painter.setColorMaskColor | [src] |
func Painter.setColorMaskFull | [src] |
func Painter.setInterpolationMode | [src] |
Set the texture interpolation mode.
func Painter.setParams | [src] |
Set the paint parameters.
func Painter.setQuality | [src] |
Set the paint quality.
func Painter.setShader | [src] |
Set the current shader.
func Painter.setShaderParam | [src] |
Set a shader parameter.
func Painter.setState | [src] |
Set the current painting state.
func Painter.setTransform | [src] |
Set the paint transformation.
func Painter.startClippingRegion | [src] |
Start painting in the clipping buffer.
func Painter.translateTransform | [src] |
Set the paint position.
func Painter.unbindRenderTarget | [src] |
Bind a render target.
struct Pixel.Pen | [src] |
size | f32 | |
brush | Brush | |
pattern | Core.Array'(f32) | |
dashBegCapStyle | DashCapStyle | |
dashEndCapStyle | DashCapStyle | |
borderPos | BorderPos | |
capBegScaleX | f32 | |
capBegScaleY | f32 | |
capEndScaleX | f32 | |
capEndScaleY | f32 | |
joinMiterLimit | f32 | |
plotOffset | f32 | |
dashStyle | DashStyle | |
dashBlankScale | f32 | |
begCapStyle | LineCapStyle | |
endCapStyle | LineCapStyle | |
joinStyle | JoinStyle |
createDash | Returns a dash pen. |
createHatch | Return a predefined hatch pen. |
createSolid | Returns a solid color pen. |
func Pen.createDash | [src] |
Returns a dash pen.
func Pen.createHatch | [src] |
Return a predefined hatch pen.
func Pen.createSolid | [src] |
Returns a solid color pen.
enum Pixel.PixelFormat | [src] |
Desribe the layout format of one image pixel.
BGR8 | |
BGRA8 | |
RGB8 | |
RGBA8 |
func PixelFormat.bitDepth | [src] |
Returns the bit depth of each channel.
func PixelFormat.bpp | [src] |
Returns the bpp (bits per pixel) of the given pixel format.
func PixelFormat.channels | [src] |
Returns the number of image channels.
func PixelFormat.hasAlpha | [src] |
Returns true if the given pixel format has an alpha channel.
namespace Pixel.Png |
Decoder | |
EncodeOptions | |
Encoder |
struct Png.Decoder | [src] |
func IImageDecoder.canDecode | [src] |
func IImageDecoder.decode | [src] |
struct Png.EncodeOptions | [src] |
compressionLevel | Core.Compress.Deflate.CompressionLevel | |
filtering | bool |
struct Png.Encoder | [src] |
func IImageEncoder.canEncode | [src] |
func IImageEncoder.encode | [src] |
namespace Pixel.Poly2Tri |
Edge | |
Point | |
Result | |
Tessellate | |
Triangle |
struct Poly2Tri.Edge | [src] |
p | *Poly2Tri.Point | |
q | *Poly2Tri.Point |
struct Poly2Tri.Point | [src] |
using v | Core.Math.Vector2 | |
edges | Core.Array'(*Poly2Tri.Edge) | |
border | [2] *Poly2Tri.Edge |
struct Poly2Tri.Result | [src] |
triangles | Core.Array'(*Poly2Tri.Triangle) | |
edges | Core.Array'(*Poly2Tri.Edge) | |
points | Core.Array'(*Poly2Tri.Point) | |
triIndices | Core.Array'(u64) | |
tess | *Poly2Tri.Tessellate |
struct Poly2Tri.Tessellate | [src] |
addPoint | Register a new point. |
addPolyLine | Register a polygon as a polyline. |
clear | Clear content. |
endPolyLine | To call to register the polyline. |
getResult | Get the triangulation result. |
startPolyLine | To call before adding a polyline. |
triangulate | Triangulate. |
opDrop |
func Tessellate.addPoint | [src] |
Register a new point.
func Tessellate.addPolyLine | [src] |
Register a polygon as a polyline.
func Tessellate.clear | [src] |
Clear content.
func Tessellate.endPolyLine | [src] |
To call to register the polyline.
The polyline registration should have been done before with [[startPolyline]]
func Tessellate.getResult | [src] |
Get the triangulation result.
func Tessellate.opDrop | [src] |
func Tessellate.startPolyLine | [src] |
To call before adding a polyline.
A polyline is a polygon border. See [[addPoint]] and [[endPolyLine]]
func Tessellate.triangulate | [src] |
Triangulate.
struct Poly2Tri.Triangle | [src] |
constrainedEdge | [3] bool | |
delaunayEdge | [3] bool | |
points | [3] *Poly2Tri.Point | |
neighbors | [3] *Poly2Tri.Triangle | |
idx | u64 | |
interior | bool |
struct Pixel.Polygon | [src] |
points | Core.Array'(Core.Math.Vector2) | |
isClockwise | bool | |
isConvex | bool | |
area | f32 | |
totalLen | f32 | |
bvMin | Core.Math.Vector2 | |
bvMax | Core.Math.Vector2 |
add | Add a new point. |
clean | Clean polygon by removing bad/unecessary points. |
clear | Clear all points. |
compute | Compute internal values, like convex/clockwise Call it once the polygon contains all its points. |
getClean | Clean polygon by removing bad/unecessary points. |
getOffset | Slow but quality offset with a joinStyle. |
getPoint(me, u64) | Get the given point. |
getPoint(me, u64) | |
getPoint(me, u64, f32) | Get the given point, with an optional offset. |
normalizeDist | Divide by adding points if two points are too far away. |
offset(me, f32) | Fast expand polygon by a given amount. |
offset(me, f32, JoinStyle, f32) | Slow but quality offset with a joinStyle. |
func Polygon.add | [src] |
Add a new point.
func Polygon.clean | [src] |
Clean polygon by removing bad/unecessary points.
func Polygon.clear | [src] |
Clear all points.
func Polygon.compute | [src] |
Compute internal values, like convex/clockwise Call it once the polygon contains all its points.
func Polygon.getClean | [src] |
Clean polygon by removing bad/unecessary points.
func Polygon.getOffset | [src] |
Slow but quality offset with a joinStyle.
func Polygon.getPoint | [src] |
Get the given point.
Get the given point, with an optional offset.
func Polygon.normalizeDist | [src] |
Divide by adding points if two points are too far away.
func Polygon.offset | [src] |
Fast expand polygon by a given amount.
Slow but quality offset with a joinStyle.
struct Pixel.RenderOgl | [src] |
using native | NativeRenderOgl | |
vertexbuffer | Ogl.GLuint | |
shaderSimple | ShaderSimple | |
shaderAA | ShaderAA | |
shaderBlur | ShaderBlur | |
shaderFont | ShaderFont | |
worldTransform | Core.Math.Transform2 | |
orthoMatrix | Core.Math.Matrix4x4 | |
modelMatrix | Core.Math.Matrix4x4 | |
whiteTexture | Ogl.GLuint | |
hatchTextures | [36] Ogl.GLuint | |
blendingMode | BlendingMode | |
curRC | RenderingContext | |
stackReleasedRT | Core.Array'(*RenderTarget) | |
stackRT | Core.Array'(*RenderTarget) | |
curRT | *RenderTarget | |
curShader | *ShaderBase | |
overlapMode | bool |
addImage(me, const &Image) | Register an image for rendering. |
addImage(me, string) | Load and register an image for rendering. |
begin | To be called before rendering. |
bindRenderTarget | Set the current render target. |
clear | Clear current render buffers. |
computeMatrices | |
createRenderTarget | Create a render target. |
createShader | Create the given shader. |
deleteRenderTarget | Delete a render target. |
draw | Draw the given painter. |
end | To be called after rendering. |
getRenderTarget | Get a render target of the given size releaseRenderTarget must be called to release it. |
getTargetSize | Get the actual render target size. |
getTexturePixels | Returns the pixels associated to a texture. |
init | First init. |
pixelFormatToNative | |
releaseRenderTarget | Release the given render target. |
removeTexture | Unregister a texture created with addImage. |
resetScissorRect | Reset the scissor. |
resetTransform | Reset the world transform. |
rotateTransform(me, const &Angle) | Rotate the world transform. |
rotateTransform(me, const &Angle, f32, f32) | Rotate the world transform. |
scaleTransform(me, f32) | Scale the world transform. |
scaleTransform(me, f32, f32) | Scale the world transform. |
setCurrentContext | Set the current rendering context. |
setScissorRect | Force the scissor. |
setShader | Set the current shader. |
translateTransform | Translate the world transform. |
unbindRenderTarget | Go back to the previous render target, or frame buffer. |
unbindRenderTargetToImage | Get current render target pixels. |
updateTexture | Update content of texture. |
opDrop |
func RenderOgl.addImage | [src] |
Load and register an image for rendering.
Register an image for rendering.
func RenderOgl.begin | [src] |
To be called before rendering.
func RenderOgl.bindRenderTarget | [src] |
Set the current render target.
func RenderOgl.clear | [src] |
Clear current render buffers.
func RenderOgl.computeMatrices | [src] |
func RenderOgl.createRenderTarget | [src] |
Create a render target.
func RenderOgl.createShader | [src] |
Create the given shader.
func RenderOgl.deleteRenderTarget | [src] |
Delete a render target.
func RenderOgl.draw | [src] |
Draw the given painter.
func RenderOgl.end | [src] |
To be called after rendering.
func RenderOgl.getRenderTarget | [src] |
Get a render target of the given size releaseRenderTarget must be called to release it.
func RenderOgl.getTargetSize | [src] |
Get the actual render target size.
func RenderOgl.getTexturePixels | [src] |
Returns the pixels associated to a texture.
func RenderOgl.init | [src] |
First init.
func RenderOgl.opDrop | [src] |
func RenderOgl.pixelFormatToNative | [src] |
func RenderOgl.releaseRenderTarget | [src] |
Release the given render target.
func RenderOgl.removeTexture | [src] |
Unregister a texture created with addImage.
func RenderOgl.resetScissorRect | [src] |
Reset the scissor.
func RenderOgl.resetTransform | [src] |
Reset the world transform.
func RenderOgl.rotateTransform | [src] |
Rotate the world transform.
func RenderOgl.scaleTransform | [src] |
Scale the world transform.
func RenderOgl.setCurrentContext | [src] |
Set the current rendering context.
func RenderOgl.setScissorRect | [src] |
Force the scissor.
func RenderOgl.setShader | [src] |
Set the current shader.
func RenderOgl.translateTransform | [src] |
Translate the world transform.
func RenderOgl.unbindRenderTarget | [src] |
Go back to the previous render target, or frame buffer.
func RenderOgl.unbindRenderTargetToImage | [src] |
Get current render target pixels.
func RenderOgl.updateTexture | [src] |
Update content of texture.
struct Pixel.RenderTarget | [src] |
handle | RenderTargetHandle | |
colorBuffer | Texture | |
depthStencil | RenderTargetSurfaceHandle | |
paintAlpha | bool | |
paintAlphaIdx | u64 |
struct Pixel.RenderingContext | [src] |
hDC | Win32.HDC | |
hRC | Ogl.HGLRC | |
width | s32 | |
height | s32 |
struct Pixel.RichChunk | [src] |
slice | string | |
fontStyle | FontFamilyStyle | |
hasFontStyle | bool | |
isSpace | bool | |
isEol | bool | |
isUrl | bool | |
isHotUrl | bool | |
colorIdx | s32 | |
boundRect | Core.Math.Rectangle | |
pos | Core.Math.Point | |
font | *Font | |
under | UnderlineStyle |
struct Pixel.RichString | [src] |
Represents a string with embedded formats.
raw | Core.String | The string as passed by the user. |
chunks | Core.Array'(RichChunk) | The corresponding list of chunks. |
layoutRect | Core.Math.Rectangle | |
boundRect | Core.Math.Rectangle | |
hasUrl | bool | |
dirty | bool | If dirty, Compute. |
This kind of string is a specific version of [Core.String] but specific for painting. It can contains some special markers to change it's appearence.
See RichString.set for a list of available markers.
compute | Compute layout. |
getNaked | Transform the given string to a naked one. |
getUrlChunkAt | Get the url chunk at position at. |
invalidate | Force the string to be repainted. |
isEmpty | Returns true if the string is empty. |
set | Associate a string. |
opAffect | |
opCount | |
opEquals | |
opPostCopy | We need to recompute chunks, as they contains slices. |
func RichString.compute | [src] |
Compute layout.
This will transform the string in a serie of chunks, each chunk having its one style. The string will only be recomputed if it's dirty (the text has changed) or if force is true.
func RichString.getNaked | [src] |
Transform the given string to a naked one.
Will return the string without the format markers.
func RichString.getUrlChunkAt | [src] |
Get the url chunk at position at.
If an url does not exists, returns null.
func RichString.invalidate | [src] |
Force the string to be repainted.
func RichString.isEmpty | [src] |
Returns true if the string is empty.
func RichString.opAffect | [src] |
func RichString.opCount | [src] |
func RichString.opEquals | [src] |
func RichString.opPostCopy | [src] |
We need to recompute chunks, as they contains slices.
func RichString.set | [src] |
Associate a string.
The string can have multiple lines. Accepted markers are:
struct Pixel.RichStringFormat | [src] |
font | FontFamily | |
fontStyle | FontFamilyStyle | |
palette | [4] Color | Color of text between <p?>...<p?> markers. |
colorUrl | Color | Color of text between <url>...<url> markers. |
colorHotUrl | Color | Color of text between <url>...<url> markers when mouse is inside. |
brush | Brush | |
horzAlignment | StringHorzAlignment | |
vertAlignment | StringVertAlignment | |
lineGap | s32 | |
flags | StringFormatFlags | |
justifyLimit | f32 |
struct Pixel.ShaderAA | [src] |
using base | ShaderBase |
struct Pixel.ShaderBase | [src] |
handle | ShaderHandle | |
mvp | ShaderParamHandle | |
mdl | ShaderParamHandle | |
boundRect | ShaderParamHandle | |
textureRect | ShaderParamHandle | |
uvMode | ShaderParamHandle | |
copyMode | ShaderParamHandle | |
textureW | ShaderParamHandle | |
textureH | ShaderParamHandle |
struct Pixel.ShaderBlur | [src] |
using base | ShaderBase | |
radius | ShaderParamHandle | |
axis | ShaderParamHandle |
struct Pixel.ShaderFont | [src] |
using base | ShaderBase |
struct Pixel.ShaderSimple | [src] |
using base | ShaderBase |
enum Pixel.StringFormatFlags | [src] |
Default | |
WordWrap | |
Clip | |
DontAdaptSingleLineHeight |
enum Pixel.StringHorzAlignment | [src] |
Center | |
Left | |
Right | |
Justify |
struct Pixel.StringMetrics | [src] |
ascent | f32 | Maximum size above baseline. |
descent | f32 | Maximum size below baseline. |
width | f32 | |
height | f32 | ascent + descent. |
struct Pixel.StringPainter | [src] |
str | RichString | |
fmt | RichStringFormat |
color | Set text color. |
draw | Draw string. |
flags | Set drawing flags. |
font | Set font. |
horzAlign | Set horizontal alignment. |
vertAlign | Set vertical alignment. |
func StringPainter.color | [src] |
Set text color.
func StringPainter.draw | [src] |
Draw string.
func StringPainter.flags | [src] |
Set drawing flags.
func StringPainter.font | [src] |
Set font.
func StringPainter.horzAlign | [src] |
Set horizontal alignment.
func StringPainter.vertAlign | [src] |
Set vertical alignment.
enum Pixel.StringVertAlignment | [src] |
Center | |
Top | |
Bottom |
struct Pixel.Texture | [src] |
handle | TextureHandle | |
pf | PixelFormat | |
width | s32 | |
height | s32 | |
valid | bool |
clear | |
getByteSize | |
isValid |
func Texture.clear | [src] |
func Texture.getByteSize | [src] |
func Texture.isValid | [src] |
namespace Pixel.Tga |
Decoder | |
Encoder |
struct Tga.Decoder | [src] |
func IImageDecoder.canDecode | [src] |
func IImageDecoder.decode | [src] |
struct Tga.Encoder | [src] |
func IImageEncoder.canEncode | [src] |
func IImageEncoder.encode | [src] |
struct Pixel.TypeFace | [src] |
fullname | string | |
buffer | Core.Array'(u8) | |
face | FreeType.FT_Face | |
forceBoldDiv | u32 | |
forceItalic | bool | |
forceBold | bool |
create | Get or create a new typeface from a memory buffer. |
createFromHFONT | Create a new typeface from a HFONT. |
getFamilyName | Returns the underlying font family name. |
getRuneOutline | Convert a rune to its outline, at a given size. |
getStringOutline | Convert a string to its outline, at a given size. |
isBold | Returns true if the typeface is bold. |
isItalic | Returns true if the typeface is italic. |
load | Get or load a new typeface. |
release | Release the given typeface. |
renderGlyph | Render one glyph. |
func TypeFace.create | [src] |
Get or create a new typeface from a memory buffer.
func TypeFace.createFromHFONT | [src] |
Create a new typeface from a HFONT.
func TypeFace.getFamilyName | [src] |
Returns the underlying font family name.
func TypeFace.getRuneOutline | [src] |
Convert a rune to its outline, at a given size.
func TypeFace.getStringOutline | [src] |
Convert a string to its outline, at a given size.
func TypeFace.isBold | [src] |
Returns true if the typeface is bold.
func TypeFace.isItalic | [src] |
Returns true if the typeface is italic.
func TypeFace.load | [src] |
Get or load a new typeface.
func TypeFace.release | [src] |
Release the given typeface.
func TypeFace.renderGlyph | [src] |
Render one glyph.
enum Pixel.UVMode | [src] |
Fill | |
FillSubRect | |
Tile |
enum Pixel.UnderlineStyle | [src] |
None | |
Underline | |
Strikeout |
struct Pixel.VertexLayout | [src] |
pos | Core.Math.Vector2 | |
uv | Core.Math.Vector2 | |
color | u32 | |
aa | [12] Core.Math.Vector4 | |
aanum | f32 |