Ejemplo n.º 1
0
		//UPGRADE_TODO: Interface 'java.awt.Shape' was converted to 'System.Drawing.Drawing2D.GraphicsPath' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
		public ShapeWithStyleBuilder(System.Drawing.Drawing2D.GraphicsPath shape, GraphicContext graphicContext, bool outline, bool fill)
		{
			Point origin = new Point((double) graphicContext.getPen().X, (double) graphicContext.getPen().Y);
			System.Drawing.Brush paint = graphicContext.Paint;
			System.Drawing.Pen stroke = graphicContext.Stroke;
			
			FillStyle fs = null;
			LineStyle ls = null;
			
			if (fill && paint != null)
			{
				System.Drawing.RectangleF tempAux = shape.GetBounds();
				//UPGRADE_NOTE: ref keyword was added to struct-type parameters. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1303'"
				fs = FillStyleBuilder.build(paint, ref tempAux, graphicContext.Transform);
			}
			
			if (outline && stroke != null)
				ls = LineStyleBuilder.build(paint, stroke);
			
			init(shape, origin, fs, ls, fill);
		}
        //UPGRADE_TODO: Interface 'java.awt.Shape' was converted to 'System.Drawing.Drawing2D.GraphicsPath' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
        public ShapeWithStyleBuilder(System.Drawing.Drawing2D.GraphicsPath shape, GraphicContext graphicContext, bool outline, bool fill)
        {
            Point origin = new Point((double)graphicContext.getPen().X, (double)graphicContext.getPen().Y);

            System.Drawing.Brush paint  = graphicContext.Paint;
            System.Drawing.Pen   stroke = graphicContext.Stroke;

            FillStyle fs = null;
            LineStyle ls = null;

            if (fill && paint != null)
            {
                System.Drawing.RectangleF tempAux = shape.GetBounds();
                //UPGRADE_NOTE: ref keyword was added to struct-type parameters. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1303'"
                fs = FillStyleBuilder.build(paint, ref tempAux, graphicContext.Transform);
            }

            if (outline && stroke != null)
            {
                ls = LineStyleBuilder.build(paint, stroke);
            }

            init(shape, origin, fs, ls, fill);
        }
Ejemplo n.º 3
0
		//UPGRADE_TODO: Interface 'java.awt.Shape' was converted to 'System.Drawing.Drawing2D.GraphicsPath' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
		public DefineShapeBuilder(System.Drawing.Drawing2D.GraphicsPath shape, GraphicContext graphicContext, bool outline, bool fill):this()
		{
			sws = new ShapeWithStyleBuilder(shape, graphicContext, outline, fill);
		}
 //UPGRADE_TODO: Interface 'java.awt.Shape' was converted to 'System.Drawing.Drawing2D.GraphicsPath' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
 public DefineShapeBuilder(System.Drawing.Drawing2D.GraphicsPath shape, GraphicContext graphicContext, bool outline, bool fill) : this()
 {
     sws = new ShapeWithStyleBuilder(shape, graphicContext, outline, fill);
 }