C# Class MonoReports.Extensions.CairoExtensions.CairoExtensions

Mostrar archivo Open project: modesto/monoreports

Public Methods

Method Description
Clamp ( this r ) : Rectangle
ClipRectangle ( this g, Rectangle r ) : void
Clone ( this surf ) : ImageSurface
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, PointD point ) : bool
ContainsPoint ( this r, double x, double y ) : bool
CreateEllipsePath ( this g, Rectangle r ) : Path
CreatePolygonPath ( this g, Cairo polygonSet ) : Path
CreateRectanglePath ( this g, Rectangle r ) : Path
CreateRoundedRectanglePath ( this g, Rectangle r, double radius ) : Path
Distance ( this s, PointD e ) : double
DrawEllipse ( this g, Rectangle r, Cairo color, int lineWidth ) : Rectangle
DrawGripper ( this g, PointD r, int gripperSize ) : void
DrawInsideBorder ( this g, Rectangle r, Border border, bool render ) : void
DrawLine ( this g, PointD p1, PointD p2, Cairo color, double lineWidth, LineType lineType, bool render ) : Rectangle
DrawLinearGradient ( this g, Surface oldsurface, GradientColorMode mode, Cairo c1, Cairo c2, PointD p1, PointD p2 ) : void
DrawLinearReflectedGradient ( this g, Surface oldsurface, GradientColorMode mode, Cairo c1, Cairo c2, PointD p1, PointD p2 ) : void
DrawPixbuf ( this g, Gdk pixbuf, PointD dest, PointD offset ) : void
DrawPolygonal ( this g, PointD points, Cairo color ) : Rectangle
DrawRadialGradient ( this g, Surface oldsurface, GradientColorMode mode, Cairo c1, Cairo c2, PointD p1, PointD p2, double r1, double r2 ) : void
DrawRectangle ( this g, Rectangle r, Cairo color, double lineWidth ) : Rectangle
DrawRoundedRectangle ( this g, Rectangle r, double radius, Cairo stroke, int lineWidth ) : Rectangle
DrawSelectBox ( this g, Rectangle r ) : Rectangle
DrawText ( this g, PointD p, string family, Cairo slant, Cairo weight, double size, Cairo color, double width, string text ) : Rectangle
DrawTextBlock ( this g, TextBlock tb, bool render ) : Rectangle
FillEllipse ( this g, Rectangle r, Cairo color ) : Rectangle
FillPolygonal ( this g, PointD points, Cairo color ) : Rectangle
FillRectangle ( this g, Rectangle r, Cairo color ) : Rectangle
FillRectangle ( this g, Rectangle r, Pattern pattern ) : Rectangle
FillRegion ( this g, Gdk region, Cairo color ) : void
FillRoundedRectangle ( this g, Rectangle r, double radius, Cairo fill ) : Rectangle
FillStrokedEllipse ( this g, Rectangle r, Cairo fill, Cairo stroke, int lineWidth ) : Rectangle
FillStrokedRectangle ( this g, Rectangle r, Cairo fill, Cairo stroke, int lineWidth ) : Rectangle
FillStrokedRoundedRectangle ( this g, Rectangle r, double radius, Cairo fill, Cairo stroke, int lineWidth ) : Rectangle
GdkColorAlpha ( this color ) : ushort
GetBottom ( this rect ) : double
GetBounds ( this surf ) : Gdk.Rectangle
GetBreakLineCharacterIndexbyMaxHeight ( this g, TextBlock tb, double maxHeight ) : int

Get character index after which layout should be broken to not exceed maxHeight

GetRight ( this rect ) : double
GetSize ( this surf ) : Gdk.Size
IsVisible ( this surf, int x, int y ) : bool

Determines if the requested pixel coordinate is within bounds.

Location ( this r ) : Point
Magnitude ( this p ) : double
ToCairoColor ( this color ) : Color
ToCairoPointD ( this p ) : PointD
ToCairoRectangle ( this r ) : Rectangle
ToGdkColor ( this color ) : Gdk.Color
ToGdkPoint ( this point ) : Gdk.Point
ToGdkRectangle ( this r ) : Gdk.Rectangle
ToSize ( this point ) : Gdk.Size
ToString2 ( this c ) : string
TranslatePointsInPlace ( this Points, int dx, int dy ) : void

Private Methods

Method Description
CairoToPangoSlant ( Cairo slant ) : Pango.Style
CairoToPangoWeight ( Cairo weight ) : Pango.Weight
ReportToPangoAlignment ( HorizontalAlignment align ) : Pango.Alignment
ReportToPangoSlant ( MonoReports slant ) : Pango.Style
ReportToPangoWeight ( MonoReports weight ) : Pango.Weight
createLayoutFromTextBlock ( Context g, TextBlock tb ) : Pango.Layout
getDashByLineStyle ( LineType type ) : double[]
measureVerticlaSpan ( TextBlock tb, double measuredHeight ) : double

Method Details

Clamp() public static method

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

ClipRectangle() public static method

