コード例 #1
0
        public void makeShape()
        {
            rootRightPoint = new Point(startingPoint.X + (tree_width) / 4, startingPoint.Y - 2 * tree_height / 3);
            rootLeftPoint  = new Point(startingPoint.X - (tree_width) / 4, startingPoint.Y - 2 * tree_height / 3);
            root           = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, rootRightPoint, rootLeftPoint, DefaultValue.VSHAPE_HINT);
            root.makeShape();

            branchHeight = (tree_height - 2 * tree_height / 3);
            branchWidth  = (tree_width - tree_width / 2);


            rightBranchLeftPoint   = new Point(rootRightPoint.X - branchWidth / 2, rootRightPoint.Y - branchHeight);
            righttBranchRightPoint = new Point(rootRightPoint.X + branchWidth / 2, rootRightPoint.Y - branchHeight);
            righttBranchMidPoint   = new Point(startingPoint.X + (tree_width) / 4, rootRightPoint.Y - branchHeight);
            rightBranch            = drawableShapeFactory.GetDrawableShape(graphics, pen, rootRightPoint, righttBranchRightPoint, rightBranchLeftPoint, DefaultValue.VSHAPE_HINT);
            rightBranch.makeShape();

            rightMidBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, rootRightPoint, righttBranchMidPoint, DefaultValue.LINE_HINT);
            rightMidBranch.makeShape();

            leftBranchLeftPoint  = new Point(rootLeftPoint.X - branchWidth / 2, rootLeftPoint.Y - branchHeight);
            leftBranchRightPoint = new Point(rootLeftPoint.X + branchWidth / 2, rootLeftPoint.Y - branchHeight);
            leftBranchMidPoint   = new Point(startingPoint.X - (tree_width) / 4, rootLeftPoint.Y - branchHeight);
            leftBranch           = drawableShapeFactory.GetDrawableShape(graphics, pen, rootLeftPoint, leftBranchRightPoint, leftBranchLeftPoint, DefaultValue.VSHAPE_HINT);
            leftBranch.makeShape();

            leftMidBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, rootLeftPoint, leftBranchMidPoint, DefaultValue.LINE_HINT);
            leftMidBranch.makeShape();
            //MessageBox.Show(rightBranchLeftPoint + " " + righttBranchRightPoint + " " + righttBranchMidPoint + " " + rootRightPoint);
        }
コード例 #2
0
 public override void makeShape()
 {
     upLine    = base.getLines(topLeftPoint, topRightPoint, graphics, pen);
     downLine  = base.getLines(bottomLeftPoint, bottomRightPoint, graphics, pen);
     rightLine = base.getLines(topRightPoint, bottomRightPoint, graphics, pen);
     leftLine  = base.getLines(topLeftPoint, bottomLeftPoint, graphics, pen);
     drawShape();
 }
コード例 #3
0
        public override void makeShape()
        {
            rightLine = base.getLines(rightPoint, topPoint, graphics, pen);
            leftLine  = base.getLines(leftPoint, topPoint, graphics, pen);
            baseLine  = base.getLines(leftPoint, rightPoint, graphics, pen);

            drawShape();
        }
コード例 #4
0
 public void makeShape()
 {
     tentBottomPoint      = new Point(startingPoint.X + house_width / 16, startingPoint.Y + house_height);
     tentBottomRightPoint = new Point(startingPoint.X + house_width / 2, startingPoint.Y + 3 * house_height / 4);
     tentBottomLeftPoint  = new Point(startingPoint.X - house_width / 2, startingPoint.Y + 3 * house_height / 4);
     tent = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, tentBottomRightPoint, tentBottomLeftPoint, tentBottomPoint, DefaultValue.RECT_HINT);
     tent.makeShape();
     frontSide = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, tentBottomPoint, DefaultValue.LINE_HINT);
     frontSide.makeShape();
 }
コード例 #5
0
 public void makeShape()
 {
     frontRightPoint = new Point(startingPoint.X + 2 * (house_width / 5), startingPoint.Y);
     frontTopPoint   = new Point((startingPoint.X + frontRightPoint.X) / 2, startingPoint.Y - house_height);
     frontSide       = drawableShapeFactory.GetDrawableShape(graphics, pen, frontTopPoint, frontRightPoint, startingPoint, DefaultValue.TRIANGLE_HINT);
     frontSide.makeShape();
     backBottomLeftPoint  = frontRightPoint;
     backTopLeftPoint     = frontTopPoint;
     backTopRightPoint    = new Point(backTopLeftPoint.X + 3 * (house_width / 5), backTopLeftPoint.Y);
     backBottomRightPoint = new Point(backBottomLeftPoint.X + 3 * (house_width / 5), backBottomLeftPoint.Y);
     backSide             = drawableShapeFactory.GetDrawableShape(graphics, pen, backTopLeftPoint, backTopRightPoint, backBottomLeftPoint, backBottomRightPoint, DefaultValue.RECT_HINT);
     backSide.makeShape();
 }
