private GraphicsPath CreateCube3DPath(Cube3DPart part, int x, int y, int width, int height, int depth) { GraphicsPath path = new GraphicsPath(); if (part == Cube3DPart.Main) path.AddRectangle(new Rectangle(x, y, width, height)); else if (part == Cube3DPart.Top) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x, y), new Point(x + realDepth.X, y + realDepth.Y), new Point(x + width + realDepth.X, y + realDepth.Y), new Point(x + width, y), new Point(x, y) }); } else if (part == Cube3DPart.Right) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x + width, y), new Point(x + width + realDepth.X, y + realDepth.Y), new Point(x + width + realDepth.X, y + height + realDepth.Y), new Point(x + width, y + height), new Point(x + width, y) }); } else if (part == Cube3DPart.Bottom) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x, y + height), new Point(x + realDepth.X, y + height + realDepth.Y), new Point(x + width + realDepth.X, y + height + realDepth.Y), new Point(x + width, y + height), new Point(x, y + height) }); } else if (part == Cube3DPart.Left) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x, y), new Point(x + realDepth.X, y + realDepth.Y), new Point(x + realDepth.X, y + height + realDepth.Y), new Point(x, y + height), new Point(x, y) }); } else throw new NotImplementedException(); return path; }
private GraphicsPath CreateCube3DPath(Cube3DPart part, int x, int y, int width, int height, int depth) { GraphicsPath path = new GraphicsPath(); if (part == Cube3DPart.Main) { path.AddRectangle(new Rectangle(x, y, width, height)); } else if (part == Cube3DPart.Top) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x, y), new Point(x + realDepth.X, y + realDepth.Y), new Point(x + width + realDepth.X, y + realDepth.Y), new Point(x + width, y), new Point(x, y) }); } else if (part == Cube3DPart.Right) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x + width, y), new Point(x + width + realDepth.X, y + realDepth.Y), new Point(x + width + realDepth.X, y + height + realDepth.Y), new Point(x + width, y + height), new Point(x + width, y) }); } else if (part == Cube3DPart.Bottom) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x, y + height), new Point(x + realDepth.X, y + height + realDepth.Y), new Point(x + width + realDepth.X, y + height + realDepth.Y), new Point(x + width, y + height), new Point(x, y + height) }); } else if (part == Cube3DPart.Left) { Point realDepth = GetRealDepth(depth); path.AddLines(new Point[] { new Point(x, y), new Point(x + realDepth.X, y + realDepth.Y), new Point(x + realDepth.X, y + height + realDepth.Y), new Point(x, y + height), new Point(x, y) }); } else { throw new NotImplementedException(); } return(path); }