Exemple #1
0
        public void Draw(Class385 context)
        {
            PointF pointF1 = context.Transform.TransformToPointF(this.vector4D_0);
            PointF pointF2 = context.Transform.TransformToPointF(this.vector4D_1);

            context.Graphics.DrawLine(this.method_2(context), pointF1.X, pointF1.Y, pointF2.X, pointF2.Y);
        }
Exemple #2
0
        public void Draw(Class385 context)
        {
            Vector4D t1 = context.Transform.Transform(this.segment4D_0.Start);
            Vector4D t2 = context.Transform.Transform(this.segment4D_0.End);

            this.method_4(context.Graphics, context.DrawingBoundsClipper, context, t1, t2);
        }
Exemple #3
0
        internal SolidBrush method_3(Class385 context)
        {
            SolidBrush solidBrush0 = context.solidBrush_0;

            solidBrush0.Color = context.ColorContext.GetColor(this.color_0, this.int_0);
            return(solidBrush0);
        }
Exemple #4
0
        internal Pen method_1(Class385 context)
        {
            Pen pen0 = context.pen_0;

            pen0.Color = context.ColorContext.GetColor(this.color_0, this.int_0);
            return(pen0);
        }
Exemple #5
0
        internal Pen method_0(Class385 context, bool forFilledPath)
        {
            Pen pen0 = context.pen_0;

            context.method_3(forFilledPath ? (short)0 : this.short_0);
            return(pen0);
        }
Exemple #6
0
 public void Draw(Class385 context)
 {
     using (GraphicsPath graphicsPath = this.ishape4D_0.ToGraphicsPath(context.Transform))
     {
         if (this.ishape4D_0.IsFilled)
         {
             context.Graphics.FillPath((Brush)this.method_3(context), graphicsPath);
         }
         else
         {
             Pen pen = this.method_2(context);
             try
             {
                 context.Graphics.DrawPath(pen, graphicsPath);
             }
             catch (OutOfMemoryException ex)
             {
                 if ((double)pen.Width <= 1.0)
                 {
                     return;
                 }
                 pen.Width = 1f;
                 context.Graphics.DrawPath(pen, graphicsPath);
             }
         }
     }
 }
Exemple #7
0
 public void Draw(Class385 context)
 {
     this.method_1(context);
     for (int index = 0; index < this.interface23_0.Length; ++index)
     {
         this.interface23_0[index].Draw(context.Graphics, (Class335)this, this.bool_0, context.Transform, context);
     }
 }
Exemple #8
0
        public void Draw(Class385 context)
        {
            if (this.image_0 == null)
            {
                return;
            }
            Graphics     graphics   = context.Graphics;
            Matrix4D     transform1 = context.Transform;
            Matrix       transform2 = graphics.Transform;
            GraphicsPath path       = (GraphicsPath)null;

            System.Drawing.Region region1 = (System.Drawing.Region)null;
            System.Drawing.Region region2 = (System.Drawing.Region)null;
            if (this.polyline4D_0 != null)
            {
                path = new GraphicsPath();
                PointF[] points = new PointF[this.polyline4D_0.Count];
                for (int index = 0; index < this.polyline4D_0.Count; ++index)
                {
                    points[index] = transform1.TransformToPointF(this.polyline4D_0[index]);
                }
                path.AddPolygon(points);
                region1       = graphics.Clip;
                region2       = new System.Drawing.Region(path);
                graphics.Clip = region2;
            }
            Point3D  point3D1  = transform1.TransformToPoint3D(this.vector4D_0);
            Point3D  point3D2  = transform1.TransformToPoint3D(this.vector4D_1);
            Point3D  point3D3  = transform1.TransformToPoint3D(this.vector4D_2);
            Vector3D vector3D1 = point3D2 - point3D1;
            Vector3D vector3D2 = point3D3 - point3D1;
            Matrix   matrix    = new Matrix((float)vector3D1.X, (float)vector3D1.Y, (float)vector3D2.X, (float)vector3D2.Y, (float)point3D1.X, (float)point3D1.Y);

            graphics.Transform = matrix;
            graphics.DrawImage(this.image_0, this.rectangleF_0, this.rectangleF_1, GraphicsUnit.Pixel);
            graphics.Transform = transform2;
            matrix.Dispose();
            if (this.polyline4D_1 != null && this.polyline4D_1.Count > 0 && context.GraphicsConfig.DrawImageFrame)
            {
                PointF[] points = new PointF[this.polyline4D_1.Count];
                for (int index = 0; index < this.polyline4D_1.Count; ++index)
                {
                    points[index] = transform1.TransformToPointF(this.polyline4D_1[index]);
                }
                graphics.DrawPolygon(this.method_2(context), points);
            }
            if (region2 == null)
            {
                return;
            }
            graphics.Clip = region1;
            graphics.DrawPath(this.method_2(context), path);
            region2.Dispose();
            path.Dispose();
        }
