示例#1
0
 public static void Circle(float xCentre, float yCentre, float radius, Color colour)
 {
     float [] verticies = new float[(circleVerticies + 2) * 2];        //+2 verticies for centre and the same end point as the start one
     verticies[0] = xCentre;
     verticies[1] = yCentre;
     for (int i = 0; i <= circleVerticies; i++)
     {
         double angle = 2 * Math.PI * (double)i / circleVerticies;
         verticies[i * 2 + 2] = xCentre + (float)Math.Cos(angle) * radius;
         verticies[i * 2 + 3] = yCentre + (float)Math.Sin(angle) * radius;
     }
     CLReQueue.AddToQueue(new CLReEntity(verticies, colour, Color.Cyan, null, All.TriangleFan));
 }
示例#2
0
        public void Render(ColorLinesNG skiaView, SKCanvas canvas)
        {
            CLReEntity r = rentities;
            int        renderSpecialBgTexture = 0;

            for (; r != null; r = r.Next)
            {
                r.Render(this.images, skiaView, canvas);
                if (Device.Idiom != TargetIdiom.Desktop ||
                    renderSpecialBgTexture != 0 ||
                    this.specialBgTextureIds == null ||
                    this.specialBgTextureIds.Length < 2)
                {
                    continue;
                }
                if (r.TextureId == this.specialBgTextureIds[0])
                {
                    renderSpecialBgTexture = 1;
                }
                else if (r.TextureId == this.specialBgTextureIds[1])
                {
                    renderSpecialBgTexture = 2;
                }
            }
            if (renderSpecialBgTexture == 1)
            {
                CLReQueue.RenderFadingCircle(canvas, skiaView);
            }
            else if (renderSpecialBgTexture == 2)
            {
                CLReQueue.RenderFades(canvas, skiaView, false);
                CLReQueue.RenderFades(canvas, skiaView, true);
                CLReQueue.RenderFadingCircle(canvas, skiaView);
            }
            CLReViewEntity v = ventities;

            for (; v != null; v = v.Next)
            {
                v.Render(this.mainLayout, skiaView);
            }
            CLReViewEntity vre = ventitiesToRelease;

            for (; vre != null; vre = vre.Next)
            {
                vre.Release(this.mainLayout);
            }
        }
示例#3
0
 public static void Text(string text, float x, float y, float size, Color colour, Paint.Align align, float textInterval = 1.337f)
 {
     CLReQueue.AddToQueue(new CLReLabelEntity(text, x, y, size, colour, align, textInterval));
 }
示例#4
0
 public static void Rect(float x, float y, float width, float height, int textureId)
 {
     CLReQueue.AddToQueue(new CLReEntity(PosResToVerticies(x, y, width, height), Color.Cyan, Color.Cyan, textureId: textureId, hasTexture: true, textureCoords: null));
 }
示例#5
0
 public static void Rect(float x, float y, float width, float height, Color colour)
 {
     CLReQueue.AddToQueue(new CLReEntity(PosResToVerticies(x, y, width, height), colour, Color.Cyan, textureCoords: null));
 }
示例#6
0
 public static void ReleaseView(View view)
 {
     CLReQueue.AddToReleaseQueue(new CLReViewEntity(view));
 }
示例#7
0
 public static void View(View view, float x, float y, float width, float height)
 {
     CLReQueue.AddToQueue(new CLReViewEntity(view, x, y, width, height));
 }
示例#8
0
 public static void Rect(float x, float y, float width, float height, int textureId, float angle)
 {
     CLReQueue.AddToQueue(new CLReEntity(CLReDraw.PosResToVerticies(x, y, width, height), textureId, angle: angle));
 }
示例#9
0
 public static void Rect(float x, float y, float width, float height, Color colour)
 {
     CLReQueue.AddToQueue(new CLReEntity(CLReDraw.PosResToVerticies(x, y, width, height), -1, colour));
 }