public static ClipRectangle ( this g, Rectangle r ) : void
g this
r Cairo.Rectangle
return void

Clone() public static method

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

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, PointD point ) : bool
r this
point Cairo.PointD
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

CreatePolygonPath() public static method

public static CreatePolygonPath ( this g, Cairo polygonSet ) : Path
g this
polygonSet Cairo
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

Distance() public static method

public static Distance ( this s, PointD e ) : double
s this
e Cairo.PointD
return double

DrawEllipse() public static method

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

DrawGripper() public static method

public static DrawGripper ( this g, PointD r, int gripperSize ) : void
g this
r Cairo.PointD
gripperSize int
return void

DrawInsideBorder() public static method

public static DrawInsideBorder ( this g, Rectangle r, Border border, bool render ) : void
g this
r Cairo.Rectangle
border MonoReports.Model.Border
render bool
return void

DrawLine() public static method

public static DrawLine ( this g, PointD p1, PointD p2, Cairo color, double lineWidth, LineType lineType, bool render ) : Rectangle
g this
p1 Cairo.PointD
p2 Cairo.PointD
color Cairo
lineWidth double
lineType LineType
render bool
return Cairo.Rectangle

DrawLinearGradient() public static method

public static DrawLinearGradient ( this g, Surface oldsurface, GradientColorMode mode, Cairo c1, Cairo c2, PointD p1, PointD p2 ) : void
g this
oldsurface Cairo.Surface
mode GradientColorMode
c1 Cairo
c2 Cairo
p1 Cairo.PointD
p2 Cairo.PointD
return void

DrawLinearReflectedGradient() public static method

public static DrawLinearReflectedGradient ( this g, Surface oldsurface, GradientColorMode mode, Cairo c1, Cairo c2, PointD p1, PointD p2 ) : void
g this
oldsurface Cairo.Surface
mode GradientColorMode
c1 Cairo
c2 Cairo
p1 Cairo.PointD
p2 Cairo.PointD
return void

DrawPixbuf() public static method

public static DrawPixbuf ( this g, Gdk pixbuf, PointD dest, PointD offset ) : void
g this
pixbuf Gdk
dest Cairo.PointD
offset Cairo.PointD
return void

DrawPolygonal() public static method

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

DrawRadialGradient() public static method

public static DrawRadialGradient ( this g, Surface oldsurface, GradientColorMode mode, Cairo c1, Cairo c2, PointD p1, PointD p2, double r1, double r2 ) : void
g this
oldsurface Cairo.Surface
mode GradientColorMode
c1 Cairo
c2 Cairo
p1 Cairo.PointD
p2 Cairo.PointD
r1 double
r2 double
return void

DrawRectangle() public static method

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

DrawRoundedRectangle() public static method

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

DrawSelectBox() public static method

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

DrawText() public static method

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

DrawTextBlock() public static method

public static DrawTextBlock ( this g, TextBlock tb, bool render ) : Rectangle
g this
tb MonoReports.Model.Controls.TextBlock
render bool
return Cairo.Rectangle

FillEllipse() public static method

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

FillPolygonal() public static method

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

FillRectangle() public static method

public static FillRectangle ( this g, Rectangle r, Cairo color ) : Rectangle
g this
r Cairo.Rectangle
color Cairo
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, Cairo color ) : void
g this
region Gdk
color Cairo
return void

FillRoundedRectangle() public static method

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

FillStrokedEllipse() public static method

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

FillStrokedRectangle() public static method

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

FillStrokedRoundedRectangle() public static method

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

GdkColorAlpha() public static method

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

GetBottom() public static method

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

GetBounds() public static method

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

GetBreakLineCharacterIndexbyMaxHeight() public static method

Get character index after which layout should be broken to not exceed maxHeight
public static GetBreakLineCharacterIndexbyMaxHeight ( this g, TextBlock tb, double maxHeight ) : int
g this /// G. ///
tb MonoReports.Model.Controls.TextBlock /// Tb. ///
maxHeight double /// Max height. ///
return int

GetRight() public static method

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

GetSize() public static method

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

IsVisible() public static method

Determines if the requested pixel coordinate is within bounds.
public static IsVisible ( this surf, int x, int y ) : bool
surf this
x int The x coordinate.
y int The y coordinate.
return bool

Location() public static method

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

Magnitude() public static method

public static Magnitude ( this p ) : double
p this
return double

ToCairoColor() public static method

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

ToCairoPointD() public static method

public static ToCairoPointD ( this p ) : PointD
p this
return Cairo.PointD

ToCairoRectangle() public static method

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

ToGdkColor() public static method

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

ToGdkPoint() public static method

public static ToGdkPoint ( this point ) : Gdk.Point
point this
return Gdk.Point

ToGdkRectangle() public static method

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

ToSize() public static method

public static ToSize ( this point ) : Gdk.Size
point this
return Gdk.Size

ToString2() public static method

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

TranslatePointsInPlace() public static method

public static TranslatePointsInPlace ( this Points, int dx, int dy ) : void
Points this
dx int
dy int
return void