Exemple #9
0
 public void Draw(Class385 context)
 {
     if (this.linkedList_0 == null)
     {
         return;
     }
     for (LinkedListNode <Interface12> linkedListNode = this.linkedList_0.First; linkedListNode != null; linkedListNode = linkedListNode.Next)
     {
         linkedListNode.Value.Draw(context);
     }
 }
Exemple #10
0
        public void Draw(
            Graphics graphics,
            Class335 coloredPath,
            bool fill,
            Matrix4D transform,
            Class385 context)
        {
            PointF pointF = transform.TransformToPointF(this.vector4D_0);

            context.ColorContext.imethod_0(graphics, coloredPath.Color, (int)pointF.X, (int)pointF.Y);
        }
Exemple #11
0
        public void Draw(
            Graphics graphics,
            Rasterizer2D fastRasterizer,
            Class335 coloredPath,
            bool fill,
            Matrix4D transform,
            Class385 context)
        {
            Point2D point2D = transform.TransformTo2D(this.vector4D_0);

            fastRasterizer.DrawPoint(point2D.X, point2D.Y, (uint)coloredPath.Color.ToArgb());
        }
Exemple #12
0
        public void Draw(
            Graphics graphics,
            Class335 coloredPath,
            bool fill,
            Matrix4D transform,
            Class385 context)
        {
            PointF pointF1 = transform.TransformToPointF(this.vector4D_0);
            PointF pointF2 = transform.TransformToPointF(this.vector4D_1);

            graphics.DrawLine(coloredPath.method_0(context, false), pointF1.X, pointF1.Y, pointF2.X, pointF2.Y);
        }
Exemple #13
0
        public void Draw(
            Graphics graphics,
            Rasterizer2D fastRasterizer,
            Class335 coloredPath,
            bool fill,
            Matrix4D transform,
            Class385 context)
        {
            Point2D p1 = transform.TransformTo2D(this.vector4D_0);
            Point2D p2 = transform.TransformTo2D(this.vector4D_1);

            fastRasterizer.DrawLineSegment(p1, p2, (uint)coloredPath.Color.ToArgb());
        }
Exemple #14
0
 public void Draw(Class385 context)
 {
     using (GraphicsPath graphicsPath = new GraphicsPath())
     {
         for (int index = 0; index < this.interface23_0.Length; ++index)
         {
             this.interface23_0[index].Draw(graphicsPath, this.bool_0, context.Transform);
         }
         if (this.bool_0)
         {
             context.Graphics.FillPath((Brush)this.method_3(context), graphicsPath);
         }
         else
         {
             context.Graphics.DrawPath(this.method_2(context), graphicsPath);
         }
     }
 }
