Exemple #1
0
        public void GetRenderObjects(float strokeThickness, StrokeAlignment strokeAlignment, bool antialias, out Mesh mesh)
        {
            if (!Mathf.Approximately(strokeThickness, _strokeThickness))
            {
                _strokeThickness = strokeThickness;
                _isDirty         = true;
            }
            if (strokeAlignment != _strokeAlignment)
            {
                _strokeAlignment = strokeAlignment;
                _isDirty         = true;
            }
            if (antialias != _antialias)                // When antialiasing, we need to render stroke even though strokeThickness is zero.
            {
                _antialias = antialias;
                _isDirty   = true;
            }

            if (_isDirty)
            {
                Build();
            }

            mesh = _mesh;
        }
 public void Stroke(Color? color = null, double? weight = null, StrokeAlignment? alignment = null)
 {
     _state.Stroke(color, weight, alignment);
 }
Exemple #3
0
        public void Stroke(Color? color, double? weight, StrokeAlignment? alignment)
        {
            if (color != null)
                StrokeColor = color.Value;

            if (weight != null)
                StrokeWeight = weight.Value;

            if (alignment != null)
                StrokeAlignment = alignment.Value;

            StrokeEnabled = true;
        }
Exemple #4
0
    public static void SetStrokeAlignement(StrokeAlignment alignment)
    {
        EnsureSingletonInstance();

        _self._strokeAlignment = alignment;
    }
 public void Stroke(Color? color, double? weight, StrokeAlignment? alignment)
 {
     record(t => t.Stroke(color, weight, alignment));
 }