Ejemplo n.º 1
0
        protected override void OnReadyForInitGLShaderProgram()
        {
            InstalledFontCollection collection = new InstalledFontCollection();

            collection.LoadSystemFonts();
            InstalledFont tahomaFont = collection.GetFont("tahoma", InstalledFontStyle.Normal);
            FontFace      tahomaFace = OpenFontLoader.LoadFont(tahomaFont.FontPath);
            ActualFont    actualFont = tahomaFace.GetFontAtPointSize(72);
            FontGlyph     glyph      = (FontGlyph)actualFont.GetGlyph('K');

            //var svgFont = svgFontStore.LoadFont("svg-LiberationSansFont", 300);
            ////PathWriter p01 = new PathWriter();
            ////p01.MoveTo(0, 0);
            ////p01.LineTo(50, 100);
            ////p01.LineTo(100, 0);
            //////-
            ////p01.MoveTo(220, 10);
            ////p01.LineTo(50, 75);
            ////p01.LineTo(25, 15);
            ////p01.CloseFigure();
            ////p01.Stop();
            ////m_pathVxs = p01.Vxs;

            //var m_pathVxs = svgFont.GetGlyph('K').originalVxs;// typeFaceForLargeA.GetGlyphForCharacter('a');
            ////m_pathVxs = MergeFontSubFigures(m_pathVxs);

            //Affine shape_mtx = Affine.NewMatix(AffinePlan.Translate(150, 100));
            //m_pathVxs = shape_mtx.TransformToVxs(m_pathVxs);
            //var curveFlattener = new CurveFlattener();
            //var m_pathVxs2 = curveFlattener.MakeVxs(m_pathVxs);

            glyph_vx = painter.CreateRenderVx(tempSnap1 = new PixelFarm.Drawing.VertexStoreSnap(glyph.flattenVxs));

            linearGrBrush2 = new LinearGradientBrush(
                new PointF(0, 0), Color.Red,
                new PointF(100, 100), Color.Black);
            //----------------------
        }