C# Class Pinta.Core.CairoExtensions

Mostrar archivo Open project: xxgreg/Pinta Class Usage Examples

Public Methods

Method Description
Clamp ( this r ) : Rectangle
Clone ( this surf ) : ImageSurface
Clone ( this path ) : Path
ContainsCorrect ( this r, Gdk pt ) : bool

There was a bug in gdk-sharp where this returns incorrect values. We will probably have to use this for a long time until every distro has an updated gdk.

ContainsCorrect ( this r, int x, int y ) : bool

There was a bug in gdk-sharp where this returns incorrect values. We will probably have to use this for a long time until every distro has an updated gdk.

ContainsPoint ( this r, double x, double y ) : bool
CreateEllipsePath ( this g, Rectangle r ) : Path
CreateRectanglePath ( this g, Rectangle r ) : Path
CreateRoundedRectanglePath ( this g, Rectangle r, double radius ) : Path
DrawEllipse ( this g, Rectangle r, Color color, int lineWidth ) : Rectangle
DrawLine ( this g, PointD p1, PointD p2, Color color, int lineWidth ) : Rectangle
DrawPixbuf ( this g, Gdk pixbuf, Point dest ) : void
DrawPolygonal ( this g, PointD points, Color color ) : Rectangle
DrawRectangle ( this g, Rectangle r, Color color, int lineWidth ) : Rectangle
DrawRoundedRectangle ( this g, Rectangle r, double radius, Color stroke, int lineWidth ) : Rectangle
DrawText ( this g, PointD p, string family, FontSlant slant, FontWeight weight, double size, Color color, string text ) : Rectangle
FillEllipse ( this g, Rectangle r, Color color ) : Rectangle
FillPolygonal ( this g, PointD points, Color color ) : Rectangle
FillRectangle ( this g, Rectangle r, Color color ) : Rectangle
FillRectangle ( this g, Rectangle r, Pattern pattern ) : Rectangle
FillRegion ( this g, Gdk region, Color color ) : void
FillRoundedRectangle ( this g, Rectangle r, double radius, Color fill ) : Rectangle
FillStrokedEllipse ( this g, Rectangle r, Color fill, Color stroke, int lineWidth ) : Rectangle
FillStrokedRectangle ( this g, Rectangle r, Color fill, Color stroke, int lineWidth ) : Rectangle
FillStrokedRoundedRectangle ( this g, Rectangle r, double radius, Color fill, Color stroke, int lineWidth ) : Rectangle
GdkColorAlpha ( this color ) : ushort
GetBilinearSample ( this src, ColorBgra srcDataPtr, int srcWidth, int srcHeight, float x, float y ) : ColorBgra
GetBilinearSample ( this src, float x, float y ) : ColorBgra
GetBottom ( this rect ) : double
GetBounds ( this path ) : Gdk.Rectangle
GetColorBgra ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y ) : ColorBgra
GetColorBgra ( this surf, int x, int y ) : ColorBgra
GetPixel ( this surf, int x, int y ) : Color
GetPointAddress ( this surf, Gdk point ) : ColorBgra*
GetPointAddress ( this surf, int x, int y ) : ColorBgra*
GetPointAddressUnchecked ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y ) : ColorBgra*
GetPointAddressUnchecked ( this surf, int x, int y ) : ColorBgra*
GetPointUnchecked ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y ) : ColorBgra
GetPointUnchecked ( this surf, int x, int y ) : ColorBgra
GetRight ( this rect ) : double
GetRowAddressUnchecked ( this surf, ColorBgra surfDataPtr, int surfWidth, int y ) : ColorBgra*
GetRowAddressUnchecked ( this surf, int y ) : ColorBgra*
GetSize ( this surf ) : Gdk.Size
Location ( this r ) : Point
SetPixel ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y, Color color ) : void
SetPixel ( this surf, int x, int y, Color color ) : void
ToCairoColor ( this color ) : Color
ToCairoRectangle ( this r ) : Rectangle
ToColorBgra ( this color ) : ColorBgra
ToGdkColor ( this color ) : Gdk.Color
ToGdkRectangle ( this r ) : Gdk.Rectangle
ToPixbuf ( this surf ) : Gdk.Pixbuf
ToString2 ( this c ) : string
ToUint ( this c ) : uint

Method Details

Clamp() public static method

public static Clamp ( this r ) : Rectangle
r this
return Cairo.Rectangle

Clone() public static method

public static Clone ( this surf ) : ImageSurface
surf this
return Cairo.ImageSurface

Clone() public static method

public static Clone ( this path ) : Path
path this
return Cairo.Path

