</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG_LAYOUTING0;TRACE;DEBUG;__linux__;MEASURE_TIME;DEBUG_LOAD_TIME0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE</DefineConstants>
+ <DefineConstants>DEBUG_LAYOUTING0;TRACE;DEBUG;__linux__;MEASURE_TIME;DEBUG_LOAD_TIME0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
</PropertyGroup>
<!-- <PropertyGroup Condition=" '$(Platform)' == 'Linux_x86' ">
<DefineConstants>__linux__</DefineConstants>
int frameCpt = 0;
int idx = 0;
string[] testFiles = {
+ "testWindow.goml",
"clip4.crow",
"clip3.crow",
"clip2.crow",
"testWindow2.goml",
"testWindow3.goml",
- "testWindow.goml",
"testCheckbox.goml",
"testLabel.goml",
"testAll.goml",
gr.Stroke ();
}
+ gr.Save ();
+ //clip to client zone
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+
if (child != null)
child.Paint (ref gr);
+ gr.Restore ();
}
#endregion
}
{
base.onDraw (gr);
+ gr.Save ();
+ //clip to client zone
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+
foreach (GraphicObject g in children) {
g.Paint (ref gr);
}
+ gr.Restore ();
}
protected override void UpdateCache (Context ctx)
{
Clipping.clearAndClip (gr);
base.onDraw (gr);
+ //clip to client zone
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+
foreach (GraphicObject c in children) {
if (!c.Visible)
continue;
- c.Paint (ref gr);
+ if (Clipping.intersect(c.Slot + ClientRectangle.Position))
+ c.Paint (ref gr);
}
#if DEBUG_CLIP_RECTANGLE
protected override void onDraw (Context gr)
{
base.onDraw (gr);
+
+ gr.Save ();
+ //clip to client zone
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+
if (child != null)
child.Paint (ref gr);
+ gr.Restore ();
}
protected override void UpdateCache (Context ctx)
{
base.onDraw (gr);
+ //clip to client zone
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+
child.Paint (ref gr);
}
}