From d8c5da67d8a6957992155eb4a80914497e36e435 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 14 Sep 2008 15:17:14 +0000 Subject: [PATCH] Added support for drawing of \iclip on visual tools, but no button to invert it yet. Originally committed to SVN as r2352. --- aegisub/visual_tool_vector_clip.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aegisub/visual_tool_vector_clip.cpp b/aegisub/visual_tool_vector_clip.cpp index 5e542c088..cb32faaa4 100644 --- a/aegisub/visual_tool_vector_clip.cpp +++ b/aegisub/visual_tool_vector_clip.cpp @@ -123,7 +123,6 @@ void VisualToolVectorClip::Draw() { spline.GetPointList(points,pointCurve); // Draw stencil mask - // FIXME: This should understand inverse clips too glEnable(GL_STENCIL_TEST); glColorMask(0,0,0,0); glStencilFunc(GL_NEVER,1,1); @@ -136,6 +135,11 @@ void VisualToolVectorClip::Draw() { glEnd(); } + // Invert stencil + if (inverse) { + DrawRectangle(0,0,sw,sh); + } + // Draw "outside clip" mask glColorMask(1,1,1,1); glStencilFunc(GL_EQUAL, 0, 1);