コード例 #6
0
        public void makeShape()
        {
            DrawableShapes leaf = basicShapeFactory.GetDrawableShape(graphics, pen, startingPoint, DefaultValue.FULL_CIRCLE_STARTING_ANGLE, DefaultValue.FULL_CIRCLE_ENDING_ANGLE, 3 * (height / 4), width, DefaultValue.CIRCULAR_HINT);

            leaf.makeShape();
            leafCenterPoint      = new Point(startingPoint.X + 3 * (width / 8), startingPoint.Y + width / 2);
            rootTopLeftPoint     = leafCenterPoint;
            rootTopRightPoint    = new Point(rootTopLeftPoint.X + (width / 4), rootTopLeftPoint.Y);
            rootbottomLeftPoint  = new Point(rootTopLeftPoint.X, rootTopLeftPoint.Y + 5 * (height / 8));
            rootBottomRightPoint = new Point(rootTopLeftPoint.X + (width / 4), rootTopLeftPoint.Y + 5 * (height / 8));
            DrawableShapes root = basicShapeFactory.GetDrawableShape(graphics, pen, rootTopLeftPoint, rootTopRightPoint, rootbottomLeftPoint, rootBottomRightPoint, DefaultValue.RECT_HINT);

            root.makeShape();
        }
コード例 #7
0
        public void makeShape()
        {
            baseTopRightPoint    = new Point(startingPoint.X + width, startingPoint.Y);
            baseBottomRightPoint = new Point(startingPoint.X + width, startingPoint.Y + 3 * height / 4);
            baseBottomLeftPoint  = new Point(startingPoint.X, startingPoint.Y + 3 * height / 4);
            DrawableShapes base_shape = drawAbleShapeFactory.GetDrawableShape(g, pen, startingPoint, baseTopRightPoint, baseBottomLeftPoint, baseBottomRightPoint, DefaultValue.RECT_HINT);

            base_shape.makeShape();
            roofRightPoint = baseTopRightPoint;
            roofTopPoint   = new Point(startingPoint.X + width / 2, startingPoint.Y - height / 4);
            DrawableShapes roof_top = drawAbleShapeFactory.GetDrawableShape(g, pen, roofTopPoint, roofRightPoint, startingPoint, DefaultValue.TRIANGLE_HINT);

            roof_top.makeShape();
        }
コード例 #8
0
        public void makeShape()
        {
            outterHalfCircle = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, DefaultValue.HALF_CIRCLE_STARTING_ANGLE, DefaultValue.HALF_CIRCLE_ENDING_ANGLE, 2 * house_height, house_width, DefaultValue.CIRCULAR_HINT);
            outterHalfCircle.makeShape();


            baseStartinPoint = new Point(startingPoint.X, startingPoint.Y + house_height);
            //graphics.DrawRectangle(pen, startingPoint.X, startingPoint.Y, house_width, house_height);
            endPoint = new Point(baseStartinPoint.X + house_width, baseStartinPoint.Y);
            baseLine = drawableShapeFactory.GetDrawableShape(graphics, pen, baseStartinPoint, endPoint, DefaultValue.LINE_HINT);
            baseLine.makeShape();
            innerPoint      = new Point(baseStartinPoint.X + house_width / 4, baseStartinPoint.Y - house_height / 2);
            innerHalfCircle = drawableShapeFactory.GetDrawableShape(graphics, pen, innerPoint, DefaultValue.HALF_CIRCLE_STARTING_ANGLE, DefaultValue.HALF_CIRCLE_ENDING_ANGLE, house_height, house_width / 2, DefaultValue.CIRCULAR_HINT);
            innerHalfCircle.makeShape();
        }
