Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
9b894a78
Commit
9b894a78
authored
Dec 07, 2010
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* compatibility with wxWdigets 2.9+: SetClippingRegion -> SetDeviceClippingRegion
* overload wxEVT_ERASE_BACKGROUND, to reduce flicker
parent
1363c9a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/gui/control/card_viewer.cpp
src/gui/control/card_viewer.cpp
+2
-1
src/gui/control/card_viewer.hpp
src/gui/control/card_viewer.hpp
+2
-1
No files found.
src/gui/control/card_viewer.cpp
View file @
9b894a78
...
@@ -88,7 +88,7 @@ void CardViewer::onPaint(wxPaintEvent&) {
...
@@ -88,7 +88,7 @@ void CardViewer::onPaint(wxPaintEvent&) {
// dc.SetDeviceOrigin(-dx, -dy);
// dc.SetDeviceOrigin(-dx, -dy);
wxRegion
clip
=
GetUpdateRegion
();
wxRegion
clip
=
GetUpdateRegion
();
// clip.Offset(dx, dy);
// clip.Offset(dx, dy);
dc
.
SetClippingRegion
(
clip
);
dc
.
Set
Device
ClippingRegion
(
clip
);
// draw
// draw
if
(
!
up_to_date
)
{
if
(
!
up_to_date
)
{
up_to_date
=
true
;
up_to_date
=
true
;
...
@@ -150,4 +150,5 @@ Rotation CardViewer::getRotation() const {
...
@@ -150,4 +150,5 @@ Rotation CardViewer::getRotation() const {
BEGIN_EVENT_TABLE
(
CardViewer
,
wxControl
)
BEGIN_EVENT_TABLE
(
CardViewer
,
wxControl
)
EVT_PAINT
(
CardViewer
::
onPaint
)
EVT_PAINT
(
CardViewer
::
onPaint
)
EVT_ERASE_BACKGROUND
(
CardViewer
::
onEraseBackground
)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
src/gui/control/card_viewer.hpp
View file @
9b894a78
...
@@ -24,7 +24,7 @@ DECLARE_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>)
...
@@ -24,7 +24,7 @@ DECLARE_EVENT_TYPE(EVENT_SIZE_CHANGE, <not used>)
/// A control to view a single card
/// A control to view a single card
class
CardViewer
:
public
wxControl
,
public
DataViewer
{
class
CardViewer
:
public
wxControl
,
public
DataViewer
{
public:
public:
CardViewer
(
Window
*
parent
,
int
id
,
long
style
=
0
);
CardViewer
(
Window
*
parent
,
int
id
,
long
style
=
wxBORDER_THEME
);
/// Get a dc to draw on the card outside onPaint
/// Get a dc to draw on the card outside onPaint
/** May NOT be called while in onPaint/draw */
/** May NOT be called while in onPaint/draw */
...
@@ -55,6 +55,7 @@ class CardViewer : public wxControl, public DataViewer {
...
@@ -55,6 +55,7 @@ class CardViewer : public wxControl, public DataViewer {
private:
private:
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
void
onEraseBackground
(
wxEraseEvent
&
)
{}
void
onPaint
(
wxPaintEvent
&
);
void
onPaint
(
wxPaintEvent
&
);
Bitmap
buffer
;
///< Off-screen buffer we draw to
Bitmap
buffer
;
///< Off-screen buffer we draw to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment