Esempio n. 1
0
 //============================================================
 // <T>配置处理。</T>
 //
 // @param args 参数
 //============================================================
 public void Setup(SUiSetupArgs args)
 {
     _context               = args.context;
     _pointForeBrush        = _context.Device.CreateSolidBrush(Color.Black);
     _pointBackBrush        = _context.Device.CreateSolidBrush(Color.White);
     _selectForeColor.brush = _context.Device.CreateSolidBrush(0.2f, 0.2f, 0.2f, 1.0f);
     _selectBackColor.brush = _context.Device.CreateSolidBrush(1.0f, 1.0f, 1.0f, 0.5f);
     // 创建辅助点
     for (int n = 0; n < (int)ERcAlign.Count; n++)
     {
         SUiControlPoint point = new SUiControlPoint();
         point.AlignCd = n;
         _points[n]    = point;
     }
 }
Esempio n. 2
0
 //============================================================
 // <T>绘制文本。</T>
 //
 // @param text 文本
 // @param format 字体格式
 // @param brush 刷子
 // @param x 横坐标
 // @param y 纵坐标
 // @param width 宽度
 // @param height 高度
 //============================================================
 public void DrawText(string text, FDxTextFormat format, FDxBrush brush, int x, int y, int width, int height)
 {
     _target.DrawText(text, format.Native, new Rectangle(x, y, width, height), brush.Native);
 }
Esempio n. 3
0
 //============================================================
 // <T>填充矩形。</T>
 //
 // @param brush 色刷
 // @param x 横向位置
 // @param y 纵向位置
 // @param width 宽度
 // @param height 高度
 //============================================================
 public void FillRectangle(FDxBrush brush, float x, float y, float width, float height)
 {
     _target.FillRectangle(brush.Native, new RectangleF(x, y, width, height));
 }
Esempio n. 4
0
 //============================================================
 // <T>绘制文本。</T>
 //
 // @param text 文本
 // @param format 字体格式
 // @param brush 刷子
 // @param rectangle 范围
 //============================================================
 public void DrawText(string text, FDxTextFormat format, FDxBrush brush, SIntRectangle rectangle)
 {
     _target.DrawText(text, format.Native, new Rectangle(rectangle.Left, rectangle.Top, rectangle.Width, rectangle.Height), brush.Native);
 }
Esempio n. 5
0
 //============================================================
 // <T>绘制矩形。</T>
 //
 // @param brush 色刷
 // @param x 横向位置
 // @param y 纵向位置
 // @param width 宽度
 // @param height 高度
 // @param strokeWidth 样式宽度
 // @param style 样式
 //============================================================
 public void DrawRectangle(FDxBrush brush, float x, float y, float width, float height, float strokeWidth, FDxStrokeStyle style)
 {
     _target.DrawRectangle(brush.Native, new RectangleF(x, y, width, height), strokeWidth, style.Native);
 }
Esempio n. 6
0
 //============================================================
 // <T>绘制矩形。</T>
 //
 // @param brush 色刷
 // @param x 横向位置
 // @param y 纵向位置
 // @param width 宽度
 // @param height 高度
 // @param scale 缩放
 // @param strokeWidth 线宽度
 //============================================================
 public void DrawRectangle(FDxBrush brush, float x, float y, float width, float height, float scale, float strokeWidth)
 {
     _target.DrawRectangle(brush.Native, new RectangleF(x * scale, y * scale, width * scale, height * scale), strokeWidth);
 }
Esempio n. 7
0
 //============================================================
 // <T>绘制线条。</T>
 //
 // @param x1 起始横向位置
 // @param y1 起始纵向位置
 // @param x2 结束横向位置
 // @param y2 结束纵向位置
 // @param brushBack 色刷
 // @param brushFore 色刷
 // @param strokeWidth 宽度
 // @param strokeStyle 样式
 //============================================================
 public void DrawLineLayer(float x1, float y1, float x2, float y2, FDxBrush brushBack, FDxBrush brushFore, float strokeWidth, FDxStrokeStyle strokeStyle)
 {
     _target.DrawLine(brushBack.Native, x1, y1, x2, y2, strokeWidth);
     _target.DrawLine(brushFore.Native, x1, y1, x2, y2, strokeWidth, strokeStyle.Native);
 }
Esempio n. 8
0
 //============================================================
 // <T>绘制矩形。</T>
 //
 // @param brush 色刷
 // @param location 位置
 // @param size 大小
 //============================================================
 public void DrawRectangle(FDxBrush brush, SIntPoint2 location, SIntSize2 size)
 {
     _target.DrawRectangle(brush.Native, new Rectangle(location.X, location.Y, size.Width, size.Height));
 }
Esempio n. 9
0
 //============================================================
 // <T>绘制线条。</T>
 //
 // @param brush 色刷
 // @param x1 起始横向位置
 // @param y1 起始纵向位置
 // @param x2 结束横向位置
 // @param y2 结束纵向位置
 // @param strokeWidth 宽度
 // @param strokeStyle 样式
 //============================================================
 public void DrawLine(FDxBrush brush, float x1, float y1, float x2, float y2, float strokeWidth, FDxStrokeStyle strokeStyle)
 {
     _target.DrawLine(brush.Native, x1, y1, x2, y2, strokeWidth, strokeStyle.Native);
 }
Esempio n. 10
0
 //============================================================
 // <T>绘制线条。</T>
 //
 // @param brush 色刷
 // @param x1 起始横向位置
 // @param y1 起始纵向位置
 // @param x2 结束横向位置
 // @param y2 结束纵向位置
 // @param strokeWidth 宽度
 //============================================================
 public void DrawLine(FDxBrush brush, float x1, float y1, float x2, float y2, float strokeWidth = 1.0f)
 {
     _target.DrawLine(brush.Native, x1, y1, x2, y2, strokeWidth);
 }
Esempio n. 11
0
 //============================================================
 // <T>填充矩形。</T>
 //
 // @param brush 色刷
 // @param location 位置
 // @param size 大小
 //============================================================
 public void FillRectangle(FDxBrush brush, SIntPoint2 location, SIntSize2 size)
 {
     _device.Target.FillRectangle(brush.Native, new Rectangle(location.X, location.Y, size.Width, size.Height));
 }
Esempio n. 12
0
 //============================================================
 // <T>绘制矩形。</T>
 //
 // @param brush 色刷
 // @param x 横向位置
 // @param y 纵向位置
 // @param width 宽度
 // @param height 高度
 //============================================================
 public void DrawRectangle(FDxBrush brush, float x, float y, float width, float height)
 {
     _device.Target.DrawRectangle(brush.Native, new RectangleF(x, y, width, height));
 }
Esempio n. 13
0
 //============================================================
 // <T>绘制线条。</T>
 //
 // @param brush 色刷
 // @param x1 起始横向位置
 // @param y1 起始纵向位置
 // @param x2 结束横向位置
 // @param y2 结束纵向位置
 //============================================================
 public void DrawLine(FDxBrush brush, float x1, float y1, float x2, float y2)
 {
     _device.Target.DrawLine(brush.Native, x1, y1, x2, y2);
 }