C# 클래스 LayoutFarm.HtmlBoxes.BorderPaintHelper

Contains all the complex paint code to paint different style borders.
파일 보기 프로젝트 열기: prepare/HTML-Renderer 1 사용 예제들

공개 메소드들

메소드 설명
DrawBorder ( Color color, CssSide border, PointF borderPts, Canvas g, CssBox box, RectangleF rectangle ) : void

Draw simple border.

DrawBorder ( CssSide border, PointF borderPts, Canvas g, CssBox box, Color solidColor, RectangleF rectangle ) : void
DrawBoxBorders ( PaintVisitor p, CssBox box, RectangleF rect, bool isFirst, bool isLast ) : void

Draws all the border of the box with respect to style, width, etc.

비공개 메소드들

메소드 설명
Darken ( Color c ) : Color

Makes the specified color darker for inset/outset borders.

DrawBorder ( CssSide borderSide, CssBox box, PaintVisitor p, RectangleF rect, bool isLineStart, bool isLineEnd ) : void

Draw specific border (top/bottom/left/right) with the box data (style/width/rounded).

GetBorderBorderDrawingInfo ( CssBox box, CssSide borderSide, CssBorderStyle &borderStyle, Color &borderColor, float &actualBorderWidth ) : void
GetPen ( GraphicsPlatform platform, CssBorderStyle style, Color color, float width ) : Pen

Get pen to be used for border draw respecting its style.

GetRoundedBorderPath ( PaintVisitor p, CssSide border, CssBox b, RectangleF r ) : GraphicsPath

Makes a border path for rounded borders.
To support rounded dotted/dashed borders we need to use arc in the border path.
Return null if the border is not rounded.

SetInOutsetRectanglePoints ( CssSide border, CssBox b, RectangleF r, bool isLineStart, bool isLineEnd, PointF _borderPts ) : void

Set rectangle for inset/outset border as it need diagonal connection to other borders.

메소드 상세

DrawBorder() 공개 정적인 메소드

Draw simple border.
public static DrawBorder ( Color color, CssSide border, PointF borderPts, Canvas g, CssBox box, RectangleF rectangle ) : void
color Color
border CssSide Desired border
borderPts PixelFarm.Drawing.PointF
g PixelFarm.Drawing.Canvas the device to draw to
box CssBox Box which the border corresponds
rectangle PixelFarm.Drawing.RectangleF the bounding rectangle to draw in
리턴 void

DrawBorder() 공개 정적인 메소드

public static DrawBorder ( CssSide border, PointF borderPts, Canvas g, CssBox box, Color solidColor, RectangleF rectangle ) : void
border CssSide
borderPts PixelFarm.Drawing.PointF
g PixelFarm.Drawing.Canvas
box CssBox
solidColor Color
rectangle PixelFarm.Drawing.RectangleF
리턴 void

DrawBoxBorders() 공개 정적인 메소드

Draws all the border of the box with respect to style, width, etc.
public static DrawBoxBorders ( PaintVisitor p, CssBox box, RectangleF rect, bool isFirst, bool isLast ) : void
p PaintVisitor
box CssBox the box to draw borders for
rect PixelFarm.Drawing.RectangleF the bounding rectangle to draw in
isFirst bool is it the first rectangle of the element
isLast bool is it the last rectangle of the element
리턴 void