Ejemplo n.º 1
0
        void _drawPathDrawMeshCallback(uiPaint p, uiMeshMesh fillMesh, uiMeshMesh strokeMesh, bool convex, float alpha,
                                       float strokeMult, Texture tex,
                                       uiRect textBlobBounds, TextBlobMesh textMesh, bool notEmoji)
        {
            if (!this._applyClip(fillMesh.bounds))
            {
                ObjectPool <uiMeshMesh> .release(fillMesh);

                ObjectPool <uiMeshMesh> .release(strokeMesh);

                return;
            }

            var layer = this._currentLayer;

            if (convex)
            {
                layer.draws.Add(CanvasShader.convexFill(layer, p, fillMesh));
            }
            else
            {
                layer.draws.Add(CanvasShader.fill0(layer, fillMesh));
                layer.draws.Add(CanvasShader.fill1(layer, p, fillMesh.boundsMesh));
            }

            if (strokeMesh != null)
            {
                layer.draws.Add(CanvasShader.strokeAlpha(layer, p, alpha, strokeMult, strokeMesh));
                layer.draws.Add(CanvasShader.stroke1(layer, strokeMesh.duplicate()));
            }
        }
Ejemplo n.º 2
0
        void _drawPathDrawMeshCallback2(uiPaint p, uiMeshMesh mesh, bool convex, float alpha, Texture tex,
                                        uiRect textBlobBounds, TextBlobMesh textMesh, bool notEmoji)
        {
            if (!this._applyClip(mesh.bounds))
            {
                ObjectPool <uiMeshMesh> .release(mesh);

                return;
            }

            var layer = this._currentLayer;

            layer.draws.Add(CanvasShader.stroke0(layer, p, alpha, mesh));
            layer.draws.Add(CanvasShader.stroke1(layer, mesh.duplicate()));
        }