Exemplo n.º 1
0
        internal override System.Drawing.Rectangle getBounds(DrawContext context, System.Drawing.Drawing2D.Matrix transform)
        {
            System.Drawing.Rectangle r = path.getBounds(transform);
            Filter filter = context.AAFilter;

            // Compensate for the antialiasing filter
            if (filter != null)
            {
                r = addMargin(r, (int)System.Math.Ceiling(filter.Width), (int)System.Math.Ceiling(filter.Height));
            }
            return(r);
        }
Exemplo n.º 2
0
 public DrawContext(DrawContext context, int surfaceType)
 {
     this.device            = context.device;
     this.root              = context.root;
     this.renderingInstance = context.renderingInstance;
     this.context           = context.context;
     this.width             = context.width;
     this.height            = context.height;
     this.renderer          = context.renderer;
     this.surfaceType       = surfaceType;
     this.AAFilter          = context.AAFilter;
     this.pathError         = context.pathError;
 }
Exemplo n.º 3
0
 public DrawContext(DrawContext context, int surfaceType)
 {
     this.device = context.device;
     this.root = context.root;
     this.renderingInstance = context.renderingInstance;
     this.context = context.context;
     this.width = context.width;
     this.height = context.height;
     this.renderer = context.renderer;
     this.surfaceType = surfaceType;
     this.AAFilter = context.AAFilter;
     this.pathError = context.pathError;
 }
Exemplo n.º 4
0
        internal override System.Drawing.Rectangle getBounds(DrawContext context, System.Drawing.Drawing2D.Matrix transform)
        {
#if PENDING
            System.Drawing.Rectangle r = System.Drawing.Rectangle.Empty;

            //UPGRADE_TODO: Class 'java.awt.font.FontRenderContext' was converted to 'System.Windows.Forms.Control' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_3"'
            //UPGRADE_ISSUE: Constructor 'java.awt.font.FontRenderContext.FontRenderContext' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtfontFontRenderContextFontRenderContext_javaawtgeomAffineTransform_boolean_boolean_3"'
            System.Drawing.Text.TextRenderingHint frc = new FontRenderContext(transform, false, true);
            for (int i = 0; i < glyphCodes.Length; i++)
            {
                //UPGRADE_ISSUE: Class 'java.awt.font.GlyphVector' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtfontGlyphVector_3"'
                //UPGRADE_TODO: Method 'java.awt.Font.createGlyphVector' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1095_3"'
                GlyphVector gv = font.createGlyphVector(frc, new int[] { glyphCodes[i] });
                System.Drawing.Rectangle gr = gv.getPixelBounds(frc, positions[i * 2], positions[i * 2 + 1]);

                if (r.IsEmpty)
                {
                    r = gr;
                }
                else
                {
                    r = System.Drawing.Rectangle.Union(r, gr);
                }
            }
            if (r.IsEmpty)
            {
                return(new System.Drawing.Rectangle());
            }

            Filter filter = context.AAFilter;

            // Compensate for the antialiasing filter
            if (filter != null)
            {
                //UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1042_3"'
                //UPGRADE_NOTE: ref keyword was added to struct-type parameters. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1303_3"'
                r = addMargin(ref r, (int)System.Math.Ceiling(filter.Width), (int)System.Math.Ceiling(filter.Height));
            }
            return(r);
#endif
            return(new System.Drawing.Rectangle());
        }
Exemplo n.º 5
0
 static SceneSettings()
 {
     defaultAAFilter = new Filter(BoxKernel.Kernel, 1.0, 1.0);
 }
Exemplo n.º 6
0
 static SceneSettings()
 {
     defaultAAFilter = new Filter(BoxKernel.Kernel, 1.0, 1.0);
 }