Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
a457dffd
Commit
a457dffd
authored
Jun 16, 2014
by
Bernhard Stegmaier
Committed by
Dick Hollenbeck
Jun 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSX drawing artifacts
parent
f43cf037
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
34 deletions
+97
-34
libedit.cpp
eeschema/libedit.cpp
+9
-0
draw_gerber_screen.cpp
gerbview/draw_gerber_screen.cpp
+9
-0
pl_editor_frame.cpp
pagelayout_editor/pl_editor_frame.cpp
+9
-0
wxpython-3.0.0_macosx.patch
patches/wxpython-3.0.0_macosx.patch
+13
-9
wxwidgets-3.0.0_macosx.patch
patches/wxwidgets-3.0.0_macosx.patch
+57
-25
No files found.
eeschema/libedit.cpp
View file @
a457dffd
...
...
@@ -281,6 +281,15 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
RedrawComponent
(
DC
,
wxPoint
(
0
,
0
)
);
#ifdef USE_WX_OVERLAY
if
(
IsShown
()
)
{
m_overlay
.
Reset
();
wxDCOverlay
overlaydc
(
m_overlay
,
(
wxWindowDC
*
)
DC
);
overlaydc
.
Clear
();
}
#endif
if
(
m_canvas
->
IsMouseCaptured
()
)
m_canvas
->
CallMouseCapture
(
DC
,
wxDefaultPosition
,
false
);
...
...
gerbview/draw_gerber_screen.cpp
View file @
a457dffd
...
...
@@ -112,6 +112,15 @@ void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
DrawWorkSheet
(
DC
,
screen
,
0
,
IU_PER_MILS
,
wxEmptyString
);
#ifdef USE_WX_OVERLAY
if
(
IsShown
()
)
{
m_overlay
.
Reset
();
wxDCOverlay
overlaydc
(
m_overlay
,
(
wxWindowDC
*
)
DC
);
overlaydc
.
Clear
();
}
#endif
if
(
m_canvas
->
IsMouseCaptured
()
)
m_canvas
->
CallMouseCapture
(
DC
,
wxDefaultPosition
,
false
);
...
...
pagelayout_editor/pl_editor_frame.cpp
View file @
a457dffd
...
...
@@ -534,6 +534,15 @@ void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg )
DrawWorkSheet
(
aDC
,
GetScreen
(),
0
,
IU_PER_MILS
,
GetCurrFileName
()
);
#ifdef USE_WX_OVERLAY
if
(
IsShown
()
)
{
m_overlay
.
Reset
();
wxDCOverlay
overlaydc
(
m_overlay
,
(
wxWindowDC
*
)
aDC
);
overlaydc
.
Clear
();
}
#endif
if
(
m_canvas
->
IsMouseCaptured
()
)
m_canvas
->
CallMouseCapture
(
aDC
,
wxDefaultPosition
,
false
);
...
...
patches/wxpython-3.0.0_macosx.patch
View file @
a457dffd
=== modified file 'Makefile.in'
--- Makefile.in 2014-0
2-05 21:57:29
+0000
+++ Makefile.in 2014-0
2-05 22:00:01
+0000
--- Makefile.in 2014-0
6-11 15:08:00
+0000
+++ Makefile.in 2014-0
6-11 15:10:36
+0000
@@ -14601,7 +14601,7 @@
monodll_carbon_frame.o \
monodll_carbon_mdi.o \
...
...
@@ -92,8 +92,8 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
=== modified file 'include/wx/overlay.h'
--- include/wx/overlay.h 2014-0
2-05 21:57:29
+0000
+++ include/wx/overlay.h 2014-0
2-05 21:57:47
+0000
--- include/wx/overlay.h 2014-0
6-11 15:08:00
+0000
+++ include/wx/overlay.h 2014-0
6-11 15:10:36
+0000
@@ -13,7 +13,7 @@
#include "wx/defs.h"
...
...
@@ -105,8 +105,8 @@
#define wxHAS_NATIVE_OVERLAY 1
=== modified file 'include/wx/private/overlay.h'
--- include/wx/private/overlay.h 2014-0
2-05 21:57:29
+0000
+++ include/wx/private/overlay.h 2014-0
2-05 21:57:47
+0000
--- include/wx/private/overlay.h 2014-0
6-11 15:08:00
+0000
+++ include/wx/private/overlay.h 2014-0
6-11 15:10:36
+0000
@@ -16,7 +16,11 @@
#ifdef wxHAS_NATIVE_OVERLAY
...
...
@@ -121,8 +121,8 @@
#else
=== modified file 'src/osx/cocoa/overlay.mm'
--- src/osx/cocoa/overlay.mm 2014-0
2-05 21:57:29
+0000
+++ src/osx/cocoa/overlay.mm 2014-0
2-05 21:57:47
+0000
--- src/osx/cocoa/overlay.mm 2014-0
6-11 15:08:00
+0000
+++ src/osx/cocoa/overlay.mm 2014-0
6-11 15:12:45
+0000
@@ -34,6 +34,7 @@
#include "wx/private/overlay.h"
...
...
@@ -180,7 +180,7 @@
}
void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height )
@@ -107,84 +66,5
0
@@
@@ -107,84 +66,5
4
@@
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") );
m_window = dc->GetWindow();
...
...
@@ -222,6 +222,8 @@
+ m_overlayWindow = m_window->MacGetTopLevelWindowRef();
+
+ NSRect box = [m_overlayWindow frame];
+ box.origin.x = 0;
+ box.origin.y = 0;
+
+ if( [m_overlayWindow isVisible] )
+ {
...
...
@@ -280,6 +282,8 @@
- [m_overlayWindow release];
- m_overlayWindow = NULL ;
+ NSRect box = [m_overlayWindow frame];
+ box.origin.x = 0;
+ box.origin.y = 0;
+
+ [m_overlayWindow discardCachedImage];
+ [m_overlayWindow cacheImageInRect:box];
...
...
patches/wxwidgets-3.0.0_macosx.patch
View file @
a457dffd
=== modified file 'Makefile.in'
--- Makefile.in 2014-0
1-26 11:10:36
+0000
+++ Makefile.in 2014-0
1-26 11:15:53
+0000
@@ -146
01,7 +14601
,7 @@
--- Makefile.in 2014-0
6-08 14:30:42
+0000
+++ Makefile.in 2014-0
6-08 14:30:57
+0000
@@ -146
19,7 +14619
,7 @@
monodll_carbon_frame.o \
monodll_carbon_mdi.o \
monodll_carbon_metafile.o \
...
...
@@ -10,7 +10,7 @@
monodll_carbon_popupwin.o \
monodll_carbon_renderer.o \
monodll_carbon_settings.o \
@@ -147
48,7 +14748
,7 @@
@@ -147
66,7 +14766
,7 @@
monolib_carbon_frame.o \
monolib_carbon_mdi.o \
monolib_carbon_metafile.o \
...
...
@@ -19,7 +19,7 @@
monolib_carbon_popupwin.o \
monolib_carbon_renderer.o \
monolib_carbon_settings.o \
@@ -14
895,7 +14895
,7 @@
@@ -14
913,7 +14913
,7 @@
coredll_carbon_frame.o \
coredll_carbon_mdi.o \
coredll_carbon_metafile.o \
...
...
@@ -28,7 +28,7 @@
coredll_carbon_popupwin.o \
coredll_carbon_renderer.o \
coredll_carbon_settings.o \
@@ -150
27,7 +15027
,7 @@
@@ -150
45,7 +15045
,7 @@
corelib_carbon_frame.o \
corelib_carbon_mdi.o \
corelib_carbon_metafile.o \
...
...
@@ -37,7 +37,7 @@
corelib_carbon_popupwin.o \
corelib_carbon_renderer.o \
corelib_carbon_settings.o \
@@ -177
74,6 +17774
,9 @@
@@ -177
92,6 +17792
,9 @@
monodll_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm
...
...
@@ -47,7 +47,7 @@
monodll_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm
@@ -236
42,6 +23645
,9 @@
@@ -236
66,6 +23669
,9 @@
monolib_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm
...
...
@@ -57,7 +57,7 @@
monolib_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm
@@ -33
584,8 +33590
,8 @@
@@ -33
620,8 +33626
,8 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
...
...
@@ -68,7 +68,7 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
@@ -3
7961,8 +37967
,8 @@
@@ -3
8003,8 +38009
,8 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
...
...
@@ -80,9 +80,29 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
=== modified file 'include/wx/osx/cocoa/private/overlay.h'
--- include/wx/osx/cocoa/private/overlay.h 2014-06-08 14:30:42 +0000
+++ include/wx/osx/cocoa/private/overlay.h 2014-06-11 12:07:05 +0000
@@ -41,15 +41,8 @@
void CreateOverlayWindow();
WXWindow m_overlayWindow;
- WXWindow m_overlayParentWindow;
- CGContextRef m_overlayContext ;
// we store the window in case we would have to issue a Refresh()
wxWindow* m_window ;
-
- int m_x ;
- int m_y ;
- int m_width ;
- int m_height ;
} ;
#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
=== modified file 'include/wx/overlay.h'
--- include/wx/overlay.h 2014-0
1-26 11:10:36
+0000
+++ include/wx/overlay.h 2014-0
1-26 11:10:44
+0000
--- include/wx/overlay.h 2014-0
6-08 14:30:42
+0000
+++ include/wx/overlay.h 2014-0
6-08 14:30:57
+0000
@@ -13,7 +13,7 @@
#include "wx/defs.h"
...
...
@@ -94,8 +114,8 @@
#define wxHAS_NATIVE_OVERLAY 1
=== modified file 'include/wx/private/overlay.h'
--- include/wx/private/overlay.h 2014-0
1-26 11:10:36
+0000
+++ include/wx/private/overlay.h 2014-0
1-26 11:10:44
+0000
--- include/wx/private/overlay.h 2014-0
6-08 14:30:42
+0000
+++ include/wx/private/overlay.h 2014-0
6-08 14:30:57
+0000
@@ -16,7 +16,11 @@
#ifdef wxHAS_NATIVE_OVERLAY
...
...
@@ -110,8 +130,8 @@
#else
=== modified file 'src/osx/cocoa/overlay.mm'
--- src/osx/cocoa/overlay.mm 2014-0
1-26 11:10:36
+0000
+++ src/osx/cocoa/overlay.mm 2014-0
1-26 11:10:44
+0000
--- src/osx/cocoa/overlay.mm 2014-0
6-08 14:30:42
+0000
+++ src/osx/cocoa/overlay.mm 2014-0
6-11 12:06:53
+0000
@@ -34,6 +34,7 @@
#include "wx/private/overlay.h"
...
...
@@ -120,7 +140,15 @@
// ============================================================================
// implementation
@@ -58,48 +59,6 @@
@@ -42,7 +43,6 @@
wxOverlayImpl::wxOverlayImpl()
{
m_window = NULL ;
- m_overlayContext = NULL ;
m_overlayWindow = NULL ;
}
@@ -58,48 +58,6 @@
void wxOverlayImpl::CreateOverlayWindow()
{
...
...
@@ -169,7 +197,7 @@
}
void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height )
@@ -107,84 +6
6,50
@@
@@ -107,84 +6
5,49
@@
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") );
m_window = dc->GetWindow();
...
...
@@ -211,6 +239,8 @@
+ m_overlayWindow = m_window->MacGetTopLevelWindowRef();
+
+ NSRect box = [m_overlayWindow frame];
+ box.origin.x = 0;
+ box.origin.y = 0;
+
+ if( [m_overlayWindow isVisible] )
+ {
...
...
@@ -228,7 +258,6 @@
- win_impl->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) );
- dc->SetClippingRegion( m_x , m_y , m_width , m_height ) ;
- }
+
}
void wxOverlayImpl::EndDrawing( wxDC* dc)
...
...
@@ -241,11 +270,13 @@
- CGContextFlush( m_overlayContext );
}
void wxOverlayImpl::Clear(wxDC* WXUNUSED(dc))
-void wxOverlayImpl::Clear(wxDC* WXUNUSED(dc))
+void wxOverlayImpl::Clear( wxDC* WXUNUSED(dc) )
{
wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") );
- CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 );
- CGContextClearRect( m_overlayContext, box );
+
+ if( [m_overlayWindow isVisible] )
+ {
+ [m_overlayWindow restoreCachedImage];
...
...
@@ -256,11 +287,10 @@
void wxOverlayImpl::Reset()
{
- if ( m_overlayContext )
+ if ( m_overlayContext)
{
m_overlayContext = NULL ;
}
- {
- m_overlayContext = NULL ;
- }
-
// todo : don't dispose, only hide and reposition on next run
- if (m_overlayWindow)
+ if (m_overlayWindow && [m_overlayWindow isVisible])
...
...
@@ -269,6 +299,8 @@
- [m_overlayWindow release];
- m_overlayWindow = NULL ;
+ NSRect box = [m_overlayWindow frame];
+ box.origin.x = 0;
+ box.origin.y = 0;
+
+ [m_overlayWindow discardCachedImage];
+ [m_overlayWindow cacheImageInRect:box];
...
...
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