KiCad PCB EDA Suite
dialog_image_editor.h
Go to the documentation of this file.
1 
5 /*
6  * This program source code file is part of KICAD, a free EDA CAD application.
7  *
8  * Copyright (C) 2011 jean-pierre.charras
9  * Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, you may find one here:
23  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
24  * or you may search the http://www.gnu.org website for the version 2 license,
25  * or you may write to the Free Software Foundation, Inc.,
26  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27  */
28 
29 #ifndef _DIALOG_IMAGE_EDITOR_H_
30 #define _DIALOG_IMAGE_EDITOR_H_
31 
33 
34 
36 {
37 private:
38  BITMAP_BASE* m_workingImage; // The copy of BITMAP_BASE to be edited
39  BITMAP_BASE* m_lastImage; // the saved BITMAP_BASE before a new change.
40  // Used to undo the last change
41 
42 public:
43  DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem );
45 
46 
47 public:
53  void TransfertToImage( BITMAP_BASE* aItem );
54 
55 private:
56  void OnUndoLastChange( wxCommandEvent& event ) override;
57  void OnGreyScaleConvert( wxCommandEvent& event ) override;
58  void OnHalfSize( wxCommandEvent& event ) override;
59  void OnMirrorX_click( wxCommandEvent& event ) override;
60  void OnMirrorY_click( wxCommandEvent& event ) override;
61  void OnRotateClick( wxCommandEvent& event ) override;
62  void OnOK_Button( wxCommandEvent& aEvent ) override;
63  void OnCancel_Button( wxCommandEvent& aEvent ) override;
64  void OnRedrawPanel( wxPaintEvent& event ) override;
65  bool CheckValues();
66 };
67 
68 
69 #endif // _DIALOG_IMAGE_EDITOR_H_
Class DIALOG_IMAGE_EDITOR_BASE.
void TransfertToImage(BITMAP_BASE *aItem)
Function TransfertToImage copy edited image to aItem.
BITMAP_BASE * m_workingImage
DIALOG_IMAGE_EDITOR(wxWindow *aParent, BITMAP_BASE *aItem)
void OnMirrorY_click(wxCommandEvent &event) override
void OnUndoLastChange(wxCommandEvent &event) override
void OnRedrawPanel(wxPaintEvent &event) override
This class handle bitmap images in KiCad.
void OnGreyScaleConvert(wxCommandEvent &event) override
void OnMirrorX_click(wxCommandEvent &event) override
void OnHalfSize(wxCommandEvent &event) override
void OnCancel_Button(wxCommandEvent &aEvent) override
void OnOK_Button(wxCommandEvent &aEvent) override
void OnRotateClick(wxCommandEvent &event) override