Exemple #15
0
        public void Draw(Class385 context)
        {
            Font     systemFont = this.class908_0.Font.SystemFont;
            Graphics graphics   = context.Graphics;
            Matrix4D transform1 = context.Transform;

            if (systemFont != null)
            {
                double      fontHeight = this.class908_0.Font.Metrics.FontHeight;
                ns4.Class26 metrics    = (ns4.Class26) this.class908_0.Font.Metrics;
                double      num        = metrics.CanonicalScaling * fontHeight;
                Matrix4D    matrix4D   = transform1 * this.class908_0.Transformation * Transformation4D.Scaling(num, -num, num);
                Matrix      transform2 = graphics.Transform;
                using (Matrix matrix = new Matrix((float)matrix4D.M00, (float)matrix4D.M10, (float)matrix4D.M01, (float)matrix4D.M11, (float)matrix4D.M03, (float)matrix4D.M13))
                {
                    graphics.Transform         = matrix;
                    context.solidBrush_0.Color = this.color_0;
                    graphics.DrawString(this.class908_0.Text.Text, systemFont, (Brush)context.solidBrush_0, metrics.BaseLineOffset.X, metrics.BaseLineOffset.Y, StringFormat.GenericTypographic);
                }
                graphics.Transform = transform2;
                if (this.class908_0.Linings.Length <= 0)
                {
                    return;
                }
                context.pen_0.Color = this.color_0;
                context.method_3(this.short_0);
                this.class908_0.method_1((IPathDrawer) new Class1036.Class1037(graphics, context.pen_0), transform1, 0.0);
            }
            else
            {
                context.pen_0.Color = this.color_0;
                context.method_3(this.short_0);
                IPathDrawer drawer = (IPathDrawer) new Class1036.Class1037(graphics, context.pen_0);
                this.class908_0.method_0(drawer, transform1, 0.0);
                if (this.class908_0.Linings.Length <= 0)
                {
                    return;
                }
                this.class908_0.method_1(drawer, transform1, 0.0);
            }
        }
Exemple #16
0
 public void Draw(
     Graphics graphics,
     Class335 coloredPath,
     bool fill,
     Matrix4D transform,
     Class385 context)
 {
     this.method_0(transform);
     if (fill && this.bool_0)
     {
         graphics.FillPolygon((Brush)coloredPath.method_3(context), this.pointF_0);
     }
     if (this.bool_0)
     {
         graphics.DrawPolygon(coloredPath.method_0(context, fill && this.bool_0), this.pointF_0);
     }
     else
     {
         graphics.DrawLines(coloredPath.method_0(context, fill && this.bool_0), this.pointF_0);
     }
 }
Exemple #17
0
 public void Draw(Class385 context)
 {
     using (GraphicsPath graphicsPath = new GraphicsPath())
     {
         this.method_1(context);
         for (int index = 0; index < this.interface23_0.Length; ++index)
         {
             this.interface23_0[index].Draw(graphicsPath, this.bool_0, context.Transform);
         }
         if (this.bool_0)
         {
             context.solidBrush_0.Color = this.Color;
             context.Graphics.FillPath((Brush)context.solidBrush_0, graphicsPath);
         }
         else
         {
             context.pen_0.Color = this.Color;
             context.Graphics.DrawPath(context.pen_0, graphicsPath);
         }
     }
 }
Exemple #18
0
        private void method_4(
            Graphics graphics,
            BlinnClipper4D drawingBoundsClipper,
            Class385 context,
            Vector4D t1,
            Vector4D t2)
        {
            IList <Segment4D> segment4DList = drawingBoundsClipper.Clip(new Segment4D(t1, t2));

            if (segment4DList.Count <= 0)
            {
                return;
            }
            Pen pen = this.method_2(context);

            foreach (Segment4D segment4D in (IEnumerable <Segment4D>)segment4DList)
            {
                Point3D start = (Point3D)segment4D.Start;
                Point3D end   = (Point3D)segment4D.End;
                graphics.DrawLine(pen, (float)start.X, (float)start.Y, (float)end.X, (float)end.Y);
            }
        }
Exemple #19
0
        public void Draw(
            Graphics graphics,
            Rasterizer2D fastRasterizer,
            Class335 coloredPath,
            bool fill,
            Matrix4D transform,
            Class385 context)
        {
            this.method_0(transform);
            if (fill && this.bool_0)
            {
                graphics.FillPolygon((Brush)coloredPath.method_3(context), this.pointF_0);
            }
            Point2D p1   = (Point2D)(this.bool_0 ? this.pointF_0[this.pointF_0.Length - 1] : this.pointF_0[0]);
            uint    argb = (uint)coloredPath.Color.ToArgb();

            for (int index = this.bool_0 ? 0 : 1; index < this.pointF_0.Length; ++index)
            {
                Point2D p2 = (Point2D)this.pointF_0[index];
                fastRasterizer.DrawLineSegment(p1, p2, argb);
                p1 = p2;
            }
        }
