예제 #1
0
        private void DrawBigA(Graphics2D graphics2D)
        {
            ScanlineRasterizer m_ras = new ScanlineRasterizer();

            m_ras.SetVectorClipBox(0, 0, Width, Height);
            TypeFacePrinter            bigAPrinter       = new TypeFacePrinter("a", 150);
            FlattenCurves              flattenedBigA     = new FlattenCurves(bigAPrinter);
            VertexSourceApplyTransform scaleAndTranslate = new VertexSourceApplyTransform(flattenedBigA, Affine.NewTranslation(155, 55));
            ScanlineCachePacked8       m_sl             = new ScanlineCachePacked8();
            ScanlineRenderer           scanlineRenderer = new ScanlineRenderer();

#if false
            ImageProxySubpxelLcd24     clippingProxy = new ImageProxySubpxelLcd24(graphics2D.DestImage, new lcd_distribution_lut());
            VertexSourceApplyTransform scaledWide    = new VertexSourceApplyTransform(scaleAndTranslate, Affine.NewScaling(3, 1));
            m_ras.add_path(scaledWide);
            scanlineRenderer.render_scanlines_aa_solid(clippingProxy, m_ras, m_sl, RGBA_Bytes.Black);
#else
            m_ras.add_path(scaleAndTranslate);
            ImageClippingProxy clippingProxy = new ImageClippingProxy(graphics2D.DestImage);
            scanlineRenderer.RenderSolid(clippingProxy, m_ras, m_sl, RGBA_Bytes.Black);
#endif
        }
예제 #2
0
		private void DrawBigA(Graphics2D graphics2D)
		{
			ScanlineRasterizer m_ras = new ScanlineRasterizer();
			m_ras.SetVectorClipBox(0, 0, Width, Height);
			TypeFacePrinter bigAPrinter = new TypeFacePrinter("a", 150);
			FlattenCurves flattenedBigA = new FlattenCurves(bigAPrinter);
			VertexSourceApplyTransform scaleAndTranslate = new VertexSourceApplyTransform(flattenedBigA, Affine.NewTranslation(155, 55));
			ScanlineCachePacked8 m_sl = new ScanlineCachePacked8();
			ScanlineRenderer scanlineRenderer = new ScanlineRenderer();

#if false
            ImageProxySubpxelLcd24 clippingProxy = new ImageProxySubpxelLcd24(graphics2D.DestImage, new lcd_distribution_lut());
            VertexSourceApplyTransform scaledWide = new VertexSourceApplyTransform(scaleAndTranslate, Affine.NewScaling(3, 1));
            m_ras.add_path(scaledWide);
            scanlineRenderer.render_scanlines_aa_solid(clippingProxy, m_ras, m_sl, RGBA_Bytes.Black);
#else
			m_ras.add_path(scaleAndTranslate);
			ImageClippingProxy clippingProxy = new ImageClippingProxy(graphics2D.DestImage);
			scanlineRenderer.RenderSolid(clippingProxy, m_ras, m_sl, RGBA_Bytes.Black);
#endif
		}