public int AddVertex(float x, float y, ScenicColor color, float tu1, float tv1)
        {
            int vertex = AddVertex(x, y);

            rendererObj.Colour(color.red, color.green, color.blue, color.alpha);
            return(vertex);
        }
Example #2
0
        public void begin(Context context, bool isClosed)
        {
            this.context  = context;
            this.isClosed = isClosed;
            miterLimit    = context.miterLimit;
            //float det = Math.Sqrt(Math.Abs(context.transform.m00 * context.transform.m11 -
            //              context.transform.m01 * context.transform.m10));
            float det = (float)Math.Sqrt(Math.Abs(context.transform.Elements[0] * context.transform.Elements[3] -
                                                  context.transform.Elements[1] * context.transform.Elements[2]));
            float a = det * context.lineWidth / 2.0f;

            width                      = context.lineWidth / 2.0f * (a + 0.1f) / a;
            minu                       = 0.25f;
            maxu                       = 0.25f + (a + 0.5f) / 2.0f;
            rendererCallback           = context.vertexRenderer;
            rendererCallback.Transform = context.transform;

            count       = 0;
            color       = context.color;
            closeStroke = false;

            //if (lineEdgeTexture == 0)
            createEdgeTexture();
            //	if(lineDashTexture == 0)
            createDashTexture();
            dashPhase = context.lineDashPhase;
        }
 public int AddVertex(float x, float y, ScenicColor color, float tu1, float tv1, float tu2, float tv2)
 {
     return(AddVertex(x, y));
 }
 public int AddVertex(float x, float y, ScenicColor color)
 {
     return(AddVertex(x, y));
 }
Example #5
0
        public void begin(Context context, bool isClosed)
        {
            this.context = context;
            this.isClosed = isClosed;
            miterLimit = context.miterLimit;
            //float det = Math.Sqrt(Math.Abs(context.transform.m00 * context.transform.m11 -
            //              context.transform.m01 * context.transform.m10));
            float det = (float)Math.Sqrt(Math.Abs(context.transform.Elements[0] * context.transform.Elements[3] -
                                            context.transform.Elements[1] * context.transform.Elements[2]));
            float a = det * context.lineWidth / 2.0f;

            width = context.lineWidth / 2.0f * (a + 0.1f) / a;
            minu = 0.25f;
            maxu = 0.25f + (a + 0.5f) / 2.0f;
            rendererCallback = context.vertexRenderer;
            rendererCallback.Transform = context.transform;

            count = 0;
            color = context.color;
            closeStroke = false;

            //if (lineEdgeTexture == 0)
            createEdgeTexture();
            //	if(lineDashTexture == 0)
            createDashTexture();
            dashPhase = context.lineDashPhase;
        }
Example #6
0
 public int AddVertex(float x, float y, ScenicColor color, float tu1, float tv1, float tu2, float tv2)
 {
     Console.WriteLine("AddVertex: (" + x.ToString(nfi) + "; " + y.ToString(nfi) + ")");
     return -1;
 }
Example #7
0
 public int AddVertex(float x, float y, ScenicColor color, float tu1, float tv1, float tu2, float tv2)
 {
     Console.WriteLine("AddVertex: (" + x.ToString(nfi) + "; " + y.ToString(nfi) + ")");
     return(-1);
 }