public Canvas( ImageInfo image, ToolPanel toolInfoPanel ) { myOnParentResizeHandler = new EventHandler( OnParentResize ); myOnParentMouseEnterHandler = new EventHandler( OnParentMouseEnter ); myOnParentDisposedHandler = new EventHandler( OnParentDisposed ); myCurrentLayerIndex = 0; myMovingSelected = false; mySelectingPixels = false; myDrawingPencil = false; myDrawingBox = false; Image = image; myToolPanel = toolInfoPanel; mySelectedPixels = new bool[ image.Width, image.Height ]; mySelectedArea = 0; mySelectedRegion = new Region( Rectangle.Empty ); myScaledRegion = new Region( Rectangle.Empty ); Size = new Size( image.Width * 8, image.Height * 8 ); BorderStyle = BorderStyle.FixedSingle; DoubleBuffered = true; InitializeComponent(); }
public Canvas(ImageInfo image, ToolPanel toolInfoPanel) { myOnParentResizeHandler = new EventHandler(OnParentResize); myOnParentMouseEnterHandler = new EventHandler(OnParentMouseEnter); myOnParentDisposedHandler = new EventHandler(OnParentDisposed); myCurrentLayerIndex = 0; myMovingSelected = false; mySelectingPixels = false; myDrawingPencil = false; myDrawingBox = false; Image = image; myToolPanel = toolInfoPanel; mySelectedPixels = new bool[image.Width, image.Height]; mySelectedArea = 0; mySelectedRegion = new Region(Rectangle.Empty); myScaledRegion = new Region(Rectangle.Empty); Size = new Size(image.Width * 8, image.Height * 8); BorderStyle = BorderStyle.FixedSingle; DoubleBuffered = true; InitializeComponent(); }
private void SetupCanvas(ToolPanel toolInfoPanel) { Tab = new TabPage(TabName); Tab.ImageIndex = 0; Tab.BackColor = SystemColors.ControlDark; Canvas = new Canvas(this, toolInfoPanel); Canvas.Name = "canvas"; Tab.Controls.Add(Canvas); }
public ImageInfo(ToolPanel toolInfoPanel, String filePath) { ActionStack = new ActionStack(); FilePath = filePath; SetupDefaultGrid(); Load(filePath); SetupCanvas(toolInfoPanel); Modified = false; }
public ImageInfo( ToolPanel toolInfoPanel, String filePath ) { ActionStack = new ActionStack(); FilePath = filePath; SetupDefaultGrid(); Load( filePath ); SetupCanvas( toolInfoPanel ); Modified = false; }
public ImageInfo(ToolPanel toolInfoPanel, int width, int height, String name = "untitled.png") { ActionStack = new ActionStack(); Size = new Size(width, height); FilePath = name; SetupDefaultGrid(); SetupCanvas(toolInfoPanel); Layers = new List <Layer>(); Layers.Add(new Layer(this)); Modified = true; }
public ImageInfo( ToolPanel toolInfoPanel, int width, int height, String name = "untitled.png" ) { ActionStack = new ActionStack(); Size = new Size( width, height ); FilePath = name; SetupDefaultGrid(); SetupCanvas( toolInfoPanel ); Layers = new List<Layer>(); Layers.Add( new Layer( this ) ); Modified = true; }
private void SetupCanvas( ToolPanel toolInfoPanel ) { Tab = new TabPage( TabName ); Tab.ImageIndex = 0; Tab.BackColor = SystemColors.ControlDark; Canvas = new Canvas( this, toolInfoPanel ); Canvas.Name = "canvas"; Tab.Controls.Add( Canvas ); }