ContainsCorrect() public static method

There was a bug in gdk-sharp where this returns incorrect values. We will probably have to use this for a long time until every distro has an updated gdk.
public static ContainsCorrect ( this r, Gdk pt ) : bool
r this
pt Gdk
return bool

ContainsCorrect() public static method

There was a bug in gdk-sharp where this returns incorrect values. We will probably have to use this for a long time until every distro has an updated gdk.
public static ContainsCorrect ( this r, int x, int y ) : bool
r this
x int
y int
return bool

ContainsPoint() public static method

public static ContainsPoint ( this r, double x, double y ) : bool
r this
x double
y double
return bool

CreateEllipsePath() public static method

public static CreateEllipsePath ( this g, Rectangle r ) : Path
g this
r Cairo.Rectangle
return Cairo.Path

CreateRectanglePath() public static method

public static CreateRectanglePath ( this g, Rectangle r ) : Path
g this
r Cairo.Rectangle
return Cairo.Path

CreateRoundedRectanglePath() public static method

public static CreateRoundedRectanglePath ( this g, Rectangle r, double radius ) : Path
g this
r Cairo.Rectangle
radius double
return Cairo.Path

DrawEllipse() public static method

public static DrawEllipse ( this g, Rectangle r, Color color, int lineWidth ) : Rectangle
g this
r Cairo.Rectangle
color Color
lineWidth int
return Cairo.Rectangle

DrawLine() public static method

public static DrawLine ( this g, PointD p1, PointD p2, Color color, int lineWidth ) : Rectangle
g this
p1 Cairo.PointD
p2 Cairo.PointD
color Color
lineWidth int
return Cairo.Rectangle

DrawPixbuf() public static method

public static DrawPixbuf ( this g, Gdk pixbuf, Point dest ) : void
g this
pixbuf Gdk
dest Point
return void

DrawPolygonal() public static method

public static DrawPolygonal ( this g, PointD points, Color color ) : Rectangle
g this
points Cairo.PointD
color Color
return Cairo.Rectangle

DrawRectangle() public static method

public static DrawRectangle ( this g, Rectangle r, Color color, int lineWidth ) : Rectangle
g this
r Cairo.Rectangle
color Color
lineWidth int
return Cairo.Rectangle

DrawRoundedRectangle() public static method

public static DrawRoundedRectangle ( this g, Rectangle r, double radius, Color stroke, int lineWidth ) : Rectangle
g this
r Cairo.Rectangle
radius double
stroke Color
lineWidth int
return Cairo.Rectangle

DrawText() public static method

public static DrawText ( this g, PointD p, string family, FontSlant slant, FontWeight weight, double size, Color color, string text ) : Rectangle
g this
p Cairo.PointD
family string
slant FontSlant
weight FontWeight
size double
color Color
text string
return Cairo.Rectangle

FillEllipse() public static method

public static FillEllipse ( this g, Rectangle r, Color color ) : Rectangle
g this
r Cairo.Rectangle
color Color
return Cairo.Rectangle

FillPolygonal() public static method

public static FillPolygonal ( this g, PointD points, Color color ) : Rectangle
g this
points Cairo.PointD
color Color
return Cairo.Rectangle

FillRectangle() public static method

public static FillRectangle ( this g, Rectangle r, Color color ) : Rectangle
g this
r Cairo.Rectangle
color Color
return Cairo.Rectangle

FillRectangle() public static method

public static FillRectangle ( this g, Rectangle r, Pattern pattern ) : Rectangle
g this
r Cairo.Rectangle
pattern Cairo.Pattern
return Cairo.Rectangle

FillRegion() public static method

public static FillRegion ( this g, Gdk region, Color color ) : void
g this
region Gdk
color Color
return void

FillRoundedRectangle() public static method

public static FillRoundedRectangle ( this g, Rectangle r, double radius, Color fill ) : Rectangle
g this
r Cairo.Rectangle
radius double
fill Color
return Cairo.Rectangle

FillStrokedEllipse() public static method

public static FillStrokedEllipse ( this g, Rectangle r, Color fill, Color stroke, int lineWidth ) : Rectangle
g this
r Cairo.Rectangle
fill Color
stroke Color
lineWidth int
return Cairo.Rectangle

FillStrokedRectangle() public static method

public static FillStrokedRectangle ( this g, Rectangle r, Color fill, Color stroke, int lineWidth ) : Rectangle
g this
r Cairo.Rectangle
fill Color
stroke Color
lineWidth int
return Cairo.Rectangle

FillStrokedRoundedRectangle() public static method

