Example #1
0
 override protected void OnPress(IntCoordinate c)
 {
     _x          = c.X;
     _y          = c.Y;
     _rectangle  = SliceData.FindRectangle(c);
     _slice      = _rectangle.CreateHorizontalSlice(_y);
     _horizontal = true;
     Preview.Renderer.Function = Gdk.Function.Equiv;
     _slice.Draw(Preview.Renderer);
 }
Example #2
0
        public void CreateTable(IntCoordinate c, int rows, int columns)
        {
            var rectangle = new Rectangle(_rectangles.Find(c));
            int width     = rectangle.Width;
            int height    = rectangle.Height;
            int x1        = rectangle.X1;
            int y1        = rectangle.Y1;

            for (int row = 1; row < rows; row++)
            {
                int ypos = y1 + row * height / rows;
                AddSlice(rectangle.CreateHorizontalSlice(ypos));
            }

            for (int col = 1; col < columns; col++)
            {
                int xpos = x1 + col * width / columns;
                AddSlice(rectangle.CreateVerticalSlice(xpos));
            }
        }
Example #3
0
        public void CreateTable(IntCoordinate c, int rows, int columns)
        {
            var rectangle = new Rectangle(_rectangles.Find(c));
              int width = rectangle.Width;
              int height = rectangle.Height;
              int x1 = rectangle.X1;
              int y1 = rectangle.Y1;

              for (int row = 1; row < rows; row++)
            {
              int ypos = y1 + row * height / rows;
              AddSlice(rectangle.CreateHorizontalSlice(ypos));
            }

              for (int col = 1; col < columns; col++)
            {
              int xpos = x1 + col * width / columns;
              AddSlice(rectangle.CreateVerticalSlice(xpos));
            }
        }
Example #4
0
 protected override void OnPress(IntCoordinate c)
 {
     _x = c.X;
       _y = c.Y;
       _rectangle = SliceData.FindRectangle(c);
       _slice = _rectangle.CreateHorizontalSlice(_y);
       _horizontal = true;
       Preview.Renderer.Function = Gdk.Function.Equiv;
       _slice.Draw(Preview.Renderer);
 }