Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-07-07 19:29:00 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-07-07 19:29:00 +0400
commit15a2287a8efeed84aa09db9e65dde36d4d1f9d0f (patch)
tree8829dc8c26af9e4129b60f991d5dfc603c02dcdc /source/blender/freestyle/intern/stroke
parentbf6a74e3fc2e9b0f618012afef7aca908b2fa29d (diff)
Fix for incorrect clipping of Freestyle strokes when the viewport preview is used.
Diffstat (limited to 'source/blender/freestyle/intern/stroke')
-rw-r--r--source/blender/freestyle/intern/stroke/Canvas.h1
-rw-r--r--source/blender/freestyle/intern/stroke/ContextFunctions.cpp5
-rw-r--r--source/blender/freestyle/intern/stroke/ContextFunctions.h7
3 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/stroke/Canvas.h b/source/blender/freestyle/intern/stroke/Canvas.h
index 07aa171534a..038b4b3af0f 100644
--- a/source/blender/freestyle/intern/stroke/Canvas.h
+++ b/source/blender/freestyle/intern/stroke/Canvas.h
@@ -195,6 +195,7 @@ public:
virtual int width() const = 0;
virtual int height() const = 0;
+ virtual BBox<Vec2i> border() const = 0;
virtual BBox<Vec3r> scene3DBBox() const = 0;
inline const StrokeRenderer *renderer() const
diff --git a/source/blender/freestyle/intern/stroke/ContextFunctions.cpp b/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
index 42d27a0e5c3..052a6804815 100644
--- a/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
+++ b/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
@@ -51,6 +51,11 @@ unsigned GetCanvasHeightCF()
return Canvas::getInstance()->height();
}
+BBox<Vec2i> GetBorderCF()
+{
+ return Canvas::getInstance()->border();
+}
+
void LoadMapCF(const char *iFileName, const char *iMapName, unsigned iNbLevels, float iSigma)
{
return Canvas::getInstance()->loadMap(iFileName, iMapName, iNbLevels, iSigma);
diff --git a/source/blender/freestyle/intern/stroke/ContextFunctions.h b/source/blender/freestyle/intern/stroke/ContextFunctions.h
index 5c0b88fd412..28ce918e919 100644
--- a/source/blender/freestyle/intern/stroke/ContextFunctions.h
+++ b/source/blender/freestyle/intern/stroke/ContextFunctions.h
@@ -54,10 +54,15 @@ LIB_STROKE_EXPORT
unsigned GetCanvasWidthCF();
// GetCanvasHeight
-/*! Returns the canvas width */
+/*! Returns the canvas height */
LIB_STROKE_EXPORT
unsigned GetCanvasHeightCF();
+// GetBorder
+/*! Returns the border */
+LIB_STROKE_EXPORT
+BBox<Vec2i> GetBorderCF();
+
// Load map
/*! Loads an image map for further reading */
LIB_STROKE_EXPORT