public static FillStrokedRoundedRectangle ( this g, Rectangle r, double radius, Color fill, Color stroke, int lineWidth ) : Rectangle
g this
r Cairo.Rectangle
radius double
fill Color
stroke Color
lineWidth int
return Cairo.Rectangle

GdkColorAlpha() public static method

public static GdkColorAlpha ( this color ) : ushort
color this
return ushort

GetBilinearSample() public static method

public static GetBilinearSample ( this src, ColorBgra srcDataPtr, int srcWidth, int srcHeight, float x, float y ) : ColorBgra
src this
srcDataPtr ColorBgra
srcWidth int
srcHeight int
x float
y float
return ColorBgra

GetBilinearSample() public static method

public static GetBilinearSample ( this src, float x, float y ) : ColorBgra
src this
x float
y float
return ColorBgra

GetBottom() public static method

public static GetBottom ( this rect ) : double
rect this
return double

GetBounds() public static method

public static GetBounds ( this path ) : Gdk.Rectangle
path this
return Gdk.Rectangle

GetColorBgra() public static method

public static GetColorBgra ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y ) : ColorBgra
surf this
surfDataPtr ColorBgra
surfWidth int
x int
y int
return ColorBgra

GetColorBgra() public static method

public static GetColorBgra ( this surf, int x, int y ) : ColorBgra
surf this
x int
y int
return ColorBgra

GetPixel() public static method

public static GetPixel ( this surf, int x, int y ) : Color
surf this
x int
y int
return Color

GetPointAddress() public static method

public static GetPointAddress ( this surf, Gdk point ) : ColorBgra*
surf this
point Gdk
return ColorBgra*

GetPointAddress() public static method

public static GetPointAddress ( this surf, int x, int y ) : ColorBgra*
surf this
x int
y int
return ColorBgra*

GetPointAddressUnchecked() public static method

public static GetPointAddressUnchecked ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y ) : ColorBgra*
surf this
surfDataPtr ColorBgra
surfWidth int
x int
y int
return ColorBgra*

GetPointAddressUnchecked() public static method

public static GetPointAddressUnchecked ( this surf, int x, int y ) : ColorBgra*
surf this
x int
y int
return ColorBgra*

GetPointUnchecked() public static method

public static GetPointUnchecked ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y ) : ColorBgra
surf this
surfDataPtr ColorBgra
surfWidth int
x int
y int
return ColorBgra

GetPointUnchecked() public static method

public static GetPointUnchecked ( this surf, int x, int y ) : ColorBgra
surf this
x int
y int
return ColorBgra

GetRight() public static method

public static GetRight ( this rect ) : double
rect this
return double

GetRowAddressUnchecked() public static method

public static GetRowAddressUnchecked ( this surf, ColorBgra surfDataPtr, int surfWidth, int y ) : ColorBgra*
surf this
surfDataPtr ColorBgra
surfWidth int
y int
return ColorBgra*

GetRowAddressUnchecked() public static method

public static GetRowAddressUnchecked ( this surf, int y ) : ColorBgra*
surf this
y int
return ColorBgra*

GetSize() public static method

public static GetSize ( this surf ) : Gdk.Size
surf this
return Gdk.Size

Location() public static method

public static Location ( this r ) : Point
r this
return Cairo.Point

SetPixel() public static method

public static SetPixel ( this surf, ColorBgra surfDataPtr, int surfWidth, int x, int y, Color color ) : void
surf this
surfDataPtr ColorBgra
surfWidth int
x int
y int
color Color
return void

SetPixel() public static method

public static SetPixel ( this surf, int x, int y, Color color ) : void
surf this
x int
y int
color Color
return void

ToCairoColor() public static method

public static ToCairoColor ( this color ) : Color
color this
return Cairo.Color

ToCairoRectangle() public static method

public static ToCairoRectangle ( this r ) : Rectangle
r this
return Cairo.Rectangle

ToColorBgra() public static method

public static ToColorBgra ( this color ) : ColorBgra
color this
return ColorBgra

ToGdkColor() public static method

public static ToGdkColor ( this color ) : Gdk.Color
color this
return Gdk.Color

ToGdkRectangle() public static method

public static ToGdkRectangle ( this r ) : Gdk.Rectangle
r this
return Gdk.Rectangle

ToPixbuf() public static method

public static ToPixbuf ( this surf ) : Gdk.Pixbuf
surf this
return Gdk.Pixbuf

ToString2() public static method

public static ToString2 ( this c ) : string
c this
return string

ToUint() public static method

public static ToUint ( this c ) : uint
c this
return uint