public void Reset() { Fill = new Paint(Colour.White); Stroke = new Paint(Colour.Black); CompositeOperation = new CompositeOperationState(Blending.CompositeOperation.SourceOver); ShapeAntiAlias = true; StrokeWidth = 1.0f; MiterLimit = 10.0f; LineCap = LineCap.Butt; LineJoin = LineCap.Miter; Alpha = 1.0f; Transform = Matrix3X2 <float> .Identity; Scissor = new Scissor(new Vector2D <float>(-1.0f)); FontSize = 16.0f; LetterSpacing = 0.0f; LineHeight = 1.0f; FontBlur = 0.0f; TextAlign = Align.Left | Align.Baseline; FontId = 0; }
public Blend(CompositeOperationState compositeOperation, OpenGLRenderer renderer) { GLEnum srcRgb = ConvertBlend(compositeOperation.SrcRgb); GLEnum dstRgb = ConvertBlend(compositeOperation.DstRgb); GLEnum srcAlpha = ConvertBlend(compositeOperation.SrcAlpha); GLEnum dstAlpha = ConvertBlend(compositeOperation.DstAlpha); if (srcRgb == GLEnum.InvalidEnum || dstRgb == GLEnum.InvalidEnum || srcAlpha == GLEnum.InvalidEnum || dstAlpha == GLEnum.InvalidEnum) { srcRgb = GLEnum.One; dstRgb = GLEnum.OneMinusSrcAlpha; srcAlpha = GLEnum.One; dstAlpha = GLEnum.OneMinusDstAlpha; } _srcRgb = srcRgb; _dstRgb = dstRgb; _srcAlpha = srcAlpha; _dstAlpha = dstAlpha; _renderer = renderer; }
public FillCall(int image, Path[] paths, int triangleOffset, int uniformOffset, CompositeOperationState op, OpenGLRenderer renderer) : base(image, paths, triangleOffset, 4, uniformOffset, new Blend(op, renderer), renderer) { }
public StrokeCall(int image, Path[] paths, int uniformOffset, CompositeOperationState op, OpenGLRenderer renderer) : base(image, paths, 0, 0, uniformOffset, new Blend(op, renderer), renderer) { }
public ConvexFillCall(int image, Path[] paths, ulong uniformOffset, CompositeOperationState op, VulkanRenderer renderer) : base(image, paths, 0, 0, uniformOffset, PipelineSettings.ConvexFill(op, renderer.TriangleListFill), default, PipelineSettings.ConvexFillEdgeAA(op), renderer) { }
public StrokeCall(int image, Path[] paths, ulong uniformOffset, CompositeOperationState compositeOperation, VulkanRenderer renderer) : base(image, paths, 0, 0, uniformOffset, PipelineSettings.Stroke(compositeOperation), default, default, renderer) { }
public FillCall(int image, Path[] paths, uint triangleOffset, ulong uniformOffset, CompositeOperationState compositeOperation, VulkanRenderer renderer) : base(image, paths, triangleOffset, 4, uniformOffset, PipelineSettings.Fill(compositeOperation), PipelineSettings.FillStencil(compositeOperation, renderer.TriangleListFill), PipelineSettings.FillEdgeAA(compositeOperation), renderer) { }