Exemple #1
0
        protected override void OnGLRender(object sender, EventArgs args)
        {
            _glsx.SmoothMode  = SmoothMode.Smooth;
            _glsx.StrokeColor = PixelFarm.Drawing.Color.Blue;
            _glsx.ClearColorBuffer();
            _glsx.Clear(PixelFarm.Drawing.Color.Red);

            //-------------------------------
            painter.FillColor = PixelFarm.Drawing.Color.Black;
            painter.DrawString("OK", 0, 100);
            painter.DrawString("1234567890", 0, 200);
            //-------------------------------
            SwapBuffers();
        }
Exemple #2
0
        public void RenderFrame()
        {
            _painter.Clear(Color.White);
            _painter.FillColor = Color.Yellow;
            //for (int i = 0; i < 10; ++i)
            //{
            //    _painter.FillRect(100 + i * 120, 200 + i * 120, 100, 100);
            //}

            _painter.FontFillColor = Color.Black;
            _painter.FillRect(100, 250, 20, 20);
            _painter.DrawString("Hello!", 100, 250);
            _painter.DrawString("...from Typography", 100, 300);
        }
Exemple #3
0
        protected override void OnGLRender(object sender, EventArgs args)
        {
            _pcx.SmoothMode  = SmoothMode.Smooth;
            _pcx.StrokeColor = PixelFarm.Drawing.Color.Blue;
            _pcx.ClearColorBuffer();
            _pcx.Clear(PixelFarm.Drawing.Color.White);


#if DEBUG
            //test only
            GLBitmapGlyphTextPrinter.s_dbugDrawTechnique    = DrawTextTechnique;
            GLBitmapGlyphTextPrinter.s_dbugUseVBO           = UseVbo;
            GLBitmapGlyphTextPrinter.s_dbugShowGlyphTexture = ShowGlyphTexture;
            GLBitmapGlyphTextPrinter.s_dbugShowMarkers      = ShowMarkers;
#endif

            //-------------------------------

            PixelFarm.Drawing.Color fillColor = PixelFarm.Drawing.Color.Black;
            switch (DrawTextColor)
            {
            case T110_DrawTextColor.Blue:
                fillColor = PixelFarm.Drawing.Color.Blue;
                break;

            case T110_DrawTextColor.Green:
                fillColor = PixelFarm.Drawing.Color.Green;
                break;

            case T110_DrawTextColor.Magenta:
                fillColor = PixelFarm.Drawing.Color.Magenta;
                break;

            case T110_DrawTextColor.Red:
                fillColor = PixelFarm.Drawing.Color.Red;
                break;

            case T110_DrawTextColor.Yellow:
                fillColor = PixelFarm.Drawing.Color.Yellow;
                break;
            }


            int line_top = 500;
            _painter.FontFillColor = fillColor;


            _painter.DrawString("aftjypqkx", 0, line_top);

            //
            line_top = 550;
            _painter.DrawString("1234567890 ABCD", 0, line_top);
            //-------------------------------
            line_top = 570;
            if (!string.IsNullOrEmpty(UserText))
            {
                _painter.DrawString(UserText, 0, line_top);
            }

            SwapBuffers();
        }