Ejemplo n.º 1
0
        //============================================================
        // <T>绘制处理点。</T>
        //
        // @param args 参数
        //============================================================
        public void DrawPoint(SUiControlPoint point)
        {
            int x = point.Point.X - 2;
            int y = point.Point.Y - 2;
            // 绘制边线
            FDxContext2d context = _context.Context;

            context.FillRectangle(_pointBackBrush, x, y, _pointForeSize.Width, _pointForeSize.Height);
            context.DrawRectangle(_pointForeBrush, x, y, _pointBackSize.Width, _pointBackSize.Height);
        }
Ejemplo n.º 2
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;
     }
 }