switch editor-canvas to no-autoclear mode
svn: r12169
This commit is contained in:
parent
e8e94bb82d
commit
ac9944a818
|
@ -183,7 +183,7 @@ wxMediaCanvas::wxMediaCanvas(wxWindow *parent,
|
||||||
+ wxOVERRIDE_KEY_TRANSLATIONS
|
+ wxOVERRIDE_KEY_TRANSLATIONS
|
||||||
+ INIT_SB
|
+ INIT_SB
|
||||||
+ (style & wxINVISIBLE ? wxINVISIBLE : 0)
|
+ (style & wxINVISIBLE ? wxINVISIBLE : 0)
|
||||||
+ (style & wxTRANSPARENT_WIN ? wxTRANSPARENT_WIN : 0)
|
+ (style & wxTRANSPARENT_WIN ? wxTRANSPARENT_WIN : wxNO_AUTOCLEAR)
|
||||||
+ (style & wxCONTROL_BORDER ? wxCONTROL_BORDER : 0)
|
+ (style & wxCONTROL_BORDER ? wxCONTROL_BORDER : 0)
|
||||||
+ (style & wxCOMBO_SIDE ? wxCOMBO_SIDE : 0)
|
+ (style & wxCOMBO_SIDE ? wxCOMBO_SIDE : 0)
|
||||||
+ (style & wxRESIZE_CORNER ? wxRESIZE_CORNER : 0)),
|
+ (style & wxRESIZE_CORNER ? wxRESIZE_CORNER : 0)),
|
||||||
|
@ -352,7 +352,7 @@ void wxMediaCanvas::ResetSize()
|
||||||
ResetVisual(FALSE);
|
ResetVisual(FALSE);
|
||||||
|
|
||||||
#if defined(wx_mac)
|
#if defined(wx_mac)
|
||||||
{
|
if (0) {
|
||||||
wxDC *adc;
|
wxDC *adc;
|
||||||
wxColor *bg;
|
wxColor *bg;
|
||||||
bg = GetCanvasBackground();
|
bg = GetCanvasBackground();
|
||||||
|
@ -824,6 +824,37 @@ void wxMediaCanvas::Redraw(double localx, double localy, double fw, double fh)
|
||||||
|
|
||||||
GetView(&x, &y, &w, &h);
|
GetView(&x, &y, &w, &h);
|
||||||
|
|
||||||
|
/* Clear the margins */
|
||||||
|
if (xmargin || ymargin) {
|
||||||
|
wxDC *adc;
|
||||||
|
wxColor *bg;
|
||||||
|
bg = GetCanvasBackground();
|
||||||
|
if (bg) {
|
||||||
|
wxBrush *b, *ob;
|
||||||
|
wxPen *p, *op;
|
||||||
|
int cw, ch;
|
||||||
|
|
||||||
|
GetClientSize(&cw, &ch);
|
||||||
|
|
||||||
|
b = wxTheBrushList->FindOrCreateBrush(bg, wxSOLID);
|
||||||
|
p = wxThePenList->FindOrCreatePen("BLACK", 0, wxTRANSPARENT);
|
||||||
|
adc = GetDC();
|
||||||
|
|
||||||
|
ob = adc->GetBrush();
|
||||||
|
op = adc->GetPen();
|
||||||
|
adc->SetBrush(b);
|
||||||
|
adc->SetPen(p);
|
||||||
|
|
||||||
|
adc->DrawRectangle(0, 0, xmargin, ch);
|
||||||
|
adc->DrawRectangle(cw-xmargin, 0, cw, ch);
|
||||||
|
adc->DrawRectangle(0, 0, cw, ymargin);
|
||||||
|
adc->DrawRectangle(0, ch-ymargin, cw, ch);
|
||||||
|
|
||||||
|
adc->SetBrush(ob);
|
||||||
|
adc->SetPen(op);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
right = x + w;
|
right = x + w;
|
||||||
bottom = y + h;
|
bottom = y + h;
|
||||||
|
|
||||||
|
|
|
@ -740,6 +740,7 @@ void wxCanvas::DoPaint()
|
||||||
|
|
||||||
DeleteObject(paint_rgn);
|
DeleteObject(paint_rgn);
|
||||||
} else {
|
} else {
|
||||||
|
/* We ignore the clipping region because... it's simpler? */
|
||||||
SetRectRgn(need_update, 0, 0, 0, 0);
|
SetRectRgn(need_update, 0, 0, 0, 0);
|
||||||
if (!(wstyle & wxNO_AUTOCLEAR)) {
|
if (!(wstyle & wxNO_AUTOCLEAR)) {
|
||||||
/* The erase through OnEraseBkgnd() was confine to the clipping
|
/* The erase through OnEraseBkgnd() was confine to the clipping
|
||||||
|
|
Loading…
Reference in New Issue
Block a user