From 5f02b167d191969474c8f3575abdd6dbaeffeb57 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Tue, 10 Apr 2012 23:53:46 +0000 Subject: New options for specifying unit line thickness. The Post Processing tab in the Render buttons has new Line Thickness options for defining unit line thickness in two different modes as follows: 1. Absolute mode: The unit line thickness is given by a user-specified number in units of pixels. The default value is 1. 2. Relative mode: The unit line thickness is scaled by the proportion of the present vertical image resolution to 480 pixels. For instance, the unit line thickness is 1 with the image height set to 480, 1.5 with 720, and 2 with 960. --- source/blender/freestyle/intern/application/AppCanvas.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source/blender/freestyle/intern/application/AppCanvas.cpp') diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp index 2895549a79c..ec83d2d9ff8 100755 --- a/source/blender/freestyle/intern/application/AppCanvas.cpp +++ b/source/blender/freestyle/intern/application/AppCanvas.cpp @@ -26,6 +26,7 @@ #include "../stroke/StrokeRenderer.h" #include "AppCanvas.h" #include "AppConfig.h" +#include "../stroke/StyleModule.h" #include "../system/StringUtils.h" @@ -73,6 +74,11 @@ BBox AppCanvas::border() const return _pViewer->border(); } +float AppCanvas::thickness() const +{ + return _pViewer->thickness(); +} + BBox AppCanvas::scene3DBBox() const { return _pViewer->scene3DBBox(); @@ -100,7 +106,12 @@ void AppCanvas::init() void AppCanvas::postDraw() { - Canvas::postDraw(); + for (unsigned i = 0; i < _StyleModules.size(); i++) { + if(!_StyleModules[i]->getDisplayed() || !_Layers[i]) + continue; + _Layers[i]->ScaleThickness(thickness()); + } + Canvas::postDraw(); } void AppCanvas::Erase() -- cgit v1.2.3