コード例 #9
0
        public override void makeShape()
        {
            topLeftLine        = base.getLines(startingPoint, topLeftPoint, graphics, pen);
            topMidLeftLine     = base.getLines(topLeftPoint, topMidLeftPoint, graphics, pen);
            topMidLine         = base.getLines(topMidLeftPoint, topMidPoint, graphics, pen);
            topMidRightLine    = base.getLines(topMidPoint, topMidRightPoint, graphics, pen);
            topEndLine         = base.getLines(topMidRightPoint, endPoint, graphics, pen);
            bottomLeftLine     = base.getLines(startingPoint, bottomLeftPoint, graphics, pen);
            bottomMidLeftLine  = base.getLines(bottomLeftPoint, bottomMidLeftPoint, graphics, pen);
            bottomMidRightLine = base.getLines(bottomMidLeftPoint, bottomMidRightPoint, graphics, pen);
            bottomEndLine      = base.getLines(bottomMidRightPoint, endPoint, graphics, pen);
            drawShape();



            drawShape();
        }
コード例 #10
0
        public void makeShape()
        {
            int unitWidth  = width / 8;
            int unitHeight = height / 8;

            topLeftPoint        = new Point(startingPoint.X + 3 * unitWidth, startingPoint.Y - 2 * unitHeight);
            topMidLeftPoint     = new Point(topLeftPoint.X + unitWidth, startingPoint.Y - 3 * unitHeight);
            topMidPoint         = new Point(topMidLeftPoint.X, startingPoint.Y - unitHeight);
            topMidRightPoint    = new Point(topMidPoint.X + 2 * unitWidth, startingPoint.Y - 4 * unitHeight);
            bottomLeftPoint     = new Point(startingPoint.X + 3 * unitWidth, startingPoint.Y + 4 * unitHeight);
            bottomMidLeftPoint  = new Point(bottomLeftPoint.X + unitWidth, startingPoint.Y + unitHeight);
            bottomMidRightPoint = new Point(bottomMidLeftPoint.X + unitWidth, startingPoint.Y + 3 * unitHeight);
            endPoint            = new Point(startingPoint.X + 8 * unitWidth, startingPoint.Y);
            DrawableShapes nonagon = basicShapeFactory.GetDrawableShape(graphics, pen, startingPoint, topLeftPoint, topMidLeftPoint, topMidPoint, topMidRightPoint, bottomLeftPoint, bottomMidLeftPoint, bottomMidRightPoint, endPoint, DefaultValue.UNEQUAL_NONAGON_HINT);

            nonagon.makeShape();
        }
コード例 #11
0
        public void makeShape()
        {
            rootPoint = new Point(startingPoint.X, startingPoint.Y + 2 * tREE_HEIGHT / 3);
            root      = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, rootPoint, DefaultValue.LINE_HINT);
            root.makeShape();
            int branch_height = tREE_HEIGHT / 3;

            leftPoint  = new Point(startingPoint.X - tREE_HEIGHT / 2, startingPoint.Y - branch_height / 3);
            leftBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, leftPoint, DefaultValue.LINE_HINT);
            leftBranch.makeShape();
            rightPoint  = new Point(startingPoint.X + tREE_HEIGHT / 2, startingPoint.Y - branch_height / 3);
            rightBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, rightPoint, DefaultValue.LINE_HINT);
            rightBranch.makeShape();
            leftMidPoint  = new Point(startingPoint.X - tREE_HEIGHT / 2, startingPoint.Y - 2 * branch_height / 3);
            leftMidBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, leftMidPoint, DefaultValue.LINE_HINT);
            leftMidBranch.makeShape();
            rightMidPoint  = new Point(startingPoint.X + tREE_HEIGHT / 2, startingPoint.Y - 2 * branch_height / 3);
            rightMidBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, rightMidPoint, DefaultValue.LINE_HINT);
            rightMidBranch.makeShape();
            midPoint  = new Point(startingPoint.X + 1, startingPoint.Y - branch_height);
            midBranch = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, midPoint, DefaultValue.LINE_HINT);
            midBranch.makeShape();
        }
コード例 #12
0
 public void makeShape()
 {
     waterSource = drawableShapeFactory.GetDrawableShape(graphics, pen, startingPoint, DefaultValue.FULL_CIRCLE_STARTING_ANGLE, DefaultValue.FULL_CIRCLE_ENDING_ANGLE, egyptian_WATER_SOURCE_HEIGHT, egyptian_WATER_SOURCE_WIDTH, DefaultValue.CIRCULAR_HINT);
     waterSource.makeShape();
 }
コード例 #13
0
 public override void makeShape()
 {
     arc = getArcs(graphics, pen, startingPoint, startingAngle, endingAngle, height, width);
     drawShape();
 }