// Create a copy with different value of vaa field public DrawCallType overrideVaa(eVaaKind vaa) { int v = (value & 0xFFFF); v |= (int)vaa << 16; return(new DrawCallType(v)); }
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)); }
StrokeRenderParams(int c, float px) { strokeColor = c; fillColor = (int)eNamedColor.Transparent; width = px; pixel = px; vaa = eVaaKind.StrokedThin; meshWidth = px * outlineMeshWidth; }
StrokeRenderParams(int strokeColor, int fillColor, float w, float px, bool vaa) { this.strokeColor = strokeColor; this.fillColor = fillColor; width = w; pixel = px; if (!vaa) { this.vaa = eVaaKind.None; meshWidth = w; } else if (w <= px) { this.vaa = eVaaKind.StrokedThin; meshWidth = pixel * 2; } else { this.vaa = eVaaKind.StrokedFat; meshWidth = width + pixel * lineMeshWidth; } }
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)); }
public DrawCallType(eMesh mesh, eVaaKind vaa) : this(eBrush.SolidColor, mesh, vaa) { }
public DrawCallType(eBrush brush, eMesh mesh, eVaaKind vaa) { value = MiscUtils.combine((byte)brush, (byte)mesh, (byte)vaa); }