Beispiel #1
0
 public ObjectPointerTool(ILayerContext layerContext, ObjectLayer layer, Size gridSize)
 {
     _layerContext = layerContext;
     //_history = history;
     _layer = layer;
     _gridSize = gridSize;
 }
        public SnappingManager(Point subjectOrigin, Rectangle subjectBounds, Size gridSize)
        {
            _gridX = gridSize.Width;
            _gridY = gridSize.Height;

            _origin = subjectOrigin;
            _bounds = subjectBounds;
        }
Beispiel #3
0
        private ObjectDrawTool NewDrawTool()
        {
            Treefrog.Framework.Imaging.Size gridSize = new Treefrog.Framework.Imaging.Size(16, 16);
            ObjectDrawTool tool = new ObjectDrawTool(LayerContext, Layer, gridSize);

            tool.BindObjectSourceController(_objectController);

            return(tool);
        }
Beispiel #4
0
        private ObjectSelectTool NewSelectTool()
        {
            Treefrog.Framework.Imaging.Size gridSize = new Treefrog.Framework.Imaging.Size(Layer.GridWidth, Layer.GridHeight);
            ObjectSelectTool tool = new ObjectSelectTool(LayerContext, Layer, gridSize, _selectionManager);

            tool.BindObjectSourceController(_objectController);

            return(tool);
        }
Beispiel #5
0
        public ObjectSelectTool(ILayerContext layerContext, ObjectLayer layer, Size gridSize, ObjectSelectionManager selectionManager)
            : base(layerContext, layer, gridSize)
        {
            _annots = layerContext.Annotations;
            _viewport = layerContext.Geometry;
            _selectionManager = selectionManager;
            _layerContext = layerContext;

            InitializeCommandManager();

            _state = new SelectionStandbyToolState(this);
        }
Beispiel #6
0
 public Rectangle(Point location, Size size)
     : this(location.X, location.Y, size.Width, size.Height)
 {
 }
Beispiel #7
0
 public TextureResource(Size size, byte[] data, int dataOffset)
     : this(size.Width, size.Height, data, dataOffset)
 {
 }
Beispiel #8
0
 public TextureResource(Size size, byte[] data)
     : this(size.Width, size.Height, data, 0)
 {
 }
Beispiel #9
0
 public TextureResource(Size size)
     : this(size.Width, size.Height)
 {
 }
Beispiel #10
0
 public bool Equals(Size other)
 {
     return this.Width == other.Width && this.Height == other.Height;
 }
Beispiel #11
0
 public ObjectDrawTool(ILayerContext layerContext, ObjectLayer layer, Size gridSize)
     : base(layerContext, layer, gridSize)
 {
     _annots = layerContext.Annotations;
 }