Exemple #20
0
 public void Draw(Class385 context)
 {
     context.method_0();
 }
Exemple #21
0
 public void Draw(Class385 context)
 {
     this.method_1(context);
     this.interface23_0.Draw(context.Graphics, (Class335)this, this.bool_0, context.Transform, context);
 }
Exemple #22
0
        public void Draw(Class385 context)
        {
            if (this.ibitmapProvider_0 == null)
            {
                return;
            }
            Graphics     graphics   = context.Graphics;
            Matrix4D     transform1 = context.Transform;
            Matrix       transform2 = graphics.Transform;
            GraphicsPath path       = (GraphicsPath)null;

            System.Drawing.Region region1 = (System.Drawing.Region)null;
            System.Drawing.Region region2 = (System.Drawing.Region)null;
            if (this.polyline4D_0 != null)
            {
                path = new GraphicsPath();
                PointF[] points = new PointF[this.polyline4D_0.Count];
                for (int index = 0; index < this.polyline4D_0.Count; ++index)
                {
                    points[index] = transform1.TransformToPointF(this.polyline4D_0[index]);
                }
                path.AddPolygon(points);
                region1       = graphics.Clip;
                region2       = new System.Drawing.Region(path);
                graphics.Clip = region2;
            }
            Point3D  point3D1  = transform1.TransformToPoint3D(this.vector4D_0);
            Point3D  point3D2  = transform1.TransformToPoint3D(this.vector4D_1);
            Point3D  point3D3  = transform1.TransformToPoint3D(this.vector4D_2);
            Vector3D vector3D1 = point3D2 - point3D1;
            Vector3D vector3D2 = point3D3 - point3D1;

            using (Matrix matrix = new Matrix((float)vector3D1.X, (float)vector3D2.X, (float)vector3D1.Y, (float)vector3D2.Y, (float)point3D1.X, (float)point3D1.Y))
            {
                graphics.Transform = matrix;
                double num = System.Math.Max(vector3D1.GetLength(), vector3D2.GetLength());
                if (num > 0.0)
                {
                    RectangleF destRect = new RectangleF(0.0f, (float)this.size2D_0.Y, (float)this.size2D_0.X, -(float)this.size2D_0.Y);
                    int        width    = (int)System.Math.Round(this.size2D_0.X * num);
                    int        height   = (int)System.Math.Round(this.size2D_0.Y * num);
                    if (width >= height)
                    {
                        if (width > context.GraphicsConfig.MaxScalableImageSize)
                        {
                            height = (int)System.Math.Round((double)height * (double)context.GraphicsConfig.MaxScalableImageSize / (double)width);
                            width  = context.GraphicsConfig.MaxScalableImageSize;
                        }
                    }
                    else if (height > context.GraphicsConfig.MaxScalableImageSize)
                    {
                        width  = (int)System.Math.Round((double)width * (double)context.GraphicsConfig.MaxScalableImageSize / (double)height);
                        height = context.GraphicsConfig.MaxScalableImageSize;
                    }
                    RectangleF srcRect = new RectangleF(-0.5f, -0.5f, (float)width, (float)height);
                    using (Bitmap bitmap = this.ibitmapProvider_0.CreateBitmap(new Size(width, height)))
                    {
                        if (bitmap != null)
                        {
                            graphics.DrawImage((Image)bitmap, destRect, srcRect, GraphicsUnit.Pixel);
                        }
                    }
                    graphics.Transform = transform2;
                }
            }
            if (region2 == null)
            {
                return;
            }
            graphics.Clip = region1;
            region2.Dispose();
            path.Dispose();
        }
Exemple #23
0
 public void Draw(Class385 context)
 {
 }
Exemple #24
0
        public void Draw(Class385 context)
        {
            PointF pointF = context.Transform.TransformToPointF(this.vector4D_0);

            context.ColorContext.imethod_0(context.Graphics, this.Color, (int)pointF.X, (int)pointF.Y);
        }