Esempio n. 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="PixelFormat"></param>
        /// <param name="Rasterizer"></param>
        /// <param name="Scanline"></param>
        public Renderer(IPixelFormat PixelFormat, AntiAliasedScanlineRasterizer Rasterizer, IScanline Scanline)
        {
        	m_PixelFormat = PixelFormat;
        	m_Rasterizer = Rasterizer;
        	m_Scanline = Scanline;

            TextPath = new GsvText();
            StrockedText = new StrokeConverter(TextPath);
            m_AffineTransformStack.Push(Affine.NewIdentity());
        }
Esempio n. 2
0
        public override void OnDraw()
        {
            AntiAliasedScanlineRasterizer ras = new Pictor.AntiAliasedScanlineRasterizer();
            Scanline sl = new Pictor.Scanline();

            RoundedRect rectBorder = new RoundedRect(m_Bounds, m_BorderRadius);

            GetRenderer().Render(rectBorder, new RGBA_Bytes(0, 0, 0));
            RectD insideBounds = Bounds;

            insideBounds.Inflate(-BorderWidth);
            RoundedRect rectInside  = new RoundedRect(insideBounds, Math.Max(m_BorderRadius - BorderWidth, 0));
            RGBA_Bytes  insideColor = new RGBA_Bytes(222, 222, 222);

            GetRenderer().Render(rectInside, insideColor);

            RoundedRect titleBar = new RoundedRect(new RectD(m_Bounds.Left + BorderWidth, m_Bounds.Top - BorderWidth - 20, m_Bounds.Right - BorderWidth, m_Bounds.Top - BorderWidth), m_BorderRadius);

            GetRenderer().Render(titleBar, new RGBA_Bytes(0, 66, 128));

            base.OnDraw();
        }
Esempio n. 3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="PixelFormat"></param>
        /// <param name="Rasterizer"></param>
        /// <param name="Scanline"></param>
        public Renderer(IPixelFormat PixelFormat, AntiAliasedScanlineRasterizer Rasterizer, IScanline Scanline)
        {
            m_PixelFormat = PixelFormat;
            m_Rasterizer = Rasterizer;
            m_Scanline = Scanline;

            TextPath = new GsvText();
            StrockedText = new StrokeConverter(TextPath);
            m_AffineTransformStack.Push(Affine.NewIdentity());
        }
Esempio n. 4
0
        public override void OnDraw()
        {
            AntiAliasedScanlineRasterizer ras = new Pictor.AntiAliasedScanlineRasterizer();
            Scanline sl = new Pictor.Scanline();

            RoundedRect rectBorder = new RoundedRect(m_Bounds, m_BorderRadius);
            GetRenderer().Render(rectBorder, new RGBA_Bytes(0, 0, 0));
            RectD insideBounds = Bounds;
            insideBounds.Inflate(-BorderWidth);
            RoundedRect rectInside = new RoundedRect(insideBounds, Math.Max(m_BorderRadius - BorderWidth, 0));
            RGBA_Bytes insideColor = new RGBA_Bytes(222, 222, 222);

            GetRenderer().Render(rectInside, insideColor);

            RoundedRect titleBar = new RoundedRect(new RectD(m_Bounds.Left + BorderWidth, m_Bounds.Top - BorderWidth - 20, m_Bounds.Right - BorderWidth, m_Bounds.Top - BorderWidth), m_BorderRadius);
            GetRenderer().Render(titleBar, new RGBA_Bytes(0, 66, 128));

            base.OnDraw();
        }