IRenderContext2D
インターフェイスをRenderContext@に定義し、RenderSurfaceBaseにペンとブラシの図面、ブリッティング、作成を可能に
実装: IDisposable
プロパティ
public RenderOperationLayers Layers { get; }
value = iRenderContext2D.Layers
レンダリング操作を後続実行するためのレイヤキューに後続実行(および正しいZ-ordering)するために投稿できるようにする@RenderOperationLayersのコレクションを取得します。
public Size ViewportSize { get; }
value = iRenderContext2D.ViewportSize
ビューポートの現在のサイズを取得します。
メソッド
public IPathDrawingContext BeginLine(IPen2D pen, double startX, double startY)
result = iRenderContext2D.BeginLine(pen, startX, startY)
ポリラインセグメントからIPathDrawingContextを返します。これは、ラインを描画し、単にポイント}にプロキシする最速の方法です。
- pen
- ラインセグメントのペン
- startX
- スタートX座標(ピクセルコオルド)
- startY
- スタートY座標(ピクセルコオルド)
戻り値: IPathDrawingContext は、ラインを継続
public IPathDrawingContext BeginPolygon(IBrush2D brush, double startX, double startY, double gradientRotationAngle)
result = iRenderContext2D.BeginPolygon(brush, startX, startY, gradientRotationAngle)
ポリゴンの部分を埋め始め、IPathDrawingContextを返します。これはポリゴンを引くための最速の方法です。
- brush
- ポリゴンの毛のブラシは塗ります
- startX
- スタートX座標(ピクセルコオルド)
- startY
- スタートY座標(ピクセルコオルド)
- gradientRotationAngle
- ブラシが回転する角度
戻り値: IPathDrawingContext ポリゴンを継続
public IBrush2D CreateBrush(Color color, double opacity, bool? alphaBlend)
result = iRenderContext2D.CreateBrush(color, opacity, alphaBlend)
現在のレンダーパスで有効なIBrush2Dを作成します。これをrectangles、多角形および陰影された区域を引いて下さい
- color
- ブラシの色は透明度を支えます
- opacity
- ブラシの透明度
- alphaBlend
- もしtrueなら、シェーディング時にアルファブレンディングを使う。nullなら、オートデクト
戻り値: IBrush2Dインスタンス
public IBrush2D CreateBrush(Brush brush, double opacity, TextureMappingMode textureMappingMode)
result = iRenderContext2D.CreateBrush(brush, opacity, textureMappingMode)
現在のレンダーパスで有効なWPFブラシからIBrush2Dを作成します。これを使用して、長方形、ポリゴン、シェードエリアを描画します。
- brush
- WPFブラシは、ソースとして使用するために、e.g. これは、またはそれはすることができます。 固体色は透明性をサポートし、勾配ブラシよりも速くなることに注意してください
- opacity
- ブラシの透明度
- textureMappingMode
- TextureMappingMode,e.g. ブラシはビューポートごとのテクスチャやプリミティブ描画ごとの新しいテクスチャを共有します
戻り値: IBrush2Dインスタンス
public IPen2D CreatePen(Color color, bool antiAliasing, float strokeThickness, double opacity, double[] strokeDashArray, PenLineCap strokeEndLineCap)
result = iRenderContext2D.CreatePen(color, antiAliasing, strokeThickness, opacity, strokeDashArray, strokeEndLineCap)
現行のレンダーパスで有効な IPen2D を作成します。これを使用して輪郭、クォード、行を描画します。
- color
- ペンの色は透明度を支えます
- antiAliasing
- 真なら、アンチエイリアスリングを使う
- strokeThickness
- ストローク、デフォルト=1.0
- opacity
- ペンの不透明度
- strokeDashArray
- strokeEndLineCap
戻り値: IPen2Dインスタンス
public ISprite2D CreateSprite(FrameworkElement fe)
result = iRenderContext2D.CreateSprite(fe)
レンダリングからビットマップへFrameworkElementからSpriteを作成します。これは、ポイントで使用できる)画面に繰り返し描画するメソッドです。
- fe
public Size DigitMaxSize(float fontSize, string fontFamily, FontWeight fontWeight)
result = iRenderContext2D.DigitMaxSize(fontSize, fontFamily, fontWeight)
ピクセル単位で最大桁サイズ
public void DisposeResourceAfterDraw(IDisposable disposable)
iRenderContext2D.DisposeResourceAfterDraw(disposable)
このメソッドを呼び出して、IDisposable インスタンスを渡すと、レンダーパスが完了した後にディスポースします。 Ultrachart が内部で呼び出され、Direct2D と Direct3D ブラシとテクスチャの遅延ディスポーズ
- disposable
public void DrawEllipse(IPen2D strokePen, IBrush2D fillBrush, Point center, double width, double height)
iRenderContext2D.DrawEllipse(strokePen, fillBrush, center, width, height)
指定された輪郭IPen2Dを使用してIRenderSurface2Dに楕円を引いて、IBrush2Dを埋めます
- strokePen
- ストロークペン
- fillBrush
- フィラーブラシ
- center
- ピクセルの楕円の中心
- width
- ピクセルの楕円の幅
- height
- ピクセルの楕円の高さ
public void DrawEllipses(IPen2D strokePen, IBrush2D fillBrush, IEnumerable<Point> centres, double width, double height)
iRenderContext2D.DrawEllipses(strokePen, fillBrush, centres, width, height)
同じ幅、高さ、ペン、ブラシで渡されたポイントで爪0.N楕円
- strokePen
- fillBrush
- centres
- 楕円を描画するポイント
- width
- すべての楕円のための共通の幅
- height
- すべての楕円のための共通の高さ
public void DrawLine(IPen2D pen, Point pt1, Point pt2)
iRenderContext2D.DrawLine(pen, pt1, pt2)
指定されたIPen2Dを使用してIRenderSurface2Dに単一行を描画します。 一部のラスタライザーでより高速な実装については、IEnumerableでDrawLinesを渡す
- pen
- ペンのペン
- pt1
- ピクセルの行の開始
- pt2
- ピクセルの行の終了
public void DrawLines(IPen2D pen, IEnumerable<Point> points)
iRenderContext2D.DrawLines(pen, points)
指定されたIPen2Dを使用してIRenderSurface2Dにマルチポイントラインを描画します
- pen
- ペンのペン
- points
- ポイント
戻り値: 描画されるポリラインの最後のポイント
public void DrawPixelsVertically(int x, int yStartBottom, int yEndTop, IList<int> pixelColorsArgb, double opacity, bool yAxisIsFlipped)
iRenderContext2D.DrawPixelsVertically(x, yStartBottom, yEndTop, pixelColorsArgb, opacity, yAxisIsFlipped)
yStartからyEndまでのヒートマップの垂直スキャンラインを下から上へ引き寄せる
- x
- ピクセルを描画する場所のX座標をスクリーン
- yStartBottom
- 縦走線の底のY座標をスクリーンY座標。 可視領域の外出先にある場合、この場合リスト内のピクセルはすべてレンダリングされる
- yEndTop
- 縦走線のトップのY座標をスクリーンY座標。 可視領域の外出先にある場合、この場合リスト内のピクセルはすべてレンダリングされる
- pixelColorsArgb
- 画素色のリストを描画する
- opacity
- 0.0から1.0までのラインの不透明度
- yAxisIsFlipped
- true に設定すると、y 軸が反転されます。
public void DrawQuad(IPen2D pen, Point pt1, Point pt2)
iRenderContext2D.DrawQuad(pen, pt1, pt2)
指定されたIPen2Dを使用してIRenderSurface2DにQuadを引く
- pen
- ペンのペン
- pt1
- クォードの左上点
- pt2
- クォードの右下点
public void DrawSprite(ISprite2D srcSprite, Rect srcRect, Point destPoint)
iRenderContext2D.DrawSprite(srcSprite, srcRect, destPoint)
ソースイメージをIRenderSurface2Dに分割
- srcSprite
- ソーススプライトをレンダリングする
- srcRect
- ソースの長方形
- destPoint
- 目的地の点は、空白の後にスプライトの左上座標になります
public void DrawSprites(ISprite2D sprite2D, IEnumerable<Rect> dstRects)
iRenderContext2D.DrawSprites(sprite2D, dstRects)
ソースのスプライトのバッチ描画IRenderSurface2D
- sprite2D
- レンダリングするスプライト
- dstRects
- 目的地の長方形でスプライトを描画
public void DrawSprites(ISprite2D sprite2D, Rect srcRect, IEnumerable<Point> points)
iRenderContext2D.DrawSprites(sprite2D, srcRect, points)
ソースのスプライトのバッチ描画IRenderSurface2D
- sprite2D
- レンダリングするスプライト
- srcRect
- ソースの長方形
- points
- スプライトを描画するポイント
public void DrawText(string text, Rect dstBoundingRect, AlignmentX alignX, AlignmentY alignY, Color foreColor, float fontSize, string fontFamily, FontWeight fontWeight)
iRenderContext2D.DrawText(text, dstBoundingRect, alignX, alignY, foreColor, fontSize, fontFamily, fontWeight)
外部に行かないとテキストを描画
public void DrawText(string text, Point basePoint, AlignmentX alignX, AlignmentY alignY, Color foreColor, float fontSize, string fontFamily, FontWeight fontWeight)
iRenderContext2D.DrawText(text, basePoint, alignX, alignY, foreColor, fontSize, fontFamily, fontWeight)
ベースポイントに相対的にテキストを描画する
public void FillArea(IBrush2D brush, IEnumerable<Tuple<Point, Point>> lines, bool isVerticalChart, double gradientRotationAngle)
iRenderContext2D.FillArea(brush, lines, isVerticalChart, gradientRotationAngle)
ポイントとハイツ、e.g を山のチャートに定義したエリアを埋めます。
- brush
- ブラシ
- lines
- isVerticalChart
- 値、チャートが縦かどうかを示します
- gradientRotationAngle
- ブラシが回転する角度
public void FillPolygon(IBrush2D brush, IEnumerable<Point> points)
iRenderContext2D.FillPolygon(brush, points)
仕様書IBrush2Dを使用してIRenderSurface2Dにポリゴンを埋めます
- brush
- ブラシ
- points
- クローズドポリゴンを定義するポイントのリスト、X、Yは時計回りの方向に座標を合わせます
public void FillRectangle(IBrush2D brush, Point pt1, Point pt2, double gradientRotationAngle)
iRenderContext2D.FillRectangle(brush, pt1, pt2, gradientRotationAngle)
指定されたIBrush2Dを使用してIRenderSurface2Dに矩形を埋めます
- brush
- ブラシ
- pt2
- 長方形の左上点
- pt1
- 長方形の右下点
- gradientRotationAngle
- ブラシが回転する角度はデフォルトはゼロです
public void SetPrimitvesCachingEnabled(bool bEnabled)
iRenderContext2D.SetPrimitvesCachingEnabled(bEnabled)
プリミットは、最適化(Direct3Dレンダラーのみ)をキャッシュすることを可能にします。
public void TextDrawDimensions(string text, float fontSize, Color foreColor, float width, float height, string fontFamily, FontWeight fontWeight)
iRenderContext2D.TextDrawDimensions(text, fontSize, foreColor, width, height, fontFamily, fontWeight)
テキストを描画するために必要なスペースを計算する