Example #1
0
        public static sDrawCall solidColorFill(Order order, ref Matrix3x2 trans, int color)
        {
            eVaaKind     vaa = BuiltMeshesCache.filledMeshesVaa ? eVaaKind.Filled : eVaaKind.None;
            DrawCallType dc  = new DrawCallType(eMesh.Filled, vaa);

            return(new sDrawCall(dc, ref trans, 0, color, transparentIndex, MiscUtils.one, order));
        }
Example #2
0
        public static sDrawCall solidColorStroke(Order order, ref Matrix3x2 trans, ref StrokeRenderParams srp)
        {
            DrawCallType dc = new DrawCallType(eMesh.Stroked, srp.vaa);

            return(new sDrawCall(dc, ref trans, srp.vaaScaling,
                                 srp.strokeColor, srp.fillColor, srp.lineColorFade,
                                 order));
        }
Example #3
0
 internal sDrawCall(DrawCallType dc, ref Matrix3x2 trans, float vaa, int foreground, int background, float mixFactor, Order order)
 {
     drawCall        = dc;
     transform       = trans;
     this.vaa        = vaa;
     this.foreground = foreground;
     this.background = background;
     this.mixFactor  = mixFactor;
     this.order      = order;
 }
Example #4
0
        public static sDrawCall drawText(Order order, ref Matrix3x2 trans, int color, int backgroundColor, bool opaqueBackground, float physicalPixelSize, eTextRendering textRendering)
        {
            eMesh  mesh  = (textRendering == eTextRendering.GrayscaleTransformed) ? eMesh.TransformedText : eMesh.GlyphRun;
            eBrush brush = opaqueBackground ? eBrush.OpaqueColor : eBrush.SolidColor;

            eClearTypeKind clearTypeKind;

            if (textRendering == eTextRendering.ClearTypeHorizontal)
            {
                clearTypeKind = eClearTypeKind.Straight;
            }
            else
            {
                clearTypeKind = eClearTypeKind.None;
            }
            DrawCallType dc = new DrawCallType(brush, mesh, clearTypeKind);

            return(new sDrawCall(dc, ref trans, physicalPixelSize, color, backgroundColor, MiscUtils.one, order));
        }
Example #5
0
 public SVGXDrawCall(DrawCallType type, int styleIdx, int transformIdx, in RangeInt shapeRange)
Example #6
0
        public static sDrawCall sprite(Order order, ref Matrix3x2 trans, int color)
        {
            DrawCallType dc = new DrawCallType(eBrush.Sprite, eMesh.SpriteRectangle, eVaaKind.None);

            return(new sDrawCall(dc, ref trans, 0, color, 0, 0, order));
        }
Example #7
0
        public static sDrawCall builtinShapeNoVaa(Order order, ref Matrix3x2 trans, int color)
        {
            DrawCallType dc = new DrawCallType(eMesh.Filled, eVaaKind.None);

            return(new sDrawCall(dc, ref trans, 0, color, transparentIndex, MiscUtils.one, order));
        }
Example #8
0
        static sDrawCall stroke(eVaaKind vaaKind, ref Matrix3x2 trans, float vaaMul, int col, Order order)
        {
            DrawCallType dc = new DrawCallType(eMesh.Stroked, vaaKind);

            return(new sDrawCall(dc, ref trans, vaaMul, col, transparentIndex, MiscUtils.one, order));
        }