Kaydet (Commit) c8ecf7eb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Atempt at making --enable-gtk3 build again

...post e717d1dc "Resolves: #i121237#
Rework/Cleanup of Region code..."  Note that GktSalGraphics variant for GTK 3
(there is two declarations in vcl/inc/unx/gtk/gtkgdi.hxx) inherits m_aClipRegion
from SvpSalGraphics.

Change-Id: Ic264226bc406f67f20d1893455d85ad0d1bc17ed
üst e94baf5b
...@@ -1450,8 +1450,7 @@ void GtkSalGraphics::getStyleContext(GtkStyleContext** style, GtkWidget* widget) ...@@ -1450,8 +1450,7 @@ void GtkSalGraphics::getStyleContext(GtkStyleContext** style, GtkWidget* widget)
GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
: SvpSalGraphics(), : SvpSalGraphics(),
mpFrame( pFrame ), mpFrame( pFrame ),
mpWindow( pWindow ), mpWindow( pWindow )
m_aClipRegion(true)
{ {
if(style_loaded) if(style_loaded)
return; return;
...@@ -1575,7 +1574,9 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY, ...@@ -1575,7 +1574,9 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY,
// get clip region and translate it in the opposite direction & intersect ... // get clip region and translate it in the opposite direction & intersect ...
cairo_region_t *clip_region; cairo_region_t *clip_region;
if( m_aClipRegion.GetRectCount() <= 0) RectangleVector rects;
m_aClipRegion.GetRegionRectangles(rects);
if (rects.empty())
{ {
basegfx::B2IVector aSize = GetSize(); basegfx::B2IVector aSize = GetSize();
cairo_rectangle_int_t aCairoSize = { 0, 0, aSize.getX(), aSize.getY() }; cairo_rectangle_int_t aCairoSize = { 0, 0, aSize.getX(), aSize.getY() };
...@@ -1584,15 +1585,12 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY, ...@@ -1584,15 +1585,12 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY,
else else
{ {
clip_region = cairo_region_create(); clip_region = cairo_region_create();
Rectangle aClipRect; for (RectangleVector::iterator i(rects.begin()); i != rects.end(); ++i)
RegionHandle aHnd = m_aClipRegion.BeginEnumRects();
while( m_aClipRegion.GetNextEnumRect( aHnd, aClipRect ) )
{ {
cairo_rectangle_int_t aRect = { (int)aClipRect.Left(), (int)aClipRect.Top(), cairo_rectangle_int_t aRect = { (int)i->Left(), (int)i->Top(),
(int)aClipRect.GetWidth(), (int)aClipRect.GetHeight() }; (int)i->GetWidth(), (int)i->GetHeight() };
cairo_region_union_rectangle( clip_region, &aRect ); cairo_region_union_rectangle( clip_region, &aRect );
} }
m_aClipRegion.EndEnumRects (aHnd);
} }
print_cairo_region( clip_region, "pristine clip region" ); print_cairo_region( clip_region, "pristine clip region" );
cairo_region_translate( clip_region, - (nDestX - nSrcX), - (nDestY - nSrcY) ); cairo_region_translate( clip_region, - (nDestX - nSrcX), - (nDestY - nSrcY) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment