示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StrokeAndFillDrawable{TDrawingContext}"/> class.
        /// </summary>
        /// <param name="stroke">The stroke.</param>
        /// <param name="fill">The fill.</param>
        /// <param name="isHoverState">is hover state?.</param>
        public StrokeAndFillDrawable(IPaintTask <TDrawingContext>?stroke, IPaintTask <TDrawingContext>?fill, bool isHoverState = false)
        {
            Stroke = stroke;
            if (stroke != null)
            {
                stroke.IsStroke = true;
                stroke.IsFill   = false;
            }

            Fill = fill;
            if (fill != null)
            {
                fill.IsStroke        = false;
                fill.IsFill          = true;
                fill.StrokeThickness = 0;
            }
            IsHoverState = isHoverState;
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PaintSchedule{TDrawingContext}"/> class.
 /// </summary>
 /// <param name="task">The task.</param>
 /// <param name="geometries">The geometries.</param>
 public PaintSchedule(IPaintTask <TDrawingContext> task, params IDrawable <TDrawingContext>[] geometries)
 {
     PaintTask  = task;
     Geometries = new HashSet <IDrawable <TDrawingContext> >(geometries);
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PaintSchedule{TDrawingContext}"/> class.
 /// </summary>
 /// <param name="task">The task.</param>
 /// <param name="geometries">The geometries.</param>
 public PaintSchedule(IPaintTask <TDrawingContext> task, HashSet <IDrawable <TDrawingContext> > geometries)
 {
     PaintTask  = task;
     Geometries = geometries;
 }