|
From: <br...@us...> - 2010-04-28 06:11:26
|
Revision: 4124
http://openvrml.svn.sourceforge.net/openvrml/?rev=4124&view=rev
Author: braden
Date: 2010-04-28 06:11:20 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
Added missing "using" declaration.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/image_stream_listener.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-13 07:46:07 UTC (rev 4123)
+++ trunk/ChangeLog 2010-04-28 06:11:20 UTC (rev 4124)
@@ -1,3 +1,9 @@
+2010-04-28 Braden McDaniel <br...@en...>
+
+ * src/node/vrml97/image_stream_listener.cpp
+ (openvrml_png_info_callback(png_structp, png_infop)): Added
+ missing "using" declaration.
+
2010-04-13 Braden McDaniel <br...@en...>
* src/node/vrml97/image_stream_listener.cpp
Modified: trunk/src/node/vrml97/image_stream_listener.cpp
===================================================================
--- trunk/src/node/vrml97/image_stream_listener.cpp 2010-04-13 07:46:07 UTC (rev 4123)
+++ trunk/src/node/vrml97/image_stream_listener.cpp 2010-04-28 06:11:20 UTC (rev 4124)
@@ -43,6 +43,7 @@
{
using boost::shared_lock;
using boost::shared_mutex;
+ using boost::unique_lock;
typedef openvrml_node_vrml97::image_stream_listener::png_reader
png_reader_t;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-04-28 06:22:39
|
Revision: 4126
http://openvrml.svn.sourceforge.net/openvrml/?rev=4126&view=rev
Author: braden
Date: 2010-04-28 06:22:32 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
Protect openvrml::browser::node_metatype_registry_ with a mutex.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/browser.cpp
trunk/src/libopenvrml/openvrml/browser.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-28 06:13:49 UTC (rev 4125)
+++ trunk/ChangeLog 2010-04-28 06:22:32 UTC (rev 4126)
@@ -1,5 +1,27 @@
2010-04-28 Braden McDaniel <br...@en...>
+ Protect openvrml::browser::node_metatype_registry_ with a mutex.
+
+ * src/libopenvrml/openvrml/browser.h
+ (openvrml::browser): Added node_metatype_registry_mutex_.
+ * src/libopenvrml/openvrml/browser.cpp
+ (openvrml::browser::~browser()): Lock the
+ node_metatype_registry_mutex_.
+ (openvrml::browser::add_node_metatype(const node_metatype_id &,
+ const boost::shared_ptr<openvrml::node_metatype> &)): Lock the
+ node_metatype_registry_mutex_.
+ (openvrml::browser::node_metatype(const node_metatype_id &)
+ const): Lock the node_metatype_registry_mutex_.
+ (openvrml::browser::set_world(resource_istream &)): Lock the
+ node_metatype_registry_mutex_.
+ (openvrml::browser::replace_world(const
+ std::vector<boost::intrusive_ptr<node> > &)): Lock the
+ node_metatype_registry_mutex_.
+ (openvrml::browser::render()): Lock the
+ node_metatype_registry_mutex_.
+
+2010-04-28 Braden McDaniel <br...@en...>
+
* src/node/vrml97/image_stream_listener.cpp
(openvrml_png_info_callback(png_structp, png_infop)): Added
missing "using" declaration.
Modified: trunk/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.cpp 2010-04-28 06:13:49 UTC (rev 4125)
+++ trunk/src/libopenvrml/openvrml/browser.cpp 2010-04-28 06:22:32 UTC (rev 4126)
@@ -1087,6 +1087,22 @@
/**
* @internal
*
+ * @var boost::shared_mutex openvrml::browser::node_metatype_registry_mutex_
+ *
+ * @brief Mutex to protect @c #node_metatype_registry_.
+ */
+
+/**
+ * @internal
+ *
+ * @var boost::scoped_ptr<openvrml::node_metatype_registry> openvrml::browser::node_metatype_registry_
+ *
+ * @brief The @c browser's @c node_type_registry.
+ */
+
+/**
+ * @internal
+ *
* @var std::auto_ptr<openvrml::null_node_metatype> openvrml::browser::null_node_metatype_
*
* @brief “Null” class object for default nodes (e.g.,
@@ -1481,6 +1497,8 @@
shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
if (this->scene_) { this->scene_->shutdown(now); }
+ shared_lock<shared_mutex>
+ node_metatype_registry_lock(this->node_metatype_registry_mutex_);
this->node_metatype_registry_->impl_->shutdown(now);
assert(this->viewpoint_list_.empty());
assert(this->scoped_lights_.empty());
@@ -1511,6 +1529,11 @@
const boost::shared_ptr<openvrml::node_metatype> & metatype)
OPENVRML_THROW2(std::invalid_argument, std::bad_alloc)
{
+ using boost::shared_lock;
+ using boost::shared_mutex;
+
+ shared_lock<shared_mutex>
+ node_metatype_registry_lock(this->node_metatype_registry_mutex_);
this->node_metatype_registry_->impl_->register_node_metatype(id, metatype);
}
@@ -1526,6 +1549,11 @@
openvrml::browser::node_metatype(const node_metatype_id & id) const
OPENVRML_NOTHROW
{
+ using boost::shared_lock;
+ using boost::shared_mutex;
+
+ shared_lock<shared_mutex>
+ node_metatype_registry_lock(this->node_metatype_registry_mutex_);
return this->node_metatype_registry_->impl_->find(id);
}
@@ -1875,7 +1903,9 @@
using boost::upgrade_to_unique_lock;
using local::uri;
- upgrade_lock<shared_mutex> scene_lock(this->scene_mutex_);
+ upgrade_lock<shared_mutex>
+ scene_lock(this->scene_mutex_),
+ node_metatype_registry_lock(this->node_metatype_registry_mutex_);
//
// Clear out the current scene.
@@ -1891,7 +1921,9 @@
browser_event(*this, browser_event::shutdown)));
{
- upgrade_to_unique_lock<shared_mutex> scene_write_lock(scene_lock);
+ upgrade_to_unique_lock<shared_mutex>
+ scene_write_lock(scene_lock),
+ node_metatype_registry_mutex_(node_metatype_registry_lock);
this->scene_.reset();
assert(this->viewpoint_list_.empty());
@@ -1963,7 +1995,9 @@
{
using boost::shared_lock;
using boost::shared_mutex;
- shared_lock<shared_mutex> lock(this->scene_mutex_);
+ shared_lock<shared_mutex>
+ scene_lock(this->scene_mutex_),
+ node_metatype_registry_lock(this->node_metatype_registry_mutex_);
const double now = browser::current_time();
this->scene_->nodes(nodes);
this->scene_->initialize(now);
@@ -2313,6 +2347,7 @@
shared_lock<shared_mutex>
scene_lock(this->scene_mutex_),
+ node_metatype_registry_lock(this->node_metatype_registry_mutex_),
active_viewpoint_lock_(this->active_viewpoint_mutex_);
if (!this->viewer_) { return; }
Modified: trunk/src/libopenvrml/openvrml/browser.h
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.h 2010-04-28 06:13:49 UTC (rev 4125)
+++ trunk/src/libopenvrml/openvrml/browser.h 2010-04-28 06:22:32 UTC (rev 4126)
@@ -216,6 +216,7 @@
std::vector<boost::intrusive_ptr<node> > & nodes,
std::map<std::string, std::string> & meta);
+ mutable boost::shared_mutex node_metatype_registry_mutex_;
boost::scoped_ptr<node_metatype_registry> node_metatype_registry_;
const boost::scoped_ptr<null_node_metatype> null_node_metatype_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-04-28 06:26:38
|
Revision: 4127
http://openvrml.svn.sourceforge.net/openvrml/?rev=4127&view=rev
Author: braden
Date: 2010-04-28 06:26:32 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
Corrected variable name.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/browser.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-28 06:22:32 UTC (rev 4126)
+++ trunk/ChangeLog 2010-04-28 06:26:32 UTC (rev 4127)
@@ -1,5 +1,11 @@
2010-04-28 Braden McDaniel <br...@en...>
+ * src/libopenvrml/openvrml/browser.cpp
+ (openvrml::browser::set_world(resource_istream &)): Corrected
+ variable name.
+
+2010-04-28 Braden McDaniel <br...@en...>
+
Protect openvrml::browser::node_metatype_registry_ with a mutex.
* src/libopenvrml/openvrml/browser.h
Modified: trunk/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.cpp 2010-04-28 06:22:32 UTC (rev 4126)
+++ trunk/src/libopenvrml/openvrml/browser.cpp 2010-04-28 06:26:32 UTC (rev 4127)
@@ -1923,7 +1923,7 @@
{
upgrade_to_unique_lock<shared_mutex>
scene_write_lock(scene_lock),
- node_metatype_registry_mutex_(node_metatype_registry_lock);
+ node_metatype_registry_write_lock_(node_metatype_registry_lock);
this->scene_.reset();
assert(this->viewpoint_list_.empty());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-04-28 16:22:18
|
Revision: 4129
http://openvrml.svn.sourceforge.net/openvrml/?rev=4129&view=rev
Author: braden
Date: 2010-04-28 16:22:11 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
Added missing register_node_metatypes.cpp.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-28 06:27:09 UTC (rev 4128)
+++ trunk/ChangeLog 2010-04-28 16:22:11 UTC (rev 4129)
@@ -1,5 +1,10 @@
2010-04-28 Braden McDaniel <br...@en...>
+ * src/Makefile.am (node_x3d_cad_geometry_la_SOURCES): Added
+ missing register_node_metatypes.cpp.
+
+2010-04-28 Braden McDaniel <br...@en...>
+
* src/libopenvrml/openvrml/browser.cpp
(openvrml::browser::set_world(resource_istream &)): Corrected
variable name.
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2010-04-28 06:27:09 UTC (rev 4128)
+++ trunk/src/Makefile.am 2010-04-28 16:22:11 UTC (rev 4129)
@@ -705,6 +705,7 @@
node_x3d_cad_geometry_la_CXXFLAGS = \
$(PTHREAD_CFLAGS)
node_x3d_cad_geometry_la_SOURCES = \
+ node/x3d-cad-geometry/register_node_metatypes.cpp \
node/x3d-cad-geometry/cad_face.cpp \
node/x3d-cad-geometry/cad_face.h \
node/x3d-cad-geometry/indexed_quad_set.cpp \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-04-29 03:42:14
|
Revision: 4131
http://openvrml.svn.sourceforge.net/openvrml/?rev=4131&view=rev
Author: braden
Date: 2010-04-29 03:42:07 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
Maintain a lock on the load_root_scene_thread_mutex_ instead of letting one go and reacquiring.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/browser.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-28 16:25:15 UTC (rev 4130)
+++ trunk/ChangeLog 2010-04-29 03:42:07 UTC (rev 4131)
@@ -1,5 +1,13 @@
2010-04-28 Braden McDaniel <br...@en...>
+ * src/libopenvrml/openvrml/browser.cpp
+ (openvrml::browser::load_url(const std::vector<std::string> &,
+ const std::vector<std::string> &)): Maintain a lock on the
+ load_root_scene_thread_mutex_ instead of letting one go and
+ reacquiring.
+
+2010-04-28 Braden McDaniel <br...@en...>
+
* src/Makefile.am (node_x3d_cad_geometry_la_SOURCES): Added
missing register_node_metatypes.cpp.
Modified: trunk/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.cpp 2010-04-28 16:25:15 UTC (rev 4130)
+++ trunk/src/libopenvrml/openvrml/browser.cpp 2010-04-29 03:42:07 UTC (rev 4131)
@@ -2077,20 +2077,18 @@
const std::vector<std::string> &)
OPENVRML_THROW2(std::bad_alloc, boost::thread_resource_error)
{
- using boost::unique_lock;
+ using boost::upgrade_lock;
+ using boost::upgrade_to_unique_lock;
using boost::shared_mutex;
- {
- using boost::shared_lock;
- shared_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
- if (this->load_root_scene_thread_) {
- this->load_root_scene_thread_->join();
- }
+ upgrade_lock<shared_mutex> read_lock(this->load_root_scene_thread_mutex_);
+ if (this->load_root_scene_thread_) {
+ this->load_root_scene_thread_->join();
}
boost::function0<void> f = root_scene_loader(*this, url);
- unique_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
+ upgrade_to_unique_lock<shared_mutex> write_lock(read_lock);
this->load_root_scene_thread_.reset(new boost::thread(f));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-02 04:13:03
|
Revision: 4133
http://openvrml.svn.sourceforge.net/openvrml/?rev=4133&view=rev
Author: braden
Date: 2010-05-02 04:12:54 +0000 (Sun, 02 May 2010)
Log Message:
-----------
Refactor some of the Text node rendering logic. Also, apply FT_Done_Glyph (so we shouldn't be leaking those anymore).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-29 03:45:17 UTC (rev 4132)
+++ trunk/ChangeLog 2010-05-02 04:12:54 UTC (rev 4133)
@@ -1,3 +1,54 @@
+2010-05-01 Braden McDaniel <br...@en...>
+
+ Refactor some of the Text node rendering logic. Also, apply
+ FT_Done_Glyph (so we shouldn't be leaking those anymore).
+
+ * src/node/vrml97/text.cpp
+ (text_node::line_geometry): Added class.
+ (text_node::glyph_geometry::glyph_geometry(FT_Face, FT_UInt,
+ float)): Construct glyph_geometry from a FT_Face, the glyph_index,
+ and the desired size. This constructor now does quite a bit of
+ heavy lifting: it loads the FT_Glyph, generates polygons from it,
+ and ultimately unloads it. The latter bit (unloading) is the only
+ real functional change here, as we were neglecting to do that
+ previously (and thus leaking). Previously, this logic lived in
+ text_node::update_geometry.
+ (text_node::glyph_geometry::coord() const): Added accessor to get
+ the coordinates.
+ (text_node::glyph_geometry::coord_index() const): Added accessor
+ to get the coordinate indices.
+ (text_node::glyph_geometry::advance_width() const): Added accessor
+ to get the advance_width.
+ (text_node::glyph_geometry::advance_height() const): Added
+ accessor to get the advance_height.
+ (text_node::line_geometry::line_geometry(bool, bool, bool)):
+ Construct the line_geometry.
+ (text_node::line_geometry::coord() const): Accessor to get the
+ coordinates.
+ (text_node::line_geometry::coord() const): Accessor to get the
+ coordinate indices.
+ (text_node::line_geometry::x_min() const): Accessor to get the
+ minimum x extent.
+ (text_node::line_geometry::x_max() const): Accessor to get the
+ maximum x extent.
+ (text_node::line_geometry::y_min() const): Accessor to get the
+ minimum y extent.
+ (text_node::line_geometry::y_max() const): Accessor to get the
+ maximum y extent.
+ (text_node::line_geometry::polygons() const): Accessor to get the
+ number of polygons.
+ (text_node::line_geometry::add(const glyph_geometry &)): Add
+ geometry for a glyph to the line. Previously, this logic lived in
+ text_node::update_geometry.
+ (text_node::line_geometry::scale(float)): Scale the line geometry
+ to a length.
+ (text_node::~text_node()): Assert that this->face is 0.
+ (text_node::do_shutdown(double)): Set this->face to 0 after it is
+ unloaded.
+ (text_node::update_geometry()): Moved logic to load the FT_Glyph
+ and generate polygons to the glyph_geometry constructor. Moved
+ logic to add glyph geometry to a line to line_geometry::add.
+
2010-04-28 Braden McDaniel <br...@en...>
* src/libopenvrml/openvrml/browser.cpp
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-04-29 03:45:17 UTC (rev 4132)
+++ trunk/src/node/vrml97/text.cpp 2010-05-02 04:12:54 UTC (rev 4133)
@@ -130,18 +130,50 @@
max_extent_exposedfield max_extent_;
openvrml::sfbool solid_;
- struct glyph_geometry {
- std::vector<openvrml::vec2f> coord;
- std::vector<openvrml::int32> coord_index;
- float advance_width;
- float advance_height;
+ class glyph_geometry {
+ std::vector<openvrml::vec2f> coord_;
+ std::vector<openvrml::int32> coord_index_;
+ float advance_width_;
+ float advance_height_;
- glyph_geometry(const std::vector<std::vector<openvrml::vec2f> > & contours,
- float advance_width,
- float advance_height)
+ public:
+ glyph_geometry(FT_Face face, FT_UInt glyph_index, float size)
OPENVRML_THROW1(std::bad_alloc);
+
+ const std::vector<openvrml::vec2f> & coord() const;
+ const std::vector<openvrml::int32> & coord_index() const;
+ float advance_width() const;
+ float advance_height() const;
};
+ class line_geometry {
+ const bool horizontal_;
+ const bool left_to_right_;
+ const bool top_to_bottom_;
+
+ std::vector<openvrml::vec2f> coord_;
+ std::vector<openvrml::int32> coord_index_;
+ float x_min_, x_max_, y_min_, y_max_;
+ std::size_t polygons_;
+ openvrml::vec2f pen_pos_;
+
+ public:
+ line_geometry(bool horizontal,
+ bool left_to_right,
+ bool top_to_bottom);
+
+ const std::vector<openvrml::vec2f> & coord() const;
+ const std::vector<openvrml::int32> & coord_index() const;
+ float x_min() const;
+ float x_max() const;
+ float y_min() const;
+ float y_max() const;
+ std::size_t polygons() const;
+
+ void add(const glyph_geometry & glyph);
+ void scale(float length);
+ };
+
struct text_geometry {
std::vector<openvrml::vec3f> coord;
std::vector<openvrml::int32> coord_index;
@@ -542,26 +574,26 @@
*/
/**
- * @var std::vector<openvrml::vec2f> text_node::glyph_geometry::coord
+ * @var std::vector<openvrml::vec2f> text_node::glyph_geometry::coord_
*
* @brief Glyph coordinates.
*/
/**
- * @var std::vector<openvrml::int32> text_node::glyph_geometry::coord_index
+ * @var std::vector<openvrml::int32> text_node::glyph_geometry::coord_index_
*
* @brief Glyph coordinate indices.
*/
/**
- * @var float text_node::glyph_geometry::advance_width
+ * @var float text_node::glyph_geometry::advance_width_
*
* @brief The distance the pen should advance horizontally after drawing
* the glyph.
*/
/**
- * @var float text_node::glyph_geometry::advance_height
+ * @var float text_node::glyph_geometry::advance_height_
*
* @brief The distance the pen should advance vertically after drawing the
* glyph.
@@ -952,40 +984,503 @@
std::vector<openvrml::vec2f> & coord;
std::vector<openvrml::int32> & coord_index;
};
+
+
+ struct OPENVRML_LOCAL GlyphContours_ {
+ const float scale;
+ std::vector<std::vector<openvrml::vec2f> > contours;
+
+ explicit GlyphContours_(float scale);
+ };
+
+ GlyphContours_::GlyphContours_(const float scale):
+ scale(scale)
+ {}
+
+ const float stepSize_ = 0.2f;
+
+ extern "C" int
+ moveTo_(const FT_Vector * const to,
+ void * const user)
+ {
+ using std::vector;
+ using openvrml::vec2f;
+ using openvrml::make_vec2f;
+
+ assert(user);
+ GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
+ try {
+ c.contours.push_back(vector<vec2f>(1));
+ } catch (std::bad_alloc & ex) {
+ OPENVRML_PRINT_EXCEPTION_(ex);
+ return FT_Err_Out_Of_Memory;
+ }
+ const vec2f vertex = make_vec2f(to->x * c.scale, to->y * c.scale);
+ c.contours.back().front() = vertex;
+ return 0;
+ }
+
+ extern "C" int
+ lineTo_(const FT_Vector * const to,
+ void * const user)
+ {
+ using openvrml::make_vec2f;
+
+ assert(user);
+ GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
+ const openvrml::vec2f vertex = make_vec2f(to->x * c.scale,
+ to->y * c.scale);
+ try {
+ c.contours.back().push_back(vertex);
+ } catch (std::bad_alloc & ex) {
+ OPENVRML_PRINT_EXCEPTION_(ex);
+ return FT_Err_Out_Of_Memory;
+ }
+ return 0;
+ }
+
+ /**
+ * @brief de Casteljau's algorithm.
+ *
+ * This is a nice recursive algorithm defined by de-Casteljau which
+ * calculates for a given control polygon the point that lies on the bezier
+ * curve for any value of t, and can be used to evaluate and draw the
+ * Bezier spline without using the Bernstein polynomials.
+ *
+ * The algorithm advances by creating in each step a polygons of degree one
+ * less than the one created in the previous step until there is only one
+ * point left, which is the point on the curve. The polygon vertices for
+ * each step are defined by linear interpolation of two consecutive
+ * vertices of the polygon from the previous step with a value of t (the
+ * parameter):
+ *
+ * @param buffer an array including the control points for the curve in
+ * the first @p npoints elements. The total size of the
+ * array must be @p npoints * @p npoints. The remaining
+ * elements of the array will be used by the algorithm to
+ * store temporary values.
+ * @param npoints the number of control points.
+ * @param contour the points on the curve are added to this array.
+ *
+ * @exception std::bad_alloc if memory allocation fails.
+ */
+ OPENVRML_LOCAL void evaluateCurve_(openvrml::vec2f * const buffer,
+ const size_t npoints,
+ std::vector<openvrml::vec2f> & contour)
+ OPENVRML_THROW1(std::bad_alloc)
+ {
+ for (size_t i = 1; i <= (1 / stepSize_); i++){
+ const float t = i * stepSize_; // Parametric points 0 <= t <= 1
+ for (size_t j = 1; j < npoints; j++) {
+ for (size_t k = 0; k < (npoints - j); k++) {
+ openvrml::vec2f & element = buffer[j * npoints + k];
+ element.x((1 - t) * buffer[(j - 1) * npoints + k][0]
+ + t * buffer[(j - 1) * npoints + k + 1][0]);
+ element.y((1 - t) * buffer[(j - 1) * npoints + k][1]
+ + t * buffer[(j - 1) * npoints + k + 1][1]);
+ }
+ }
+ //
+ // Specify next vertex to be included on curve
+ //
+ contour.push_back(buffer[(npoints - 1) * npoints]); // throws std::bad_alloc
+ }
+ }
+
+ extern "C" int
+ conicTo_(const FT_Vector * const control,
+ const FT_Vector * const to,
+ void * const user)
+ {
+ using std::vector;
+ using openvrml::vec2f;
+ using openvrml::make_vec2f;
+
+ assert(control);
+ assert(to);
+ assert(user);
+
+ GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
+
+ assert(!c.contours.empty());
+ vector<vec2f> & contour = c.contours.back();
+ const vec2f & lastVertex = contour[contour.size() - 1];
+
+ assert(!contour.empty());
+ const size_t npoints = 3;
+ vec2f buffer[npoints * npoints] = {
+ make_vec2f(lastVertex[0], lastVertex[1]),
+ make_vec2f(control->x * c.scale, control->y * c.scale),
+ make_vec2f(to->x * c.scale, to->y * c.scale)
+ };
+
+ try {
+ evaluateCurve_(buffer, npoints, contour);
+ } catch (std::bad_alloc & ex) {
+ OPENVRML_PRINT_EXCEPTION_(ex);
+ return FT_Err_Out_Of_Memory;
+ }
+ return 0;
+ }
+
+ extern "C" int
+ cubicTo_(const FT_Vector * const control1,
+ const FT_Vector * const control2,
+ const FT_Vector * const to,
+ void * const user)
+ {
+ using std::vector;
+ using openvrml::vec2f;
+ using openvrml::make_vec2f;
+
+ assert(control1);
+ assert(control2);
+ assert(to);
+ assert(user);
+
+ GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
+
+ assert(!c.contours.empty());
+ vector<vec2f> & contour = c.contours.back();
+ assert(!contour.empty());
+ const vec2f & lastVertex = contour.back();
+
+ static const size_t npoints = 4;
+ vec2f buffer[npoints * npoints] = {
+ make_vec2f(lastVertex[0], lastVertex[1]),
+ make_vec2f(control1->x * c.scale, control1->y * c.scale),
+ make_vec2f(control2->x * c.scale, control2->y * c.scale),
+ make_vec2f(to->x * c.scale, to->y * c.scale)
+ };
+
+ try {
+ evaluateCurve_(buffer, npoints, contour);
+ } catch (std::bad_alloc & ex) {
+ OPENVRML_PRINT_EXCEPTION_(ex);
+ return FT_Err_Out_Of_Memory;
+ }
+ return 0;
+ }
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
/**
* @brief Construct from a set of contours.
*
- * @param contours a vector of closed contours that make up the
- * glyph's outline.
- * @param advance_width the distance the pen should advance
- * horizontally after drawing the glyph.
- * @param advance_height the distance the pen should advance vertically
- * after drawing the glyph.
+ * @param[in,out] face a FreeType font face.
+ * @param[in] glyph_index the glyph's index (from <a href="http://freetype.sourceforge.net/freetype2/docs/reference/ft2-base_interface.html#FT_Get_Char_Index">@c FT_Get_Char_Index</a>).
+ * @param[in] size the desired size for the glyph.
*
* @exception std::bad_alloc if memory allocation fails.
*/
text_node::glyph_geometry::
- glyph_geometry(const std::vector<std::vector<openvrml::vec2f> > & contours,
- const float advance_width,
- const float advance_height)
+ glyph_geometry(const FT_Face face,
+ const FT_UInt glyph_index,
+ const float size)
OPENVRML_THROW1(std::bad_alloc):
- advance_width(advance_width),
- advance_height(advance_height)
+ advance_width_(0),
+ advance_height_(0)
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
using std::vector;
- const vector<polygon_> & polygons = get_polygons_(contours);
+ FT_Error error = FT_Err_Ok;
+ error = FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_SCALE);
+ assert(error == FT_Err_Ok);
+ FT_Glyph glyph;
+ error = FT_Get_Glyph(face->glyph, &glyph);
+ assert(error == FT_Err_Ok);
+ BOOST_SCOPE_EXIT((&glyph)) {
+ FT_Done_Glyph(glyph);
+ } BOOST_SCOPE_EXIT_END
+ static FT_Outline_Funcs outlineFuncs = { moveTo_,
+ lineTo_,
+ conicTo_,
+ cubicTo_,
+ 0,
+ 0 };
+ const float glyphScale = (face->bbox.yMax > 0.0)
+ ? size / face->bbox.yMax
+ : size;
+ GlyphContours_ glyphContours(glyphScale);
+ assert(glyph->format == FT_GLYPH_FORMAT_OUTLINE);
+ const FT_OutlineGlyph outlineGlyph =
+ static_cast<FT_OutlineGlyph>(static_cast<void *>(glyph));
+ error = FT_Outline_Decompose(&outlineGlyph->outline,
+ &outlineFuncs,
+ &glyphContours);
+ assert(error == FT_Err_Ok);
+
+ assert(face->glyph);
+ this->advance_width_ =
+ FT_HAS_HORIZONTAL(face)
+ ? face->glyph->metrics.horiAdvance * glyphScale
+ : 0.0f;
+ this->advance_height_ =
+ FT_HAS_VERTICAL(face)
+ ? face->glyph->metrics.vertAdvance * glyphScale
+ : 0.0f;
+
+ const vector<polygon_> & polygons =
+ get_polygons_(glyphContours.contours);
std::for_each(polygons.begin(), polygons.end(),
- draw_glyph_polygon(this->coord, this->coord_index));
+ draw_glyph_polygon(this->coord_, this->coord_index_));
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
/**
+ * @brief The glyph coordinates.
+ *
+ * @return the glyph coordinates.
+ */
+ const std::vector<openvrml::vec2f> &
+ text_node::glyph_geometry::coord() const
+ {
+ return this->coord_;
+ }
+
+ /**
+ * @brief The glyph coordinate indices.
+ *
+ * @return Coordinate indices describing polygons for the glyph.
+ */
+ const std::vector<openvrml::int32> &
+ text_node::glyph_geometry::coord_index() const
+ {
+ return this->coord_index_;
+ }
+
+ /**
+ * @brief The horizontal distance the cursor should advance in order to
+ * accommodate this glyph.
+ *
+ * @return the horizontal distance the cursor should advance in order to
+ * accommodate this glyph.
+ */
+ float text_node::glyph_geometry::advance_width() const
+ {
+ return this->advance_width_;
+ }
+
+ /**
+ * @brief The vertical distance the cursor should advance in order to
+ * accommodate this glyph.
+ *
+ * @return the vertical distance the cursor should advance in order to
+ * accommodate this glyph.
+ */
+ float text_node::glyph_geometry::advance_height() const
+ {
+ return this->advance_height_;
+ }
+
+
+ /**
* @internal
*
+ * @class text_node::line_geometry
+ *
+ * @brief Geometry data for a line of text.
+ */
+
+ /**
+ * @var const bool text_node::line_geometry::horizontal_
+ *
+ * @brief @c true if text should be rendered horizontally; @c false if
+ * text should be rendered vertically.
+ */
+
+ /**
+ * @var const bool text_node::line_geometry::left_to_right_
+ *
+ * @brief @c true if text should be rendered left-to-right; @c false if
+ * text should be rendered right-to-left.
+ */
+
+ /**
+ * @var const bool text_node::line_geometry::top_to_bottom_
+ *
+ * @brief @c true if text should flow from top to bottom; @c false if text
+ * should flow from bottom to top.
+ */
+
+ /**
+ * @var std::vector<openvrml::vec2f> text_node::line_geometry::coord_
+ *
+ * @brief Coordinate data for the line of text.
+ */
+
+ /**
+ * @var std::vector<openvrml::int32> text_node::line_geometry::coord_index_
+ *
+ * @brief Coordinate indices describing polygons.
+ */
+
+ /**
+ * @var float text_node::line_geometry::x_min_
+ *
+ * @brief Minimum <var>x</var> coordinate.
+ */
+
+ /**
+ * @var float text_node::line_geometry::x_max_
+ *
+ * @brief Maximum <var>x</var> coordinate.
+ */
+
+ /**
+ * @var float text_node::line_geometry::y_min_
+ *
+ * @brief Minimum <var>y</var> coordinate.
+ */
+
+ /**
+ * @var float text_node::line_geometry::y_max_
+ *
+ * @brief Maximum <var>y</var> coordinate.
+ */
+
+ /**
+ * @var std::size_t text_node::line_geometry::polygons_
+ *
+ * @brief The number of polygons in the line.
+ */
+
+ /**
+ * @var float text_node::line_geometry::pen_x_
+ *
+ * @brief The “pen” position <var>x</var> coordinate.
+ */
+
+ /**
+ * @var float text_node::line_geometry::pen_y_
+ *
+ * @brief The “pen” position <var>y</var> coordinate.
+ */
+
+ /**
+ * @internal
+ *
+ * @brief Construct.
+ *
+ * @param[in] horizontal @c true if text is being rendered horizontally;
+ * @c false if text is being rendered vertically.
+ * @param[in] left_to_right @c true if text is being rendered left-to-right;
+ * @c false if text is being rendered right-to-
+ * left.
+ * @param[in] top_to_bottom @c true if text is being rendered top-to-bottom;
+ * @c false if text is being rendered bottom-to-
+ * top.
+ */
+ text_node::line_geometry::line_geometry(const bool horizontal,
+ const bool left_to_right,
+ const bool top_to_bottom):
+ horizontal_(horizontal),
+ left_to_right_(left_to_right),
+ top_to_bottom_(top_to_bottom),
+ x_min_(0), x_max_(0), y_min_(0), y_max_(0),
+ polygons_(0),
+ pen_pos_(openvrml::make_vec2f())
+ {}
+
+ const std::vector<openvrml::vec2f> & text_node::line_geometry::coord() const
+ {
+ return this->coord_;
+ }
+
+ const std::vector<openvrml::int32> &
+ text_node::line_geometry::coord_index() const
+ {
+ return this->coord_index_;
+ }
+
+ float text_node::line_geometry::x_min() const
+ {
+ return this->x_min_;
+ }
+
+ float text_node::line_geometry::x_max() const
+ {
+ return this->x_max_;
+ }
+
+ float text_node::line_geometry::y_min() const
+ {
+ return this->y_min_;
+ }
+
+ float text_node::line_geometry::y_max() const
+ {
+ return this->y_max_;
+ }
+
+ std::size_t text_node::line_geometry::polygons() const
+ {
+ return this->polygons_;
+ }
+
+ /**
+ * @internal
+ *
+ * @brief Add geometry for a glyph to the line.
+ *
+ * @param[in] glyph geometry data for a glyph.
+ */
+ void text_node::line_geometry::add(const glyph_geometry & glyph)
+ {
+ using openvrml::vec2f;
+ using std::min;
+ using std::max;
+
+ for (size_t i = 0; i < glyph.coord().size(); ++i) {
+ const vec2f textVertex = glyph.coord()[i] + this->pen_pos_;
+ this->coord_.push_back(textVertex);
+ this->x_min_ = min(this->x_min_, textVertex[0]);
+ this->x_max_ = max(this->x_max_, textVertex[0]);
+ this->y_min_ = min(this->y_min_, textVertex[1]);
+ this->y_max_ = max(this->y_max_, textVertex[1]);
+ }
+
+ for (size_t i = 0; i < glyph.coord_index().size(); ++i) {
+ const long index = glyph.coord_index()[i];
+ if (index > -1) {
+ const size_t offset =
+ this->coord_.size() - glyph.coord().size();
+ this->coord_index_.push_back(
+ static_cast<openvrml::int32>(offset + index));
+ } else {
+ this->coord_index_.push_back(-1);
+ ++this->polygons_;
+ }
+ }
+
+ if (this->horizontal_) {
+ if (this->left_to_right_) {
+ this->pen_pos_.vec[0] += glyph.advance_width();
+ } else {
+ this->pen_pos_.vec[0] -= glyph.advance_width();
+ }
+ } else {
+ if (this->top_to_bottom_) {
+ this->pen_pos_.vec[1] -= glyph.advance_height();
+ } else {
+ this->pen_pos_.vec[1] += glyph.advance_height();
+ }
+ }
+ }
+
+ void text_node::line_geometry::scale(const float length)
+ {
+ const float current_length = this->x_max_ - this->x_min_;
+ const float scale_factor = current_length * length;
+ for (size_t i = 0; i < this->coord_.size(); ++i) {
+ this->coord_[i].vec[0] /= scale_factor;
+ }
+ }
+
+
+ /**
+ * @internal
+ *
* @struct text_node::text_geometry
*
* @brief Holds the text geometry.
@@ -1087,7 +1582,10 @@
* @brief Destroy.
*/
text_node::~text_node() OPENVRML_NOTHROW
- {}
+ {
+ // shutdown sets this->face to 0.
+ assert(this->face == 0);
+ }
/**
* @brief Determine whether the node has been modified.
@@ -1134,8 +1632,7 @@
*
* @exception std::bad_alloc if memory allocation fails.
*/
- void text_node::do_initialize(double)
- OPENVRML_THROW1(std::bad_alloc)
+ void text_node::do_initialize(double) OPENVRML_THROW1(std::bad_alloc)
{
this->update_ucs4();
this->update_face();
@@ -1147,13 +1644,13 @@
*
* @param timestamp the current time.
*/
- void text_node::do_shutdown(double)
- OPENVRML_NOTHROW
+ void text_node::do_shutdown(double) OPENVRML_NOTHROW
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
if (this->face) {
FT_Error ftError = FT_Done_Face(this->face);
assert(ftError == FT_Err_Ok); // Surely this can't fail.
+ this->face = 0;
}
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
@@ -1731,185 +2228,7 @@
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
-# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
- struct OPENVRML_LOCAL GlyphContours_ {
- const float scale;
- std::vector<std::vector<openvrml::vec2f> > contours;
-
- explicit GlyphContours_(float scale);
- };
-
- GlyphContours_::GlyphContours_(const float scale):
- scale(scale)
- {}
-
- const float stepSize_ = 0.2f;
-
- extern "C" int
- moveTo_(const FT_Vector * const to,
- void * const user)
- {
- using std::vector;
- using openvrml::vec2f;
- using openvrml::make_vec2f;
-
- assert(user);
- GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
- try {
- c.contours.push_back(vector<vec2f>(1));
- } catch (std::bad_alloc & ex) {
- OPENVRML_PRINT_EXCEPTION_(ex);
- return FT_Err_Out_Of_Memory;
- }
- const vec2f vertex = make_vec2f(to->x * c.scale, to->y * c.scale);
- c.contours.back().front() = vertex;
- return 0;
- }
-
- extern "C" int
- lineTo_(const FT_Vector * const to,
- void * const user)
- {
- using openvrml::make_vec2f;
-
- assert(user);
- GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
- const openvrml::vec2f vertex = make_vec2f(to->x * c.scale,
- to->y * c.scale);
- try {
- c.contours.back().push_back(vertex);
- } catch (std::bad_alloc & ex) {
- OPENVRML_PRINT_EXCEPTION_(ex);
- return FT_Err_Out_Of_Memory;
- }
- return 0;
- }
-
/**
- * @brief de Casteljau's algorithm.
- *
- * This is a nice recursive algorithm defined by de-Casteljau which
- * calculates for a given control polygon the point that lies on the bezier
- * curve for any value of t, and can be used to evaluate and draw the
- * Bezier spline without using the Bernstein polynomials.
- *
- * The algorithm advances by creating in each step a polygons of degree one
- * less than the one created in the previous step until there is only one
- * point left, which is the point on the curve. The polygon vertices for
- * each step are defined by linear interpolation of two consecutive
- * vertices of the polygon from the previous step with a value of t (the
- * parameter):
- *
- * @param buffer an array including the control points for the curve in
- * the first @p npoints elements. The total size of the
- * array must be @p npoints * @p npoints. The remaining
- * elements of the array will be used by the algorithm to
- * store temporary values.
- * @param npoints the number of control points.
- * @param contour the points on the curve are added to this array.
- *
- * @exception std::bad_alloc if memory allocation fails.
- */
- OPENVRML_LOCAL void evaluateCurve_(openvrml::vec2f * const buffer,
- const size_t npoints,
- std::vector<openvrml::vec2f> & contour)
- OPENVRML_THROW1(std::bad_alloc)
- {
- for (size_t i = 1; i <= (1 / stepSize_); i++){
- const float t = i * stepSize_; // Parametric points 0 <= t <= 1
- for (size_t j = 1; j < npoints; j++) {
- for (size_t k = 0; k < (npoints - j); k++) {
- openvrml::vec2f & element = buffer[j * npoints + k];
- element.x((1 - t) * buffer[(j - 1) * npoints + k][0]
- + t * buffer[(j - 1) * npoints + k + 1][0]);
- element.y((1 - t) * buffer[(j - 1) * npoints + k][1]
- + t * buffer[(j - 1) * npoints + k + 1][1]);
- }
- }
- //
- // Specify next vertex to be included on curve
- //
- contour.push_back(buffer[(npoints - 1) * npoints]); // throws std::bad_alloc
- }
- }
-
- extern "C" int
- conicTo_(const FT_Vector * const control,
- const FT_Vector * const to,
- void * const user)
- {
- using std::vector;
- using openvrml::vec2f;
- using openvrml::make_vec2f;
-
- assert(control);
- assert(to);
- assert(user);
-
- GlyphContours_ & c = *static_cast<GlyphContours_ *>(user);
-
- assert(!c.contours.empty());
- vector<vec2f> & contour = c.contours.back();
- const vec2f & lastVertex = contour[contour.size() - 1];
-
- assert(!contour.empty());
- const size_t npoints = 3;
- vec2f buffer[npoints * npoints] = {
- make_vec2f(lastVertex[0], lastVertex[1]),
- make_vec2f(control->x * c.scale, control->y * c.scale),
- make_vec2f(to->x * c.scale, to->y * c.scale)
- };
-
- try {
- evaluateCurve_(buffer, npoints, contour);
- } catch (std::bad_alloc & ex) {
- OPENVRML_PRINT_EXCEPTION_(ex);
- return FT_Err_Out_Of_Memory;
- }
- return ...
[truncated message content] |
|
From: <br...@us...> - 2010-05-02 22:14:08
|
Revision: 4135
http://openvrml.svn.sourceforge.net/openvrml/?rev=4135&view=rev
Author: braden
Date: 2010-05-02 22:13:59 +0000 (Sun, 02 May 2010)
Log Message:
-----------
Refactor some of the Text node rendering logic. Move logic previously in text_node::update_geometry to members of the text_node::text_geometry class.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-02 04:58:00 UTC (rev 4134)
+++ trunk/ChangeLog 2010-05-02 22:13:59 UTC (rev 4135)
@@ -1,3 +1,43 @@
+2010-05-02 Braden McDaniel <br...@en...>
+
+ Refactor some of the Text node rendering logic. Move logic
+ previously in text_node::update_geometry to members of the
+ text_node::text_geometry class.
+
+ * src/node/vrml97/text.cpp
+ (text_node::text_geometry_): Changed to a boost::scoped_ptr since
+ text_geometry is no longer default-constructible.
+ (text_node::text_geometry::text_geometry(const
+ boost::ptr_vector<line_geometry> &, const std::string &, const
+ std::string &, bool, float, float, float)): Moved the logic to
+ compose the text geometry from the line geometry to here from
+ text_node::update_geometry.
+ (text_node::text_geometry::coord() const): Added accessor to get
+ the coordinates.
+ (text_node::text_geometry::coord_index() const): Added accessor to
+ get the coordinate indices.
+ (text_node::text_geometry::normal() const): Added accessor to get
+ the normals.
+ (text_node::text_geometry::tex_coord() const): Added accessor to
+ get the texture coordinates.
+ (text_node::text_geometry::add(const line_geometry &, const
+ std::string &, bool)): Add a line of text to the text geometry.
+ (text_node::text_geometry::scale(float)): Scale the text geometry
+ according to the maximum allowed extent.
+ (text_node::text_geometry::minor_align(const std::string &, bool,
+ float, float, std::size_t)): Apply the minor alignment to the text
+ geometry.
+ (text_node::text_geometry::generate_normals(std::size_t)):
+ Generate normals for the text geometry.
+ (text_node::text_geometry::generate_tex_coords(float)): Generate
+ texture coordinates for the text geometry.
+ (text_node::do_render_geometry(openvrml::viewer &,
+ openvrml::rendering_context)): Make sure text_geometry_ is not
+ null.
+ (text_node::update_geometry()): Delegate creation of the text
+ geometry to the text_geometry constructor. Assemble all the
+ lines, then create the text_geometry.
+
2010-05-01 Braden McDaniel <br...@en...>
Refactor some of the Text node rendering logic. Also, apply
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-05-02 04:58:00 UTC (rev 4134)
+++ trunk/src/node/vrml97/text.cpp 2010-05-02 22:13:59 UTC (rev 4135)
@@ -44,6 +44,7 @@
# endif
# endif
# include <boost/array.hpp>
+# include <boost/ptr_container/ptr_vector.hpp>
# include <boost/scope_exit.hpp>
# ifdef HAVE_CONFIG_H
@@ -174,13 +175,51 @@
void scale(float length);
};
- struct text_geometry {
- std::vector<openvrml::vec3f> coord;
- std::vector<openvrml::int32> coord_index;
- std::vector<openvrml::vec3f> normal;
- std::vector<openvrml::vec2f> tex_coord;
+ class text_geometry {
+ std::vector<openvrml::vec3f> coord_;
+ std::vector<openvrml::int32> coord_index_;
+ std::vector<openvrml::vec3f> normal_;
+ std::vector<openvrml::vec2f> tex_coord_;
+ float x_min_, x_max_, y_min_, y_max_;
+
+ public:
+ text_geometry(const boost::ptr_vector<line_geometry> & lines,
+ const std::string & major_alignment,
+ const std::string & minor_alignment,
+ bool horizontal,
+ float size,
+ float spacing,
+ float max_extent)
+ OPENVRML_THROW1(std::bad_alloc);
+
+ const std::vector<openvrml::vec3f> & coord() const OPENVRML_NOTHROW;
+ const std::vector<openvrml::int32> & coord_index() const
+ OPENVRML_NOTHROW;
+ const std::vector<openvrml::vec3f> & normal() const
+ OPENVRML_NOTHROW;
+ const std::vector<openvrml::vec2f> & tex_coord() const
+ OPENVRML_NOTHROW;
+
+ private:
+ void add(const line_geometry & line,
+ const std::string & major_alignment,
+ bool horizontal)
+ OPENVRML_THROW1(std::bad_alloc);
+ void scale(float max_extent) OPENVRML_NOTHROW;
+ void minor_align(const std::string & align,
+ bool horizontal,
+ float size,
+ float spacing,
+ std::size_t lines)
+ OPENVRML_NOTHROW;
+ void generate_normals(std::size_t polygons)
+ OPENVRML_THROW1(std::bad_alloc);
+ void generate_tex_coords(float size)
+ OPENVRML_THROW1(std::bad_alloc);
};
+ boost::scoped_ptr<text_geometry> text_geometry_;
+
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
typedef std::vector<std::vector<char32_t> > ucs4_string_t;
typedef std::map<FT_UInt, glyph_geometry> glyph_geometry_map_t;
@@ -189,7 +228,6 @@
FT_Face face;
glyph_geometry_map_t glyph_geometry_map;
# endif
- text_geometry text_geometry_;
public:
text_node(const openvrml::node_type & type,
@@ -1511,6 +1549,263 @@
*/
/**
+ * @brief Construct.
+ *
+ * @param[in] lines geometry data for the lines of text.
+ * @param[in] major_alignment one of @c "FIRST", @c "BEGIN", @c "MIDDLE",
+ * or @c "END".
+ * @param[in] minor_alignment one of @c "FIRST", @c "BEGIN", @c "MIDDLE",
+ * or @c "END".
+ * @param[in] horizontal @c true if text is being rendered
+ * horizontally; @c false if text is being
+ * rendered vertically.
+ * @param[in] size the size of the text.
+ * @param[in] spacing the line spacing.
+ * @param[in] max_extent the maximum allowed extent for the text.
+ *
+ * @exception std::bad_alloc if memory allocation fails.
+ */
+ text_node::text_geometry::
+ text_geometry(const boost::ptr_vector<line_geometry> & lines,
+ const std::string & major_alignment,
+ const std::string & minor_alignment,
+ const bool horizontal,
+ const float size,
+ const float spacing,
+ const float max_extent)
+ OPENVRML_THROW1(std::bad_alloc)
+ {
+ std::size_t polygons = 0;
+ for (boost::ptr_vector<line_geometry>::const_iterator line =
+ lines.begin();
+ line != lines.end();
+ ++line) {
+ this->add(*line, major_alignment, horizontal);
+ polygons += line->polygons();
+ }
+ if (max_extent > 0) { this->scale(max_extent); }
+ this->minor_align(minor_alignment,
+ horizontal,
+ size,
+ spacing,
+ lines.size());
+ this->generate_normals(polygons);
+ this->generate_tex_coords(size);
+ }
+
+ /**
+ * @brief Coordinates for the text geometry.
+ *
+ * @return coordinates for the text geometry.
+ */
+ const std::vector<openvrml::vec3f> & text_node::text_geometry::coord() const
+ OPENVRML_NOTHROW
+ {
+ return this->coord_;
+ }
+
+ /**
+ * @brief Coordinate indices for the text geometry.
+ *
+ * @return coordinate indices for the text geometry.
+ */
+ const std::vector<openvrml::int32> &
+ text_node::text_geometry::coord_index() const OPENVRML_NOTHROW
+ {
+ return this->coord_index_;
+ }
+
+ /**
+ * @brief Normals for the text geometry.
+ *
+ * @return normals for the text geometry.
+ */
+ const std::vector<openvrml::vec3f> &
+ text_node::text_geometry::normal() const OPENVRML_NOTHROW
+ {
+ return this->normal_;
+ }
+
+ /**
+ * @brief Texture coordinates for the text geometry.
+ *
+ * @return texture coordinates for the text geometry.
+ */
+ const std::vector<openvrml::vec2f> &
+ text_node::text_geometry::tex_coord() const OPENVRML_NOTHROW
+ {
+ return this->tex_coord_;
+ }
+
+ /**
+ * @brief Add a line of text.
+ *
+ * @param[in] line geometry for a line of text.
+ * @param[in] major_alignment one of @c "FIRST", @c "BEGIN", @c "MIDDLE",
+ * or @c "END".
+ * @param[in] horizontal @c true if text is being rendered
+ * horizontally; @c false if text is being
+ * rendered vertically.
+ * @param[in] size the size of the text.
+ *
+ * @exception std::bad_alloc if memory allocation fails.
+ */
+ void text_node::text_geometry::add(const line_geometry & line,
+ const std::string & major_alignment,
+ const bool horizontal)
+ OPENVRML_THROW1(std::bad_alloc)
+ {
+ using std::min;
+ using std::max;
+ using openvrml::int32;
+ using openvrml::vec2f;
+ using openvrml::vec3f;
+ using openvrml::make_vec3f;
+
+ //
+ // Add the line to the text geometry. We need to adjust for the major
+ // alignment.
+ //
+ float x_offset = 0.0f, y_offset = 0.0f;
+ //
+ // Offset is 0 for "BEGIN" or "FIRST" (or anything else, in our case).
+ //
+ if (major_alignment == "MIDDLE") {
+ if (horizontal) {
+ x_offset = -((line.x_max() - line.x_min()) / 2.0f);
+ } else {
+ y_offset = (line.y_max() - line.y_min()) / 2.0f;
+ }
+ } else if (major_alignment == "END") {
+ if (horizontal) {
+ x_offset = -(line.x_max() - line.x_min());
+ } else {
+ y_offset = line.y_max() - line.y_min();
+ }
+ }
+ for (size_t i = 0; i < line.coord_index().size(); ++i) {
+ const long index = line.coord_index()[i];
+ if (index > -1) {
+ const vec2f & line_vertex = line.coord()[index];
+ const vec3f text_vertex = make_vec3f(line_vertex.x() + x_offset,
+ line_vertex.y() + y_offset,
+ 0.0f);
+ this->coord_.push_back(text_vertex);
+ this->coord_index_.push_back(
+ static_cast<int32>(this->coord_.size() - 1));
+ this->x_min_ = min(this->x_min_, text_vertex.x());
+ this->x_max_ = max(this->x_max_, text_vertex.x());
+ this->y_min_ = min(this->y_min_, text_vertex.y());
+ this->y_max_ = max(this->y_max_, text_vertex.y());
+ } else {
+ this->coord_index_.push_back(-1);
+ }
+ }
+ }
+
+ /**
+ * @brief Scale the text to the maximum allowed extent.
+ *
+ * @param[in] max_extent the maximum allowed extent.
+ */
+ void text_node::text_geometry::scale(const float max_extent)
+ OPENVRML_NOTHROW
+ {
+ assert(max_extent > 0);
+ const float current_max_extent = this->x_max_ - this->x_min_;
+ if (current_max_extent > max_extent) {
+ for (size_t i = 0; i < this->coord_.size(); ++i) {
+ this->coord_[i].vec[0] /= current_max_extent * max_extent;
+ }
+ }
+ }
+
+ /**
+ * @brief Apply the minor alignment to the text.
+ *
+ * @param[in] align one of @c "FIRST", @c "BEGIN", @c "MIDDLE", or
+ * @c "END".
+ * @param[in] horizontal @c true if text is being rendered horizontally;
+ * @c false if text is being rendered vertically.
+ * @param[in] size the size of the text.
+ * @param[in] spacing the line spacing.
+ * @param[in] lines the number of lines of text.
+ */
+ void text_node::text_geometry::minor_align(const std::string & align,
+ const bool horizontal,
+ const float size,
+ const float spacing,
+ const std::size_t lines)
+ OPENVRML_NOTHROW
+ {
+ using openvrml::vec3f;
+ using openvrml::make_vec3f;
+
+ float x_offset = 0.0f, y_offset = 0.0f;
+ if (align == "FIRST" || align == "") {
+ } else if (align == "BEGIN") {
+ if (horizontal) {
+ y_offset = -(size * spacing);
+ } else {
+ x_offset = 0.0f;
+ }
+ } else if (align == "MIDDLE") {
+ if (horizontal) {
+ y_offset = ((size * spacing * lines) / 2.0f) - (size * spacing);
+ } else {
+ x_offset = ((size * spacing * lines) / 2.0f) - (size * spacing);
+ }
+ } else if (align == "END") {
+ if (horizontal) {
+ y_offset = size * spacing * (lines - 1);
+ } else {
+ x_offset = size * spacing * (lines - 1);
+ }
+ }
+ for (size_t i = 0; i < this->coord_.size(); ++i) {
+ const vec3f & vertex = this->coord_[i];
+ this->coord_[i] = make_vec3f(vertex.x() + x_offset,
+ vertex.y() + y_offset,
+ vertex.z());
+ }
+ }
+
+ /**
+ * @brief Generate normals for the text geometry.
+ *
+ * @param[in] polygons the number of polygons in the text geometry.
+ *
+ * @exception std::bad_alloc if memory allocation fails.
+ */
+ void text_node::text_geometry::generate_normals(const std::size_t polygons)
+ OPENVRML_THROW1(std::bad_alloc)
+ {
+ this->normal_.resize(polygons);
+ std::fill(this->normal_.begin(), this->normal_.end(),
+ openvrml::make_vec3f(0.0, 0.0, 1.0));
+ }
+
+ /**
+ * @brief Generate texture coordinates for the text geometry.
+ *
+ * @param[in] size the size of the text.
+ *
+ * @exception std::bad_alloc if memory allocation fails.
+ */
+ void text_node::text_geometry::generate_tex_coords(const float size)
+ OPENVRML_THROW1(std::bad_alloc)
+ {
+ using openvrml::vec3f;
+ using openvrml::make_vec2f;
+ this->tex_coord_.resize(this->coord_.size());
+ for (std::size_t i = 0; i < this->tex_coord_.size(); ++i) {
+ const vec3f & vertex = this->coord_[i];
+ this->tex_coord_[i] = make_vec2f(vertex.x() / size,
+ vertex.y() / size);
+ }
+ }
+
+ /**
* @typedef text_node::ucs4_string_t
*
* @brief A vector of FcChar32 vectors.
@@ -1610,19 +1905,21 @@
openvrml::rendering_context)
{
using openvrml::int32;
- v.insert_shell(*this,
- openvrml::viewer::mask_ccw,
- this->text_geometry_.coord,
- this->text_geometry_.coord_index,
- std::vector<openvrml::color>(), // color
- std::vector<int32>(), // colorIndex
- this->text_geometry_.normal,
- std::vector<int32>(), // normalIndex
- this->text_geometry_.tex_coord,
- std::vector<int32>()); // texCoordIndex
- if (this->font_style_.sfnode::value()) {
- this->font_style_.sfnode::value()->modified(false);
+ if (this->text_geometry_) {
+ v.insert_shell(*this,
+ openvrml::viewer::mask_ccw,
+ this->text_geometry_->coord(),
+ this->text_geometry_->coord_index(),
+ std::vector<openvrml::color>(), // color
+ std::vector<int32>(), // colorIndex
+ this->text_geometry_->normal(),
+ std::vector<int32>(), // normalIndex
+ this->text_geometry_->tex_coord(),
+ std::vector<int32>()); // texCoordIndex
}
+ if (this->font_style_.value()) {
+ this->font_style_.value()->modified(false);
+ }
}
/**
@@ -2236,9 +2533,12 @@
void text_node::update_geometry() OPENVRML_THROW1(std::bad_alloc)
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
+ using std::auto_ptr;
+ using std::max;
using std::pair;
using std::string;
using std::vector;
+ using boost::ptr_vector;
using openvrml::node_cast;
using openvrml::vec2f;
using openvrml::make_vec2f;
@@ -2268,10 +2568,7 @@
spacing = fontStyle->spacing();
}
- text_geometry newGeometry;
- float geometryXMin = 0.0, geometryXMax = 0.0;
- float geometryYMin = 0.0, geometryYMax = 0.0;
- size_t npolygons = 0;
+ ptr_vector<line_geometry> lines(this->ucs4_string.size());
const ucs4_string_t::const_iterator stringBegin =
this->ucs4_string.begin();
for (ucs4_string_t::const_iterator string = stringBegin;
@@ -2296,7 +2593,9 @@
using openvrml::int32;
- line_geometry line_geom(horizontal, leftToRight, topToBottom);
+ auto_ptr<line_geometry> line_geom(new line_geometry(horizontal,
+ leftToRight,
+ topToBottom));
for (vector<char32_t>::const_iterator character = string->begin();
character != string->end(); ++character) {
assert(this->face);
@@ -2322,146 +2621,28 @@
glyphGeometry = &result.first->second;
}
assert(glyphGeometry);
- line_geom.add(*glyphGeometry);
+ line_geom->add(*glyphGeometry);
}
- npolygons += line_geom.polygons();
-
//
// Scale to length.
//
const float length = (line < this->length_.value().size())
? this->length_.value()[line]
: 0.0f;
- if (length > 0.0) { line_geom.scale(length); }
+ if (length > 0.0f) { line_geom->scale(length); }
- //
- // Add the line to the text geometry. We need to adjust for the
- // major alignment.
- //
- float xOffset = 0.0f, yOffset = 0.0f;
- //
- // Offset is 0 for "BEGIN" or "FIRST" (or anything else, in our
- // case).
- //
- if (justify[0] == "MIDDLE") {
- if (horizontal) {
- xOffset = -((line_geom.x_max() - line_geom.x_min()) / 2.0f);
- } else {
- yOffset = (line_geom.y_max() - line_geom.y_min()) / 2.0f;
- }
- } else if (justify[0] == "END") {
- if (horizontal) {
- xOffset = -(line_geom.x_max() - line_geom.x_min());
- } else {
- yOffset = line_geom.y_max() - line_geom.y_min();
- }
- }
- for (size_t i = 0; i < line_geom.coord_index().size(); ++i) {
- const long index = line_geom.coord_index()[i];
- if (index > -1) {
- const vec2f & lineVertex = line_geom.coord()[index];
- const openvrml::vec3f textVertex =
- openvrml::make_vec3f(lineVertex.x() + xOffset,
- lineVertex.y() + yOffset,
- 0.0f);
- newGeometry.coord.push_back(textVertex);
- newGeometry.coord_index.push_back(
- static_cast<int32>(newGeometry.coord.size() - 1));
- geometryXMin = (geometryXMin < textVertex.x())
- ? geometryXMin
- : textVertex.x();
- geometryXMax = (geometryXMax > textVertex.x())
- ? geometryXMax
- : textVertex.x();
- geometryYMin = (geometryYMin < textVertex.y())
- ? geometryYMin
- : textVertex.y();
- geometryYMax = (geometryYMax > textVertex.y())
- ? geometryYMax
- : textVertex.y();
- } else {
- newGeometry.coord_index.push_back(-1);
- }
- }
+ lines.push_back(line_geom);
}
- //
- // Scale to maxExtent.
- //
- const float maxExtent = (this->max_extent_.value() > 0.0)
- ? this->max_extent_.value()
- : 0.0f;
- if (maxExtent > 0.0) {
- const float currentMaxExtent = geometryXMax - geometryXMin;
- if (currentMaxExtent > maxExtent) {
- for (size_t i = 0; i < newGeometry.coord.size(); ++i) {
- const vec3f & vertex = newGeometry.coord[i];
- const vec3f scaledVertex =
- make_vec3f(vertex.x() / currentMaxExtent * maxExtent,
- vertex.y(),
- vertex.z());
- newGeometry.coord[i] = scaledVertex;
- }
- }
- }
-
- //
- // Adjust for the minor alignment.
- //
- float xOffset = 0.0f, yOffset = 0.0f;
- if (justify[1] == "FIRST" || justify[1] == "") {
- } else if (justify[1] == "BEGIN") {
- if (horizontal) {
- yOffset = -(size * spacing);
- } else {
- xOffset = 0.0f;
- }
- } else if (justify[1] == "MIDDLE") {
- if (horizontal) {
- yOffset = ((size * spacing * this->string_.value().size())
- / 2.0f)
- - (size * spacing);
- } else {
- xOffset = ((size * spacing * this->string_.value().size())
- / 2.0f)
- - (size * spacing);
- }
- } else if (justify[1] == "END") {
- if (horizontal) {
- yOffset = size * spacing * (this->string_.value().size() - 1);
- } else {
- xOffset = size * spacing * (this->string_.value().size() - 1);
- }
- }
- for (size_t i = 0; i < newGeometry.coord.size(); ++i) {
- const vec3f & vertex = newGeometry.coord[i];
- const vec3f adjustedVertex = make_vec3f(vertex.x() + xOffset,
- vertex.y() + yOffset,
- vertex.z());
- newGeometry.coord[i] = adjustedVertex;
- }
-
- //
- // Create the normals.
- //
- newGeometry.normal.resize(npolygons); // Throws std::bad_alloc.
- for (size_t i = 0; i < newGeometry.normal.size(); ++i) {
- static const vec3f normal = make_vec3f(0.0, 0.0, 1.0);
- newGeometry.normal[i] = normal;
- }
-
- //
- // Create the texture coordinates.
- //
- newGeometry.tex_coord.resize(newGeometry.coord.size()); // std::bad_alloc
- for (size_t i = 0; i < newGeometry.tex_coord.size(); ++i) {
- const vec3f & vertex = newGeometry.coord[i];
- newGeometry.tex_coord[i] = make_vec2f(vertex.x() / size,
- vertex.y() / size);
- }
-
- this->text_geometry_ = newGeometry;
+ const float max_extent = max(this->max_extent_.value(), 0.0f);
+ this->text_geometry_.reset(new text_geometry(lines,
+ justify[0],
+ justify[1],
+ horizontal,
+ size,
+ spacing,
+ max_extent));
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-02 23:59:46
|
Revision: 4137
http://openvrml.svn.sourceforge.net/openvrml/?rev=4137&view=rev
Author: braden
Date: 2010-05-02 23:59:40 +0000 (Sun, 02 May 2010)
Log Message:
-----------
Delegate the logic to get the pen start position to a helper function; pass the start position to the line_geometry constructor.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-02 22:18:48 UTC (rev 4136)
+++ trunk/ChangeLog 2010-05-02 23:59:40 UTC (rev 4137)
@@ -1,5 +1,22 @@
2010-05-02 Braden McDaniel <br...@en...>
+ Delegate the logic to get the pen start position to a helper
+ function; pass the start position to the line_geometry
+ constructor.
+
+ * src/node/vrml97/text.cpp
+ (text_node::line_geometry::line_geometry(bool, bool, bool, const
+ openvrml::vec2f &)): Get the pen start position from the calling
+ context.
+ (get_pen_start_for_line(std::size_t, float, float, bool, bool,
+ bool)): Factored logic to determine the starting position for the
+ "pen" on a line from text_node::update_geometry.
+ (text_node::update_geometry()): Call get_pen_start_for_line to get
+ the pen start position for a line; pass this to the line_geometry
+ constructor.
+
+2010-05-02 Braden McDaniel <br...@en...>
+
Refactor some of the Text node rendering logic. Move logic
previously in text_node::update_geometry to members of the
text_node::text_geometry class.
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-05-02 22:18:48 UTC (rev 4136)
+++ trunk/src/node/vrml97/text.cpp 2010-05-02 23:59:40 UTC (rev 4137)
@@ -161,7 +161,8 @@
public:
line_geometry(bool horizontal,
bool left_to_right,
- bool top_to_bottom);
+ bool top_to_bottom,
+ const openvrml::vec2f & pen_start);
const std::vector<openvrml::vec2f> & coord() const;
const std::vector<openvrml::int32> & coord_index() const;
@@ -1408,16 +1409,18 @@
* @param[in] top_to_bottom @c true if text is being rendered top-to-bottom;
* @c false if text is being rendered bottom-to-
* top.
+ * @param[in] pen_start starting position for the "pen".
*/
text_node::line_geometry::line_geometry(const bool horizontal,
const bool left_to_right,
- const bool top_to_bottom):
+ const bool top_to_bottom,
+ const openvrml::vec2f & pen_start):
horizontal_(horizontal),
left_to_right_(left_to_right),
top_to_bottom_(top_to_bottom),
x_min_(0), x_max_(0), y_min_(0), y_max_(0),
polygons_(0),
- pen_pos_(openvrml::make_vec2f())
+ pen_pos_(pen_start)
{}
const std::vector<openvrml::vec2f> & text_node::line_geometry::coord() const
@@ -2525,6 +2528,24 @@
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
+ const openvrml::vec2f get_pen_start_for_line(const std::size_t line_num,
+ const float size,
+ const float spacing,
+ const bool horizontal,
+ const bool left_to_right,
+ const bool top_to_bottom)
+ {
+ const float line_advance = size * spacing * line_num;
+
+ openvrml::vec2f pen_pos = openvrml::make_vec2f();
+ if (horizontal) {
+ pen_pos.y(top_to_bottom ? -line_advance : line_advance);
+ } else {
+ pen_pos.x(left_to_right ? line_advance : -line_advance);
+ }
+ return pen_pos;
+ }
+
/**
* @brief Called to update @a text_geometry.
*
@@ -2574,28 +2595,20 @@
for (ucs4_string_t::const_iterator string = stringBegin;
string != this->ucs4_string.end();
++string) {
- float penPos[2] = { 0.0, 0.0 };
const size_t line = std::distance(stringBegin, string);
- const float lineAdvance = size * spacing * line;
- if (horizontal) {
- if (topToBottom) {
- penPos[1] -= lineAdvance;
- } else {
- penPos[1] += lineAdvance;
- }
- } else {
- if (leftToRight) {
- penPos[0] += lineAdvance;
- } else {
- penPos[0] -= lineAdvance;
- }
- }
+ const vec2f pen_start = get_pen_start_for_line(line,
+ size,
+ spacing,
+ horizontal,
+ leftToRight,
+ topToBottom);
using openvrml::int32;
auto_ptr<line_geometry> line_geom(new line_geometry(horizontal,
leftToRight,
- topToBottom));
+ topToBottom,
+ pen_start));
for (vector<char32_t>::const_iterator character = string->begin();
character != string->end(); ++character) {
assert(this->face);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-03 01:58:16
|
Revision: 4139
http://openvrml.svn.sourceforge.net/openvrml/?rev=4139&view=rev
Author: braden
Date: 2010-05-03 01:58:09 +0000 (Mon, 03 May 2010)
Log Message:
-----------
Added exception specifications for text_node::glyph_geometry and text_node::line_geometry member functions.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-03 00:02:17 UTC (rev 4138)
+++ trunk/ChangeLog 2010-05-03 01:58:09 UTC (rev 4139)
@@ -1,5 +1,34 @@
2010-05-02 Braden McDaniel <br...@en...>
+ Added exception specifications for text_node::glyph_geometry and
+ text_node::line_geometry member functions.
+
+ * src/node/vrml97/text.cpp
+ (text_node::glyph_geometry::coord() const): Added
+ OPENVRML_NOTHROW.
+ (text_node::glyph_geometry::coord_index() const): Added
+ OPENVRML_NOTHROW.
+ (text_node::glyph_geometry::advance_width() const): Added
+ OPENVRML_NOTHROW.
+ (text_node::glyph_geometry::advance_height() const): Added
+ OPENVRML_NOTHROW.
+ (text_node::line_geometry::line_geometry(bool, bool, bool, const
+ openvrml::vec2f &)): Added OPENVRML_NOTHROW.
+ (text_node::line_geometry::coord() const): Added OPENVRML_NOTHROW.
+ (text_node::line_geometry::coord_index() const): Added
+ OPENVRML_NOTHROW.
+ (text_node::line_geometry::x_min() const): Added OPENVRML_NOTHROW.
+ (text_node::line_geometry::x_max() const): Added OPENVRML_NOTHROW.
+ (text_node::line_geometry::y_min() const): Added OPENVRML_NOTHROW.
+ (text_node::line_geometry::y_max() const): Added OPENVRML_NOTHROW.
+ (text_node::line_geometry::polygons() const): Added
+ OPENVRML_NOTHROW.
+ (text_node::line_geometry::add(const glyph_geometry &)): Throws
+ std::bad_alloc.
+ (text_node::line_geometry::scale(float)): Added OPENVRML_NOTHROW.
+
+2010-05-02 Braden McDaniel <br...@en...>
+
Delegate the logic to get the pen start position to a helper
function; pass the start position to the line_geometry
constructor.
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-05-03 00:02:17 UTC (rev 4138)
+++ trunk/src/node/vrml97/text.cpp 2010-05-03 01:58:09 UTC (rev 4139)
@@ -99,7 +99,8 @@
class length_exposedfield : public exposedfield<openvrml::mffloat> {
public:
explicit length_exposedfield(text_node & node);
- length_exposedfield(const length_exposedfield & obj) OPENVRML_NOTHROW;
+ length_exposedfield(const length_exposedfield & obj)
+ OPENVRML_NOTHROW;
virtual ~length_exposedfield() OPENVRML_NOTHROW;
private:
@@ -141,10 +142,11 @@
glyph_geometry(FT_Face face, FT_UInt glyph_index, float size)
OPENVRML_THROW1(std::bad_alloc);
- const std::vector<openvrml::vec2f> & coord() const;
- const std::vector<openvrml::int32> & coord_index() const;
- float advance_width() const;
- float advance_height() const;
+ const std::vector<openvrml::vec2f> & coord() const OPENVRML_NOTHROW;
+ const std::vector<openvrml::int32> & coord_index() const
+ OPENVRML_NOTHROW;
+ float advance_width() const OPENVRML_NOTHROW;
+ float advance_height() const OPENVRML_NOTHROW;
};
class line_geometry {
@@ -162,18 +164,22 @@
line_geometry(bool horizontal,
bool left_to_right,
bool top_to_bottom,
- const openvrml::vec2f & pen_start);
+ const openvrml::vec2f & pen_start)
+ OPENVRML_NOTHROW;
- const std::vector<openvrml::vec2f> & coord() const;
- const std::vector<openvrml::int32> & coord_index() const;
- float x_min() const;
- float x_max() const;
- float y_min() const;
- float y_max() const;
- std::size_t polygons() const;
+ const std::vector<openvrml::vec2f> & coord() const
+ OPENVRML_NOTHROW;
+ const std::vector<openvrml::int32> & coord_index() const
+ OPENVRML_NOTHROW;
+ float x_min() const OPENVRML_NOTHROW;
+ float x_max() const OPENVRML_NOTHROW;
+ float y_min() const OPENVRML_NOTHROW;
+ float y_max() const OPENVRML_NOTHROW;
+ std::size_t polygons() const OPENVRML_NOTHROW;
- void add(const glyph_geometry & glyph);
- void scale(float length);
+ void add(const glyph_geometry & glyph)
+ OPENVRML_THROW1(std::bad_alloc);
+ void scale(float length) OPENVRML_NOTHROW;
};
class text_geometry {
@@ -359,7 +365,8 @@
text_node::font_style_exposedfield::
font_style_exposedfield(text_node & node):
openvrml::node_event_listener(node),
- openvrml::event_emitter(static_cast<const openvrml::field_value &>(*this)),
+ openvrml::event_emitter(
+ static_cast<const openvrml::field_value &>(*this)),
sfnode_listener(node),
exposedfield<openvrml::sfnode>(node)
{}
@@ -370,10 +377,13 @@
* @param obj instance to copy.
*/
text_node::font_style_exposedfield::
- font_style_exposedfield(const font_style_exposedfield & obj) OPENVRML_NOTHROW:
+ font_style_exposedfield(const font_style_exposedfield & obj)
+ OPENVRML_NOTHROW:
openvrml::event_listener(),
- openvrml::node_event_listener(obj.openvrml::node_event_listener::node()),
- openvrml::event_emitter(static_cast<const openvrml::field_value &>(*this)),
+ openvrml::node_event_listener(
+ obj.openvrml::node_event_listener::node()),
+ openvrml::event_emitter(
+ static_cast<const openvrml::field_value &>(*this)),
sfnode_listener(obj.openvrml::node_event_listener::node()),
exposedfield<openvrml::sfnode>(obj)
{}
@@ -381,7 +391,8 @@
/**
* @brief Destroy.
*/
- text_node::font_style_exposedfield::~font_style_exposedfield() OPENVRML_NOTHROW
+ text_node::font_style_exposedfield::~font_style_exposedfield()
+ OPENVRML_NOTHROW
{}
/**
@@ -438,7 +449,8 @@
text_node::length_exposedfield::
length_exposedfield(text_node & node):
openvrml::node_event_listener(node),
- openvrml::event_emitter(static_cast<const openvrml::field_value &>(*this)),
+ openvrml::event_emitter(
+ static_cast<const openvrml::field_value &>(*this)),
mffloat_listener(node),
exposedfield<openvrml::mffloat>(node)
{}
@@ -451,8 +463,10 @@
text_node::length_exposedfield::
length_exposedfield(const length_exposedfield & obj) OPENVRML_NOTHROW:
openvrml::event_listener(),
- openvrml::node_event_listener(obj.openvrml::node_event_listener::node()),
- openvrml::event_emitter(static_cast<const openvrml::field_value &>(*this)),
+ openvrml::node_event_listener(
+ obj.openvrml::node_event_listener::node()),
+ openvrml::event_emitter(
+ static_cast<const openvrml::field_value &>(*this)),
mffloat_listener(obj.openvrml::node_event_listener::node()),
exposedfield<openvrml::mffloat>(obj)
{}
@@ -517,7 +531,8 @@
text_node::max_extent_exposedfield::
max_extent_exposedfield(text_node & node):
openvrml::node_event_listener(node),
- openvrml::event_emitter(static_cast<const openvrml::field_value &>(*this)),
+ openvrml::event_emitter(
+ static_cast<const openvrml::field_value &>(*this)),
sffloat_listener(node),
exposedfield<openvrml::sffloat>(node)
{}
@@ -528,10 +543,13 @@
* @param obj instance to copy.
*/
text_node::max_extent_exposedfield::
- max_extent_exposedfield(const max_extent_exposedfield & obj) OPENVRML_NOTHROW:
+ max_extent_exposedfield(const max_extent_exposedfield & obj)
+ OPENVRML_NOTHROW:
openvrml::event_listener(),
- openvrml::node_event_listener(obj.openvrml::node_event_listener::node()),
- openvrml::event_emitter(static_cast<const openvrml::field_value &>(*this)),
+ openvrml::node_event_listener(
+ obj.openvrml::node_event_listener::node()),
+ openvrml::event_emitter(
+ static_cast<const openvrml::field_value &>(*this)),
sffloat_listener(obj.openvrml::node_event_listener::node()),
exposedfield<openvrml::sffloat>(obj)
{}
@@ -982,12 +1000,14 @@
// contour, and maps to a pointer to the interior contour whose
// first vertex is closest to the exterior vertex.
//
- std::auto_ptr<connection_map_t> connection_map(get_connection_map(p));
+ std::auto_ptr<connection_map_t>
+ connection_map(get_connection_map(p));
assert(!p.exterior->empty());
for (size_t i = 0; i < p.exterior->size(); ++i) {
const vec2f & exterior_vertex = (*p.exterior)[i];
- long exterior_index = get_vertex_index_(this->coord, exterior_vertex);
+ long exterior_index = get_vertex_index_(this->coord,
+ exterior_vertex);
if (exterior_index > -1) {
this->coord_index.push_back(exterior_index);
} else {
@@ -1009,7 +1029,8 @@
using openvrml::int32;
this->coord.push_back(interior_vertex);
assert(!this->coord.empty());
- this->coord_index.push_back(int32(this->coord.size() - 1));
+ this->coord_index.push_back(
+ static_cast<int32>(this->coord.size() - 1));
}
}
this->coord_index.push_back(exterior_index);
@@ -1082,14 +1103,14 @@
* @brief de Casteljau's algorithm.
*
* This is a nice recursive algorithm defined by de-Casteljau which
- * calculates for a given control polygon the point that lies on the bezier
- * curve for any value of t, and can be used to evaluate and draw the
- * Bezier spline without using the Bernstein polynomials.
+ * calculates for a given control polygon the point that lies on the
+ * bezier curve for any value of t, and can be used to evaluate and draw
+ * the Bezier spline without using the Bernstein polynomials.
*
- * The algorithm advances by creating in each step a polygons of degree one
- * less than the one created in the previous step until there is only one
- * point left, which is the point on the curve. The polygon vertices for
- * each step are defined by linear interpolation of two consecutive
+ * The algorithm advances by creating in each step a polygons of degree
+ * one less than the one created in the previous step until there is only
+ * one point left, which is the point on the curve. The polygon vertices
+ * for each step are defined by linear interpolation of two consecutive
* vertices of the polygon from the previous step with a value of t (the
* parameter):
*
@@ -1272,7 +1293,7 @@
* @return the glyph coordinates.
*/
const std::vector<openvrml::vec2f> &
- text_node::glyph_geometry::coord() const
+ text_node::glyph_geometry::coord() const OPENVRML_NOTHROW
{
return this->coord_;
}
@@ -1283,7 +1304,7 @@
* @return Coordinate indices describing polygons for the glyph.
*/
const std::vector<openvrml::int32> &
- text_node::glyph_geometry::coord_index() const
+ text_node::glyph_geometry::coord_index() const OPENVRML_NOTHROW
{
return this->coord_index_;
}
@@ -1295,7 +1316,7 @@
* @return the horizontal distance the cursor should advance in order to
* accommodate this glyph.
*/
- float text_node::glyph_geometry::advance_width() const
+ float text_node::glyph_geometry::advance_width() const OPENVRML_NOTHROW
{
return this->advance_width_;
}
@@ -1307,7 +1328,7 @@
* @return the vertical distance the cursor should advance in order to
* accommodate this glyph.
*/
- float text_node::glyph_geometry::advance_height() const
+ float text_node::glyph_geometry::advance_height() const OPENVRML_NOTHROW
{
return this->advance_height_;
}
@@ -1385,20 +1406,12 @@
*/
/**
- * @var float text_node::line_geometry::pen_x_
+ * @var float text_node::line_geometry::pen_pos_
*
- * @brief The “pen” position <var>x</var> coordinate.
+ * @brief The “pen” position.
*/
/**
- * @var float text_node::line_geometry::pen_y_
- *
- * @brief The “pen” position <var>y</var> coordinate.
- */
-
- /**
- * @internal
- *
* @brief Construct.
*
* @param[in] horizontal @c true if text is being rendered horizontally;
@@ -1414,7 +1427,8 @@
text_node::line_geometry::line_geometry(const bool horizontal,
const bool left_to_right,
const bool top_to_bottom,
- const openvrml::vec2f & pen_start):
+ const openvrml::vec2f & pen_start)
+ OPENVRML_NOTHROW:
horizontal_(horizontal),
left_to_right_(left_to_right),
top_to_bottom_(top_to_bottom),
@@ -1423,50 +1437,87 @@
pen_pos_(pen_start)
{}
+ /**
+ * @brief The line geometry coordinates.
+ *
+ * @return the line geometry coordinates.
+ */
const std::vector<openvrml::vec2f> & text_node::line_geometry::coord() const
+ OPENVRML_NOTHROW
{
return this->coord_;
}
+ /**
+ * @brief The line geometry coordinate indices.
+ *
+ * @return the line geometry coordinate indices.
+ */
const std::vector<openvrml::int32> &
- text_node::line_geometry::coord_index() const
+ text_node::line_geometry::coord_index() const OPENVRML_NOTHROW
{
return this->coord_index_;
}
- float text_node::line_geometry::x_min() const
+ /**
+ * @brief The minimum <var>x</var> extent.
+ *
+ * @return the minimum <var>x</var> extent>
+ */
+ float text_node::line_geometry::x_min() const OPENVRML_NOTHROW
{
return this->x_min_;
}
- float text_node::line_geometry::x_max() const
+ /**
+ * @brief The maximum <var>x</var> extent.
+ *
+ * @return the maximum <var>x</var> extent>
+ */
+ float text_node::line_geometry::x_max() const OPENVRML_NOTHROW
{
return this->x_max_;
}
- float text_node::line_geometry::y_min() const
+ /**
+ * @brief The minimum <var>y</var> extent.
+ *
+ * @return the minimum <var>y</var> extent>
+ */
+ float text_node::line_geometry::y_min() const OPENVRML_NOTHROW
{
return this->y_min_;
}
- float text_node::line_geometry::y_max() const
+ /**
+ * @brief The maximum <var>y</var> extent.
+ *
+ * @return the maximum <var>y</var> extent>
+ */
+ float text_node::line_geometry::y_max() const OPENVRML_NOTHROW
{
return this->y_max_;
}
- std::size_t text_node::line_geometry::polygons() const
+ /**
+ * @brief The number of polygons in the line geometry.
+ *
+ * @return the number of polygons in the line geometry.
+ */
+ std::size_t text_node::line_geometry::polygons() const OPENVRML_NOTHROW
{
return this->polygons_;
}
/**
- * @internal
- *
* @brief Add geometry for a glyph to the line.
*
* @param[in] glyph geometry data for a glyph.
+ *
+ * @exception std::bad_alloc if memory allocation fails.
*/
void text_node::line_geometry::add(const glyph_geometry & glyph)
+ OPENVRML_THROW1(std::bad_alloc)
{
using openvrml::vec2f;
using std::min;
@@ -1509,7 +1560,7 @@
}
}
- void text_node::line_geometry::scale(const float length)
+ void text_node::line_geometry::scale(const float length) OPENVRML_NOTHROW
{
const float current_length = this->x_max_ - this->x_min_;
const float scale_factor = current_length * length;
@@ -1528,30 +1579,54 @@
*/
/**
- * @var std::vector<openvrml::vec3f> text_node::text_geometry::coord
+ * @var std::vector<openvrml::vec3f> text_node::text_geometry::coord_
*
* @brief Text geometry coordinates.
*/
/**
- * @var std::vector<openvrml::int32> text_node::text_geometry::coord_index
+ * @var std::vector<openvrml::int32> text_node::text_geometry::coord_index_
*
* @brief Text geometry coordinate indices.
*/
/**
- * @var std::vector<openvrml::vec3f> text_node::text_geometry::normal
+ * @var std::vector<openvrml::vec3f> text_node::text_geometry::normal_
*
* @brief Text geometry normals.
*/
/**
- * @var std::vector<openvrml::vec2f> text_node::text_geometry::tex_coord
+ * @var std::vector<openvrml::vec2f> text_node::text_geometry::tex_coord_
*
* @brief Text geometry texture coordinates.
*/
/**
+ * @var float text_node::text_geometry::x_min_
+ *
+ * @brief Minimum <var>x</var> extent.
+ */
+
+ /**
+ * @var float text_node::text_geometry::x_max_
+ *
+ * @brief Maximum <var>x</var> extent.
+ */
+
+ /**
+ * @var float text_node::text_geometry::y_min_
+ *
+ * @brief Minimum <var>y</var> extent.
+ */
+
+ /**
+ * @var float text_node::text_geometry::y_max_
+ *
+ * @brief Maximum <var>y</var> extent.
+ */
+
+ /**
* @brief Construct.
*
* @param[in] lines geometry data for the lines of text.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-03 03:50:29
|
Revision: 4141
http://openvrml.svn.sourceforge.net/openvrml/?rev=4141&view=rev
Author: braden
Date: 2010-05-03 03:50:23 +0000 (Mon, 03 May 2010)
Log Message:
-----------
fcfreetype.h is C++-safe in fontconfig >= 2.3.0. It should be safe to require at least that version.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-03 02:00:42 UTC (rev 4140)
+++ trunk/ChangeLog 2010-05-03 03:50:23 UTC (rev 4141)
@@ -1,5 +1,14 @@
2010-05-02 Braden McDaniel <br...@en...>
+ fcfreetype.h is C++-safe in fontconfig >= 2.3.0. It should be
+ safe to require at least that version.
+
+ * configure.ac: Require fontconfig >= 2.3.0.
+ * src/node/vrml97/text.cpp: Don't need to wrap fcfreetype.h in
+ 'extern "C"' anymore.
+
+2010-05-02 Braden McDaniel <br...@en...>
+
Added exception specifications for text_node::glyph_geometry and
text_node::line_geometry member functions.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-05-03 02:00:42 UTC (rev 4140)
+++ trunk/configure.ac 2010-05-03 03:50:23 UTC (rev 4141)
@@ -127,7 +127,10 @@
[AC_MSG_FAILURE([libxml not found])])
PKG_CHECK_MODULES([PNG], [libpng], , [have_libpng=no])
-PKG_CHECK_MODULES([FONTCONFIG], [fontconfig], , [have_fontconfig=no])
+#
+# fcfreetype.h is C++-safe in fontconfig >= 2.3.0.
+#
+PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.3.0], , [have_fontconfig=no])
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 2.2], , [have_freetype=no])
have_libmozjs=yes
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-05-03 02:00:42 UTC (rev 4140)
+++ trunk/src/node/vrml97/text.cpp 2010-05-03 03:50:23 UTC (rev 4141)
@@ -38,9 +38,7 @@
# undef interface
# else
# include <fontconfig/fontconfig.h>
-extern "C" {
# include <fontconfig/fcfreetype.h>
-}
# endif
# endif
# include <boost/array.hpp>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-21 09:05:35
|
Revision: 4143
http://openvrml.svn.sourceforge.net/openvrml/?rev=4143&view=rev
Author: braden
Date: 2010-05-21 09:05:28 +0000 (Fri, 21 May 2010)
Log Message:
-----------
We're expanding the pixels that libpng reads to full RGBA quartets; so when reading pixels, the new_row and old_row buffers must be sized accordingly. This fixes a memory corruption issue.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/image_stream_listener.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-03 03:53:16 UTC (rev 4142)
+++ trunk/ChangeLog 2010-05-21 09:05:28 UTC (rev 4143)
@@ -1,3 +1,16 @@
+2010-05-21 Braden McDaniel <br...@en...>
+
+ We're expanding the pixels that libpng reads to full RGBA
+ quartets; so when reading pixels, the new_row and old_row buffers
+ must be sized accordingly. This fixes a memory corruption issue.
+
+ * src/node/vrml97/image_stream_listener.cpp
+ (openvrml_png_info_callback(png_structp, png_infop)): Use
+ png_ptr->rowbytes to size the old_row buffer.
+ (openvrml_png_row_callback(png_structp, png_bytep, png_uint_32,
+ int)): Use png_ptr->rowbytes to get the size of the buffer that
+ libpng is using.
+
2010-05-02 Braden McDaniel <br...@en...>
fcfreetype.h is C++-safe in fontconfig >= 2.3.0. It should be
Modified: trunk/src/node/vrml97/image_stream_listener.cpp
===================================================================
--- trunk/src/node/vrml97/image_stream_listener.cpp 2010-05-03 03:53:16 UTC (rev 4142)
+++ trunk/src/node/vrml97/image_stream_listener.cpp 2010-05-21 09:05:28 UTC (rev 4143)
@@ -41,7 +41,6 @@
# ifdef OPENVRML_ENABLE_PNG_TEXTURES
void openvrml_png_info_callback(png_structp png_ptr, png_infop info_ptr)
{
- using boost::shared_lock;
using boost::shared_mutex;
using boost::unique_lock;
@@ -78,18 +77,18 @@
if (color_type == PNG_COLOR_TYPE_PALETTE) {
png_set_expand(png_ptr);
image.comp(3);
+ } else {
+ //
+ // Expand grayscale images to the full 8 bits from 1, 2, or
+ // 4 bits/pixel.
+ //
+ const png_byte bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
+ png_set_expand(png_ptr);
+ }
}
//
- // Expand grayscale images to the full 8 bits from 1, 2, or
- // 4 bits/pixel.
- //
- const png_byte bit_depth = png_get_bit_depth(png_ptr, info_ptr);
- if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
- png_set_expand(png_ptr);
- }
-
- //
// Expand paletted or RGB images with transparency to full alpha
// channels so the data will be available as RGBA quartets.
//
@@ -137,7 +136,7 @@
png_read_update_info(png_ptr, info_ptr);
- reader.old_row.resize(image.comp() * image.x());
+ reader.old_row.resize(png_ptr->rowbytes);
}
void openvrml_png_row_callback(png_structp png_ptr,
@@ -159,14 +158,16 @@
openvrml::image & image = reader.stream_listener.image_;
- png_progressive_combine_row(png_ptr, &reader.old_row[0], new_row);
+ assert(!reader.old_row.empty());
+ png_progressive_combine_row(png_ptr, &reader.old_row.front(), new_row);
+
//
// openvrml::image pixels start at the bottom left.
//
const size_t image_row = (image.y() - 1) - row_num;
- const size_t bytes_per_row = reader.old_row.size();
- const size_t image_width = bytes_per_row / image.comp();
+ const size_t bytes_per_row = png_ptr->rowbytes;
+ const size_t image_width = png_ptr->width;
for (size_t pixel_index = 0, byte_index = 0; pixel_index < image_width;
++pixel_index) {
using openvrml::int32;
@@ -192,6 +193,8 @@
reader.stream_listener.node_.modified(true);
+ assert(reader.old_row.size() >= bytes_per_row);
+
copy(new_row, new_row + bytes_per_row, reader.old_row.begin());
}
@@ -229,9 +232,7 @@
openvrml_node_vrml97::image_stream_listener::png_reader::~png_reader()
OPENVRML_NOTHROW
{
- png_destroy_read_struct(&this->png_ptr_,
- &this->info_ptr_,
- png_infopp(0));
+ png_destroy_read_struct(&this->png_ptr_, &this->info_ptr_, png_infopp(0));
}
void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-27 14:49:57
|
Revision: 4145
http://openvrml.svn.sourceforge.net/openvrml/?rev=4145&view=rev
Author: braden
Date: 2010-05-27 14:49:47 +0000 (Thu, 27 May 2010)
Log Message:
-----------
Call FcInit/FcFini to clean up resources used by Fontconfig.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-21 09:08:10 UTC (rev 4144)
+++ trunk/ChangeLog 2010-05-27 14:49:47 UTC (rev 4145)
@@ -1,3 +1,18 @@
+2010-05-27 Braden McDaniel <br...@en...>
+
+ Call FcInit/FcFini to clean up resources used by Fontconfig.
+
+ * src/node/vrml97/text.cpp
+ (text_node::text_geometry::text_geometry(const
+ boost::ptr_vector<line_geometry> &, const std::string &, const
+ std::string &, bool, float, float, float)): Initialize x_min_,
+ x_max_, y_min_, and y_max_ to 0.
+ (openvrml_node_vrml97::text_metatype::text_metatype(openvrml::browser&)):
+ Call FcInit if this is the first time we're using the Fontconfig
+ library.
+ (openvrml_node_vrml97::text_metatype::~text_metatype()): Call
+ FcFini if this is the last use of the Fontconfig library.
+
2010-05-21 Braden McDaniel <br...@en...>
We're expanding the pixels that libpng reads to full RGBA
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-05-21 09:08:10 UTC (rev 4144)
+++ trunk/src/node/vrml97/text.cpp 2010-05-27 14:49:47 UTC (rev 4145)
@@ -1649,7 +1649,11 @@
const float size,
const float spacing,
const float max_extent)
- OPENVRML_THROW1(std::bad_alloc)
+ OPENVRML_THROW1(std::bad_alloc):
+ x_min_(0),
+ x_max_(0),
+ y_min_(0),
+ y_max_(0)
{
std::size_t polygons = 0;
for (boost::ptr_vector<line_geometry>::const_iterator line =
@@ -2748,6 +2752,15 @@
* @see http://freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Library
*/
+namespace {
+ //
+ // We need to call FcFini once (and only once) when we're finished with
+ // the library (i.e., shutdown).
+ //
+ OPENVRML_LOCAL size_t fc_use_count = 0;
+ OPENVRML_LOCAL boost::mutex fc_use_count_mutex;
+}
+
/**
* @brief Construct.
*
@@ -2758,9 +2771,22 @@
node_metatype(text_metatype::id, browser)
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
- FT_Error error = 0;
- error = FT_Init_FreeType(&this->freeTypeLibrary);
- if (error) {
+ {
+ using boost::mutex;
+ using boost::unique_lock;
+
+ unique_lock<mutex> lock(fc_use_count_mutex);
+ if (fc_use_count++ == 0) {
+ FcBool fc_succeeded = FcInit();
+ if (!fc_succeeded) {
+ browser.err("error initializing fontconfig library");
+ }
+ }
+ }
+
+ FT_Error ft_error = 0;
+ ft_error = FT_Init_FreeType(&this->freeTypeLibrary);
+ if (ft_error) {
browser.err("error initializing FreeType library");
}
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
@@ -2772,11 +2798,16 @@
openvrml_node_vrml97::text_metatype::~text_metatype() OPENVRML_NOTHROW
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
- FT_Error error = 0;
- error = FT_Done_FreeType(this->freeTypeLibrary);
- if (error) {
+ FT_Error ft_error = FT_Done_FreeType(this->freeTypeLibrary);
+ if (ft_error) {
this->browser().err("error shutting down FreeType library");
}
+
+ using boost::mutex;
+ using boost::unique_lock;
+
+ unique_lock<mutex> lock(fc_use_count_mutex);
+ if (--fc_use_count == 0) { FcFini(); }
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-27 16:25:44
|
Revision: 4147
http://openvrml.svn.sourceforge.net/openvrml/?rev=4147&view=rev
Author: braden
Date: 2010-05-27 16:25:37 +0000 (Thu, 27 May 2010)
Log Message:
-----------
FcFini cannot be called safely from library code. Calling it is not a strict requirement; though it does clean up valgrind results. To this end, call it from sdl-viewer instead.
Modified Paths:
--------------
trunk/ChangeLog
trunk/examples/Makefile.am
trunk/examples/sdl_viewer.cpp
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-27 14:53:03 UTC (rev 4146)
+++ trunk/ChangeLog 2010-05-27 16:25:37 UTC (rev 4147)
@@ -1,5 +1,23 @@
2010-05-27 Braden McDaniel <br...@en...>
+ FcFini cannot be called safely from library code. Calling it is
+ not a strict requirement; though it does clean up valgrind
+ results. To this end, call it from sdl-viewer instead.
+
+ * examples/Makefile.am
+ (sdl_viewer_CXXFLAGS): Add FONTCONFIG_CFLAGS.
+ (sdl_viewer_LDFLAGS): Add FONTCONFIG_LIBS.
+ * examples/sdl_viewer.cpp
+ (main(int, char *[])): Call FcFini on shutdown if built with
+ OPENVRML_ENABLE_RENDER_TEXT_NODE.
+ * src/node/vrml97/text.cpp
+ (openvrml_node_vrml97::text_metatype::text_metatype(openvrml::browser&)):
+ It's safe to call FcInit redundantly.
+ (openvrml_node_vrml97::text_metatype::~text_metatype()): Don't
+ call FcFini from library code.
+
+2010-05-27 Braden McDaniel <br...@en...>
+
Call FcInit/FcFini to clean up resources used by Fontconfig.
* src/node/vrml97/text.cpp
Modified: trunk/examples/Makefile.am
===================================================================
--- trunk/examples/Makefile.am 2010-05-27 14:53:03 UTC (rev 4146)
+++ trunk/examples/Makefile.am 2010-05-27 16:25:37 UTC (rev 4147)
@@ -19,8 +19,8 @@
-I$(top_srcdir)/src/libopenvrml \
-I$(top_builddir)/src/libopenvrml-gl \
-I$(top_srcdir)/src/libopenvrml-gl
-sdl_viewer_CXXFLAGS = $(SDL_CFLAGS)
-sdl_viewer_LDFLAGS = $(SDL_LIBS) $(GLU_LIBS)
+sdl_viewer_CXXFLAGS = $(SDL_CFLAGS) $(FONTCONFIG_CFLAGS)
+sdl_viewer_LDFLAGS = $(SDL_LIBS) $(GLU_LIBS) $(FONTCONFIG_LIBS)
sdl_viewer_LDADD = $(top_builddir)/src/libopenvrml-gl/libopenvrml-gl.la
pretty_print_SOURCES = pretty_print.cpp
Modified: trunk/examples/sdl_viewer.cpp
===================================================================
--- trunk/examples/sdl_viewer.cpp 2010-05-27 14:53:03 UTC (rev 4146)
+++ trunk/examples/sdl_viewer.cpp 2010-05-27 16:25:37 UTC (rev 4147)
@@ -31,6 +31,8 @@
# include <openvrml/gl/viewer.h>
# ifdef _WIN32
# include <windows.h>
+# elif defined(OPENVRML_ENABLE_RENDER_TEXT_NODE)
+# include <fontconfig/fontconfig.h>
# endif
extern "C" Uint32 update_timer_callback(Uint32 interval, void * param);
@@ -115,6 +117,10 @@
return EXIT_FAILURE;
}
+# if defined(OPENVRML_ENABLE_RENDER_TEXT_NODE) && !defined(_WIN32)
+ FcFini();
+# endif
+
# ifdef _WIN32
fclose(out);
FreeConsole();
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-05-27 14:53:03 UTC (rev 4146)
+++ trunk/src/node/vrml97/text.cpp 2010-05-27 16:25:37 UTC (rev 4147)
@@ -2752,15 +2752,6 @@
* @see http://freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Library
*/
-namespace {
- //
- // We need to call FcFini once (and only once) when we're finished with
- // the library (i.e., shutdown).
- //
- OPENVRML_LOCAL size_t fc_use_count = 0;
- OPENVRML_LOCAL boost::mutex fc_use_count_mutex;
-}
-
/**
* @brief Construct.
*
@@ -2771,17 +2762,9 @@
node_metatype(text_metatype::id, browser)
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
- {
- using boost::mutex;
- using boost::unique_lock;
-
- unique_lock<mutex> lock(fc_use_count_mutex);
- if (fc_use_count++ == 0) {
- FcBool fc_succeeded = FcInit();
- if (!fc_succeeded) {
- browser.err("error initializing fontconfig library");
- }
- }
+ FcBool fc_succeeded = FcInit();
+ if (!fc_succeeded) {
+ browser.err("error initializing fontconfig library");
}
FT_Error ft_error = 0;
@@ -2802,12 +2785,6 @@
if (ft_error) {
this->browser().err("error shutting down FreeType library");
}
-
- using boost::mutex;
- using boost::unique_lock;
-
- unique_lock<mutex> lock(fc_use_count_mutex);
- if (--fc_use_count == 0) { FcFini(); }
# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-05-28 15:17:23
|
Revision: 4150
http://openvrml.svn.sourceforge.net/openvrml/?rev=4150&view=rev
Author: braden
Date: 2010-05-28 15:17:16 +0000 (Fri, 28 May 2010)
Log Message:
-----------
Use jpeg_decompress_struct.out_color_components to determine the scan line buffer size. This addresses a memory corruption issue when reading grayscale JPEGs.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/image_stream_listener.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-27 16:32:54 UTC (rev 4149)
+++ trunk/ChangeLog 2010-05-28 15:17:16 UTC (rev 4150)
@@ -1,3 +1,17 @@
+2010-05-28 Braden McDaniel <br...@en...>
+
+ Use jpeg_decompress_struct.out_color_components to determine the
+ scan line buffer size. This addresses a memory corruption issue
+ when reading grayscale JPEGs.
+
+ * src/node/vrml97/image_stream_listener.cpp
+ (openvrml_node_vrml97::image_stream_listener::jpeg_reader::do_read(const
+ std::vector<unsigned char> &)): Use
+ jpeg_decompress_struct.out_color_components to determine the scan
+ line buffer size. This member isn't set until after the call to
+ jpeg_start_decompress; so move the buffer allocation to the
+ start_decompress section.
+
2010-05-27 Braden McDaniel <br...@en...>
FcFini cannot be called safely from library code. Calling it is
Modified: trunk/src/node/vrml97/image_stream_listener.cpp
===================================================================
--- trunk/src/node/vrml97/image_stream_listener.cpp 2010-05-27 16:32:54 UTC (rev 4149)
+++ trunk/src/node/vrml97/image_stream_listener.cpp 2010-05-28 15:17:16 UTC (rev 4150)
@@ -458,16 +458,6 @@
image.comp(this->cinfo_.num_components);
image.resize(this->cinfo_.image_width, this->cinfo_.image_height);
- const JDIMENSION samples_per_row =
- this->cinfo_.output_width * this->cinfo_.num_components;
- static const JDIMENSION num_rows = 1;
- this->scanlines =
- (*this->cinfo_.mem->alloc_sarray)(
- reinterpret_cast<j_common_ptr>(&this->cinfo_),
- JPOOL_IMAGE,
- samples_per_row,
- num_rows);
-
this->decoder_state = jpeg_reader::start_decompress;
}
case jpeg_reader::start_decompress:
@@ -482,6 +472,16 @@
return; // Input suspended.
}
+ const JDIMENSION samples_per_row =
+ this->cinfo_.output_width * this->cinfo_.out_color_components;
+ static const JDIMENSION num_rows = 1;
+ this->scanlines =
+ (*this->cinfo_.mem->alloc_sarray)(
+ reinterpret_cast<j_common_ptr>(&this->cinfo_),
+ JPOOL_IMAGE,
+ samples_per_row,
+ num_rows);
+
this->decoder_state = this->cinfo_.buffered_image
? jpeg_reader::decompress_progressive
: jpeg_reader::decompress_sequential;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-06-03 01:50:36
|
Revision: 4154
http://openvrml.svn.sourceforge.net/openvrml/?rev=4154&view=rev
Author: braden
Date: 2010-06-03 01:50:18 +0000 (Thu, 03 Jun 2010)
Log Message:
-----------
Updates for 0.18.6 release.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/doc/Doxyfile
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
trunk/src/Makefile.am
Property Changed:
----------------
trunk/
trunk/src/libopenvrml/openvrml/bad_url.cpp
trunk/src/libopenvrml/openvrml/bad_url.h
trunk/src/libopenvrml/openvrml/local/proto.cpp
trunk/src/libopenvrml/openvrml/local/proto.h
trunk/src/libopenvrml/openvrml/scene.cpp
trunk/src/libopenvrml/openvrml/scene.h
trunk/src/libopenvrml/openvrml/script.cpp
trunk/src/mozilla-plugin/
trunk/src/node/vrml97/register_node_metatypes.cpp
trunk/src/node/x3d-cad-geometry/cad_face.cpp
trunk/src/node/x3d-cad-geometry/cad_face.h
trunk/src/node/x3d-cad-geometry/indexed_quad_set.cpp
trunk/src/node/x3d-cad-geometry/indexed_quad_set.h
trunk/src/node/x3d-cad-geometry/register_node_metatypes.cpp
trunk/src/node/x3d-core/metadata_double.cpp
trunk/src/node/x3d-core/metadata_double.h
trunk/src/node/x3d-core/metadata_float.cpp
trunk/src/node/x3d-core/metadata_float.h
trunk/src/node/x3d-core/metadata_integer.cpp
trunk/src/node/x3d-core/metadata_integer.h
trunk/src/node/x3d-core/metadata_set.cpp
trunk/src/node/x3d-core/metadata_set.h
trunk/src/node/x3d-core/metadata_string.cpp
trunk/src/node/x3d-core/metadata_string.h
trunk/src/node/x3d-core/register_node_metatypes.cpp
trunk/src/node/x3d-dis/espdu_transform.cpp
trunk/src/node/x3d-dis/espdu_transform.h
trunk/src/node/x3d-dis/receiver_pdu.cpp
trunk/src/node/x3d-dis/receiver_pdu.h
trunk/src/node/x3d-dis/register_node_metatypes.cpp
trunk/src/node/x3d-dis/signal_pdu.cpp
trunk/src/node/x3d-dis/signal_pdu.h
trunk/src/node/x3d-dis/transmitter_pdu.cpp
trunk/src/node/x3d-dis/transmitter_pdu.h
trunk/src/node/x3d-environmental-effects/register_node_metatypes.cpp
trunk/src/node/x3d-environmental-effects/texture_background.cpp
trunk/src/node/x3d-environmental-effects/texture_background.h
trunk/src/node/x3d-event-utilities/boolean_filter.cpp
trunk/src/node/x3d-event-utilities/boolean_filter.h
trunk/src/node/x3d-event-utilities/boolean_sequencer.cpp
trunk/src/node/x3d-event-utilities/boolean_sequencer.h
trunk/src/node/x3d-event-utilities/boolean_toggle.cpp
trunk/src/node/x3d-event-utilities/boolean_toggle.h
trunk/src/node/x3d-event-utilities/boolean_trigger.cpp
trunk/src/node/x3d-event-utilities/boolean_trigger.h
trunk/src/node/x3d-event-utilities/integer_sequencer.cpp
trunk/src/node/x3d-event-utilities/integer_sequencer.h
trunk/src/node/x3d-event-utilities/integer_trigger.cpp
trunk/src/node/x3d-event-utilities/integer_trigger.h
trunk/src/node/x3d-event-utilities/register_node_metatypes.cpp
trunk/src/node/x3d-event-utilities/time_trigger.cpp
trunk/src/node/x3d-event-utilities/time_trigger.h
trunk/src/node/x3d-geometry2d/arc2d.cpp
trunk/src/node/x3d-geometry2d/arc2d.h
trunk/src/node/x3d-geometry2d/arc_close2d.cpp
trunk/src/node/x3d-geometry2d/arc_close2d.h
trunk/src/node/x3d-geometry2d/circle2d.cpp
trunk/src/node/x3d-geometry2d/circle2d.h
trunk/src/node/x3d-geometry2d/disk2d.cpp
trunk/src/node/x3d-geometry2d/disk2d.h
trunk/src/node/x3d-geometry2d/polyline2d.cpp
trunk/src/node/x3d-geometry2d/polyline2d.h
trunk/src/node/x3d-geometry2d/polypoint2d.cpp
trunk/src/node/x3d-geometry2d/polypoint2d.h
trunk/src/node/x3d-geometry2d/rectangle2d.cpp
trunk/src/node/x3d-geometry2d/rectangle2d.h
trunk/src/node/x3d-geometry2d/register_node_metatypes.cpp
trunk/src/node/x3d-geometry2d/triangle_set2d.cpp
trunk/src/node/x3d-geometry2d/triangle_set2d.h
trunk/src/node/x3d-geospatial/geo_coordinate.cpp
trunk/src/node/x3d-geospatial/geo_coordinate.h
trunk/src/node/x3d-geospatial/geo_elevation_grid.cpp
trunk/src/node/x3d-geospatial/geo_elevation_grid.h
trunk/src/node/x3d-geospatial/geo_location.cpp
trunk/src/node/x3d-geospatial/geo_location.h
trunk/src/node/x3d-geospatial/geo_lod.cpp
trunk/src/node/x3d-geospatial/geo_lod.h
trunk/src/node/x3d-geospatial/geo_metadata.cpp
trunk/src/node/x3d-geospatial/geo_metadata.h
trunk/src/node/x3d-geospatial/geo_origin.cpp
trunk/src/node/x3d-geospatial/geo_origin.h
trunk/src/node/x3d-geospatial/geo_position_interpolator.cpp
trunk/src/node/x3d-geospatial/geo_position_interpolator.h
trunk/src/node/x3d-geospatial/geo_touch_sensor.cpp
trunk/src/node/x3d-geospatial/geo_touch_sensor.h
trunk/src/node/x3d-geospatial/geo_viewpoint.cpp
trunk/src/node/x3d-geospatial/geo_viewpoint.h
trunk/src/node/x3d-geospatial/register_node_metatypes.cpp
trunk/src/node/x3d-grouping/register_node_metatypes.cpp
trunk/src/node/x3d-grouping/static_group.cpp
trunk/src/node/x3d-grouping/static_group.h
trunk/src/node/x3d-h-anim/h_anim_displacer.cpp
trunk/src/node/x3d-h-anim/h_anim_displacer.h
trunk/src/node/x3d-h-anim/h_anim_humanoid.cpp
trunk/src/node/x3d-h-anim/h_anim_humanoid.h
trunk/src/node/x3d-h-anim/h_anim_joint.cpp
trunk/src/node/x3d-h-anim/h_anim_joint.h
trunk/src/node/x3d-h-anim/h_anim_segment.cpp
trunk/src/node/x3d-h-anim/h_anim_segment.h
trunk/src/node/x3d-h-anim/h_anim_site.cpp
trunk/src/node/x3d-h-anim/h_anim_site.h
trunk/src/node/x3d-h-anim/register_node_metatypes.cpp
trunk/src/node/x3d-interpolation/coordinate_interpolator2d.cpp
trunk/src/node/x3d-interpolation/coordinate_interpolator2d.h
trunk/src/node/x3d-interpolation/position_interpolator2d.cpp
trunk/src/node/x3d-interpolation/position_interpolator2d.h
trunk/src/node/x3d-interpolation/register_node_metatypes.cpp
trunk/src/node/x3d-key-device-sensor/key_sensor.cpp
trunk/src/node/x3d-key-device-sensor/key_sensor.h
trunk/src/node/x3d-key-device-sensor/register_node_metatypes.cpp
trunk/src/node/x3d-key-device-sensor/string_sensor.cpp
trunk/src/node/x3d-key-device-sensor/string_sensor.h
trunk/src/node/x3d-networking/load_sensor.cpp
trunk/src/node/x3d-networking/load_sensor.h
trunk/src/node/x3d-networking/register_node_metatypes.cpp
trunk/src/node/x3d-nurbs/contour2d.cpp
trunk/src/node/x3d-nurbs/contour2d.h
trunk/src/node/x3d-nurbs/contour_polyline2d.cpp
trunk/src/node/x3d-nurbs/contour_polyline2d.h
trunk/src/node/x3d-nurbs/coordinate_double.cpp
trunk/src/node/x3d-nurbs/coordinate_double.h
trunk/src/node/x3d-nurbs/nurbs_curve.cpp
trunk/src/node/x3d-nurbs/nurbs_curve.h
trunk/src/node/x3d-nurbs/nurbs_curve2d.cpp
trunk/src/node/x3d-nurbs/nurbs_curve2d.h
trunk/src/node/x3d-nurbs/nurbs_orientation_interpolator.cpp
trunk/src/node/x3d-nurbs/nurbs_orientation_interpolator.h
trunk/src/node/x3d-nurbs/nurbs_patch_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_patch_surface.h
trunk/src/node/x3d-nurbs/nurbs_position_interpolator.cpp
trunk/src/node/x3d-nurbs/nurbs_position_interpolator.h
trunk/src/node/x3d-nurbs/nurbs_set.cpp
trunk/src/node/x3d-nurbs/nurbs_set.h
trunk/src/node/x3d-nurbs/nurbs_surface_interpolator.cpp
trunk/src/node/x3d-nurbs/nurbs_surface_interpolator.h
trunk/src/node/x3d-nurbs/nurbs_swept_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_swept_surface.h
trunk/src/node/x3d-nurbs/nurbs_swung_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_swung_surface.h
trunk/src/node/x3d-nurbs/nurbs_texture_coordinate.cpp
trunk/src/node/x3d-nurbs/nurbs_texture_coordinate.h
trunk/src/node/x3d-nurbs/nurbs_trimmed_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_trimmed_surface.h
trunk/src/node/x3d-nurbs/register_node_metatypes.cpp
trunk/src/node/x3d-rendering/color_rgba.cpp
trunk/src/node/x3d-rendering/color_rgba.h
trunk/src/node/x3d-rendering/indexed_triangle_fan_set.cpp
trunk/src/node/x3d-rendering/indexed_triangle_fan_set.h
trunk/src/node/x3d-rendering/indexed_triangle_set.cpp
trunk/src/node/x3d-rendering/indexed_triangle_set.h
trunk/src/node/x3d-rendering/indexed_triangle_strip_set.cpp
trunk/src/node/x3d-rendering/indexed_triangle_strip_set.h
trunk/src/node/x3d-rendering/register_node_metatypes.cpp
trunk/src/node/x3d-rendering/triangle_fan_set.cpp
trunk/src/node/x3d-rendering/triangle_fan_set.h
trunk/src/node/x3d-rendering/triangle_set.cpp
trunk/src/node/x3d-rendering/triangle_set.h
trunk/src/node/x3d-rendering/triangle_strip_set.cpp
trunk/src/node/x3d-rendering/triangle_strip_set.h
trunk/src/node/x3d-shape/fill_properties.cpp
trunk/src/node/x3d-shape/fill_properties.h
trunk/src/node/x3d-shape/line_properties.cpp
trunk/src/node/x3d-shape/line_properties.h
trunk/src/node/x3d-shape/register_node_metatypes.cpp
trunk/src/node/x3d-texturing/multi_texture.cpp
trunk/src/node/x3d-texturing/multi_texture.h
trunk/src/node/x3d-texturing/multi_texture_coordinate.cpp
trunk/src/node/x3d-texturing/multi_texture_coordinate.h
trunk/src/node/x3d-texturing/multi_texture_transform.cpp
trunk/src/node/x3d-texturing/multi_texture_transform.h
trunk/src/node/x3d-texturing/register_node_metatypes.cpp
trunk/src/node/x3d-texturing/texture_coordinate_generator.cpp
trunk/src/node/x3d-texturing/texture_coordinate_generator.h
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18:3951,3953,3955,3960,3994,4104,4110
/branches/local:3677-3689
/branches/node-modules:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.17:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local:3677-3689
/branches/node-modules:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-06-03 01:35:51 UTC (rev 4153)
+++ trunk/ChangeLog 2010-06-03 01:50:18 UTC (rev 4154)
@@ -1,3 +1,17 @@
+2010-06-02 Braden McDaniel <br...@en...>
+
+ Updates for 0.18.6 release.
+
+ * README
+ * NEWS
+ * configure.ac
+ * doc/Doxyfile
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
+ * src/Makefile.am
+ (LIBOPENVRML_LIBRARY_VERSION): Update to 9:4:0.
+
2010-05-28 Braden McDaniel <br...@en...>
Use jpeg_decompress_struct.out_color_components to determine the
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-06-03 01:35:51 UTC (rev 4153)
+++ trunk/NEWS 2010-06-03 01:50:18 UTC (rev 4154)
@@ -1,3 +1,12 @@
+Changes new in version 0.18.6, 2 June, 2010
+========================================================================
+
+- Fixed memory corruption issues in the PNG and JPEG readers when
+ reading grayscale images.
+
+- Fixed memory leaks in Text node rendering.
+
+
Changes new in version 0.18.5, 15 February, 2010
========================================================================
Modified: trunk/doc/Doxyfile
===================================================================
--- trunk/doc/Doxyfile 2010-06-03 01:35:51 UTC (rev 4153)
+++ trunk/doc/Doxyfile 2010-06-03 01:50:18 UTC (rev 4154)
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = OpenVRML
-PROJECT_NUMBER = 0.18.5
+PROJECT_NUMBER = 0.18.6
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc 2010-06-03 01:35:51 UTC (rev 4153)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc 2010-06-03 01:50:18 UTC (rev 4154)
@@ -11,8 +11,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 9,3,0,0
- PRODUCTVERSION 0,18,5,0
+ FILEVERSION 9,4,0,0
+ PRODUCTVERSION 0,18,6,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -28,7 +28,7 @@
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "OpenVRML Library"
- VALUE "FileVersion", "9, 3, 0, 0"
+ VALUE "FileVersion", "9, 4, 0, 0"
VALUE "InternalName", "openvrml"
VALUE "LegalCopyright", "Copyright (C) 2010"
VALUE "OriginalFilename", "openvrml.dll"
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc 2010-06-03 01:35:51 UTC (rev 4153)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc 2010-06-03 01:50:18 UTC (rev 4154)
@@ -12,7 +12,7 @@
VS_VERSION_INFO VERSIONINFO
FILEVERSION 8,0,0,0
- PRODUCTVERSION 0,18,5,0
+ PRODUCTVERSION 0,18,6,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2010-06-03 01:35:51 UTC (rev 4153)
+++ trunk/src/Makefile.am 2010-06-03 01:50:18 UTC (rev 4154)
@@ -47,7 +47,7 @@
libopenvrml/private.h \
openvrml-player/filechooserdialog.h
-LIBOPENVRML_LIBRARY_VERSION = 9:3:0
+LIBOPENVRML_LIBRARY_VERSION = 9:4:0
LIBOPENVRML_GL_LIBRARY_VERSION = 8:0:0
# | | |
# +------+ | +---+
Property changes on: trunk/src/libopenvrml/openvrml/bad_url.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/bad_url.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/bad_url.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/libopenvrml/openvrml/bad_url.cpp:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/bad_url.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/bad_url.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/bad_url.cpp:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/bad_url.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/libopenvrml/openvrml/bad_url.h:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/libopenvrml/openvrml/bad_url.h:3736-3801
/branches/node-modules/src/libopenvrml/openvrml/browser.h:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674
+ /branches/0.18/src/libopenvrml/openvrml/bad_url.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/bad_url.h:3736-3801
/branches/node-modules/src/libopenvrml/openvrml/browser.h:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674
Property changes on: trunk/src/libopenvrml/openvrml/local/proto.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/libopenvrml/openvrml/local/proto.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.cpp:3736-3801
+ /branches/0.18/src/libopenvrml/openvrml/local/proto.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.cpp:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/local/proto.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/libopenvrml/openvrml/local/proto.h:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.h:3736-3801
+ /branches/0.18/src/libopenvrml/openvrml/local/proto.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.h:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/scene.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/scene.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/libopenvrml/openvrml/scene.cpp:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/scene.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/scene.cpp:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/scene.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/scene.h:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.h:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/libopenvrml/openvrml/scene.h:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/scene.h:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/scene.h:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/script.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/script.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/script.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/libopenvrml/openvrml/script.cpp:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/script.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/script.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/script.cpp:3736-3801
Property changes on: trunk/src/mozilla-plugin
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/mozilla-plugin:3951,3953,3955,3960,3994,4104,4110
+ /branches/0.18/src/mozilla-plugin:3951,3953,3955,3960,3994,4104,4110,4152
Property changes on: trunk/src/node/vrml97/register_node_metatypes.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/vrml97node.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/vrml97/register_node_metatypes.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/libopenvrml/openvrml/vrml97node.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/vrml97node.cpp:3401-3734
+ /branches/0.17/src/libopenvrml/openvrml/vrml97node.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/vrml97/register_node_metatypes.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/vrml97node.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/vrml97node.cpp:3401-3734
Property changes on: trunk/src/node/x3d-cad-geometry/cad_face.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/cad_face.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/cad_face.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/cad_face.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/cad_face.h:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/cad_face.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/indexed_quad_set.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/indexed_quad_set.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.h:3951,3953,3955,3960,3994,4104,4110
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/register_node_metatypes.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/x3d-cad-geometry/register_node_metatypes.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3734
+ /branches/0.17/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/x3d-cad-geometry/register_node_metatypes.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3734
Property changes on: trunk/src/node/x3d-core/metadata_double.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_double.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/node/x3d-core/metadata_double.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_double.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_double.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_double.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_double.h:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/node/x3d-core/metadata_double.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_double.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_double.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_float.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_float.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/node/x3d-core/metadata_float.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_float.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_float.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_float.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_float.h:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/node/x3d-core/metadata_float.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_float.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_float.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_integer.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_integer.cpp:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/node/x3d-core/metadata_integer.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_integer.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_integer.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_integer.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_integer.h:3951,3953,3955,3960,3994,4104,4110
/branches/local/src/node/x3d-core/metadata_integer.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_integer.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_intege...
[truncated message content] |
|
From: <br...@us...> - 2010-06-06 19:11:25
|
Revision: 4155
http://openvrml.svn.sourceforge.net/openvrml/?rev=4155&view=rev
Author: braden
Date: 2010-06-06 19:11:18 +0000 (Sun, 06 Jun 2010)
Log Message:
-----------
Added MFDouble parsing.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-06-03 01:50:18 UTC (rev 4154)
+++ trunk/ChangeLog 2010-06-06 19:11:18 UTC (rev 4155)
@@ -1,3 +1,8 @@
+2010-06-06 Braden McDaniel <br...@en...>
+
+ * src/libopenvrml/openvrml/x3d_vrml_grammar.h: Added MFDouble
+ parsing.
+
2010-06-02 Braden McDaniel <br...@en...>
Updates for 0.18.6 release.
Modified: trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h
===================================================================
--- trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2010-06-03 01:50:18 UTC (rev 4154)
+++ trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2010-06-06 19:11:18 UTC (rev 4155)
@@ -307,6 +307,11 @@
{}
} on_mfcolorrgba;
+ struct on_mfdouble_t {
+ void operator()(const std::vector<double> & /* val */) const
+ {}
+ } on_mfdouble;
+
struct on_mfimage_t {
void operator()(const std::vector<image> & /* val */) const
{}
@@ -652,6 +657,13 @@
static const boost::spirit::classic::functor_parser<
typename base_t::template mftype_parser<
+ boost::spirit::classic::real_parser<
+ double,
+ boost::spirit::classic::real_parser_policies<double> > > >
+ mfdouble_p;
+
+ static const boost::spirit::classic::functor_parser<
+ typename base_t::template mftype_parser<
boost::spirit::classic::functor_parser<openvrml::image_parser> > >
mfimage_p;
@@ -692,6 +704,9 @@
case field_value::mfcolorrgba_id:
r = mfcolorrgba_p[base_t::self.actions.on_mfcolorrgba];
break;
+ case field_value::mfdouble_id:
+ r = mfdouble_p[base_t::self.actions.on_mfdouble];
+ break;
case field_value::mfimage_id:
r = mfimage_p[base_t::self.actions.on_mfimage];
break;
@@ -733,6 +748,23 @@
template <typename ScannerT>
const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
+ template mftype_parser<
+ boost::spirit::classic::real_parser<
+ double,
+ boost::spirit::classic::real_parser_policies<double> > > >
+ x3d_vrml_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfdouble_p =
+ typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
+ template mftype_parser<
+ boost::spirit::classic::real_parser<
+ double,
+ boost::spirit::classic::real_parser_policies<double>
+ >
+ >(boost::spirit::classic::real_p);
+
+ template <typename Actions, typename ErrorHandler>
+ template <typename ScannerT>
+ const boost::spirit::classic::functor_parser<
+ typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
template mftype_parser<boost::spirit::classic::functor_parser<openvrml::color_rgba_parser> > >
x3d_vrml_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfcolorrgba_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-07-09 06:37:15
|
Revision: 4156
http://openvrml.svn.sourceforge.net/openvrml/?rev=4156&view=rev
Author: braden
Date: 2010-07-09 06:37:09 +0000 (Fri, 09 Jul 2010)
Log Message:
-----------
Lock the image_mutex_ before rendering the texture.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/image_texture.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-06-06 19:11:18 UTC (rev 4155)
+++ trunk/ChangeLog 2010-07-09 06:37:09 UTC (rev 4156)
@@ -1,3 +1,9 @@
+2010-07-09 Braden McDaniel <br...@en...>
+
+ * src/node/vrml97/image_texture.cpp
+ (image_texture_node::do_render_texture(openvrml::viewer &)): Lock
+ the image_mutex_ before rendering the texture.
+
2010-06-06 Braden McDaniel <br...@en...>
* src/libopenvrml/openvrml/x3d_vrml_grammar.h: Added MFDouble
Modified: trunk/src/node/vrml97/image_texture.cpp
===================================================================
--- trunk/src/node/vrml97/image_texture.cpp 2010-06-06 19:11:18 UTC (rev 4155)
+++ trunk/src/node/vrml97/image_texture.cpp 2010-07-09 06:37:09 UTC (rev 4156)
@@ -230,6 +230,7 @@
void image_texture_node::do_render_texture(openvrml::viewer & v)
{
this->update_texture();
+ boost::shared_lock<boost::shared_mutex> lock(this->image_mutex_);
v.insert_texture(*this, true);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-07-09 16:22:21
|
Revision: 4158
http://openvrml.svn.sourceforge.net/openvrml/?rev=4158&view=rev
Author: braden
Date: 2010-07-09 16:22:15 +0000 (Fri, 09 Jul 2010)
Log Message:
-----------
Added semantic action for mfdouble.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/local/parse_vrml.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-09 06:41:24 UTC (rev 4157)
+++ trunk/ChangeLog 2010-07-09 16:22:15 UTC (rev 4158)
@@ -1,5 +1,11 @@
2010-07-09 Braden McDaniel <br...@en...>
+ * src/libopenvrml/openvrml/local/parse_vrml.h
+ (openvrml::local::x3d_vrml_parse_actions::on_mfdouble): Added
+ semantic action for mfdouble.
+
+2010-07-09 Braden McDaniel <br...@en...>
+
* src/node/vrml97/image_texture.cpp
(image_texture_node::do_render_texture(openvrml::viewer &)): Lock
the image_mutex_ before rendering the texture.
Modified: trunk/src/libopenvrml/openvrml/local/parse_vrml.h
===================================================================
--- trunk/src/libopenvrml/openvrml/local/parse_vrml.h 2010-07-09 06:41:24 UTC (rev 4157)
+++ trunk/src/libopenvrml/openvrml/local/parse_vrml.h 2010-07-09 16:22:15 UTC (rev 4158)
@@ -1205,6 +1205,7 @@
on_sfvec3d(*this),
on_mfbool(*this),
on_mfcolorrgba(*this),
+ on_mfdouble(*this),
on_mfimage(*this),
on_mfvec2d(*this),
on_mfvec3d(*this),
@@ -1370,6 +1371,23 @@
vrml97_parse_actions & actions_;
} on_mfcolorrgba;
+ struct on_mfdouble_t {
+ explicit on_mfdouble_t(vrml97_parse_actions & actions):
+ actions_(actions)
+ {}
+
+ void operator()(const std::vector<double> & val) const
+ {
+ assert(!actions_.ps.empty());
+ assert(!actions_.ps.top().node_data_.empty());
+ actions_.ps.top().node_data_.top()
+ .current_field_value->second->assign(mfdouble(val));
+ }
+
+ private:
+ vrml97_parse_actions & actions_;
+ } on_mfdouble;
+
struct on_mfimage_t {
explicit on_mfimage_t(vrml97_parse_actions & actions):
actions_(actions)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-07-09 16:44:55
|
Revision: 4159
http://openvrml.svn.sourceforge.net/openvrml/?rev=4159&view=rev
Author: braden
Date: 2010-07-09 16:44:47 +0000 (Fri, 09 Jul 2010)
Log Message:
-----------
Removed OPENVRML_API from event listener/emitter class templates.
Modified Paths:
--------------
trunk/src/libopenvrml/openvrml/event.h
Property Changed:
----------------
trunk/
trunk/src/libopenvrml/openvrml/bad_url.cpp
trunk/src/libopenvrml/openvrml/bad_url.h
trunk/src/libopenvrml/openvrml/local/proto.cpp
trunk/src/libopenvrml/openvrml/local/proto.h
trunk/src/libopenvrml/openvrml/scene.cpp
trunk/src/libopenvrml/openvrml/scene.h
trunk/src/libopenvrml/openvrml/script.cpp
trunk/src/mozilla-plugin/
trunk/src/node/vrml97/register_node_metatypes.cpp
trunk/src/node/x3d-cad-geometry/cad_face.cpp
trunk/src/node/x3d-cad-geometry/cad_face.h
trunk/src/node/x3d-cad-geometry/indexed_quad_set.cpp
trunk/src/node/x3d-cad-geometry/indexed_quad_set.h
trunk/src/node/x3d-cad-geometry/register_node_metatypes.cpp
trunk/src/node/x3d-core/metadata_double.cpp
trunk/src/node/x3d-core/metadata_double.h
trunk/src/node/x3d-core/metadata_float.cpp
trunk/src/node/x3d-core/metadata_float.h
trunk/src/node/x3d-core/metadata_integer.cpp
trunk/src/node/x3d-core/metadata_integer.h
trunk/src/node/x3d-core/metadata_set.cpp
trunk/src/node/x3d-core/metadata_set.h
trunk/src/node/x3d-core/metadata_string.cpp
trunk/src/node/x3d-core/metadata_string.h
trunk/src/node/x3d-core/register_node_metatypes.cpp
trunk/src/node/x3d-dis/espdu_transform.cpp
trunk/src/node/x3d-dis/espdu_transform.h
trunk/src/node/x3d-dis/receiver_pdu.cpp
trunk/src/node/x3d-dis/receiver_pdu.h
trunk/src/node/x3d-dis/register_node_metatypes.cpp
trunk/src/node/x3d-dis/signal_pdu.cpp
trunk/src/node/x3d-dis/signal_pdu.h
trunk/src/node/x3d-dis/transmitter_pdu.cpp
trunk/src/node/x3d-dis/transmitter_pdu.h
trunk/src/node/x3d-environmental-effects/register_node_metatypes.cpp
trunk/src/node/x3d-environmental-effects/texture_background.cpp
trunk/src/node/x3d-environmental-effects/texture_background.h
trunk/src/node/x3d-event-utilities/boolean_filter.cpp
trunk/src/node/x3d-event-utilities/boolean_filter.h
trunk/src/node/x3d-event-utilities/boolean_sequencer.cpp
trunk/src/node/x3d-event-utilities/boolean_sequencer.h
trunk/src/node/x3d-event-utilities/boolean_toggle.cpp
trunk/src/node/x3d-event-utilities/boolean_toggle.h
trunk/src/node/x3d-event-utilities/boolean_trigger.cpp
trunk/src/node/x3d-event-utilities/boolean_trigger.h
trunk/src/node/x3d-event-utilities/integer_sequencer.cpp
trunk/src/node/x3d-event-utilities/integer_sequencer.h
trunk/src/node/x3d-event-utilities/integer_trigger.cpp
trunk/src/node/x3d-event-utilities/integer_trigger.h
trunk/src/node/x3d-event-utilities/register_node_metatypes.cpp
trunk/src/node/x3d-event-utilities/time_trigger.cpp
trunk/src/node/x3d-event-utilities/time_trigger.h
trunk/src/node/x3d-geometry2d/arc2d.cpp
trunk/src/node/x3d-geometry2d/arc2d.h
trunk/src/node/x3d-geometry2d/arc_close2d.cpp
trunk/src/node/x3d-geometry2d/arc_close2d.h
trunk/src/node/x3d-geometry2d/circle2d.cpp
trunk/src/node/x3d-geometry2d/circle2d.h
trunk/src/node/x3d-geometry2d/disk2d.cpp
trunk/src/node/x3d-geometry2d/disk2d.h
trunk/src/node/x3d-geometry2d/polyline2d.cpp
trunk/src/node/x3d-geometry2d/polyline2d.h
trunk/src/node/x3d-geometry2d/polypoint2d.cpp
trunk/src/node/x3d-geometry2d/polypoint2d.h
trunk/src/node/x3d-geometry2d/rectangle2d.cpp
trunk/src/node/x3d-geometry2d/rectangle2d.h
trunk/src/node/x3d-geometry2d/register_node_metatypes.cpp
trunk/src/node/x3d-geometry2d/triangle_set2d.cpp
trunk/src/node/x3d-geometry2d/triangle_set2d.h
trunk/src/node/x3d-geospatial/geo_coordinate.cpp
trunk/src/node/x3d-geospatial/geo_coordinate.h
trunk/src/node/x3d-geospatial/geo_elevation_grid.cpp
trunk/src/node/x3d-geospatial/geo_elevation_grid.h
trunk/src/node/x3d-geospatial/geo_location.cpp
trunk/src/node/x3d-geospatial/geo_location.h
trunk/src/node/x3d-geospatial/geo_lod.cpp
trunk/src/node/x3d-geospatial/geo_lod.h
trunk/src/node/x3d-geospatial/geo_metadata.cpp
trunk/src/node/x3d-geospatial/geo_metadata.h
trunk/src/node/x3d-geospatial/geo_origin.cpp
trunk/src/node/x3d-geospatial/geo_origin.h
trunk/src/node/x3d-geospatial/geo_position_interpolator.cpp
trunk/src/node/x3d-geospatial/geo_position_interpolator.h
trunk/src/node/x3d-geospatial/geo_touch_sensor.cpp
trunk/src/node/x3d-geospatial/geo_touch_sensor.h
trunk/src/node/x3d-geospatial/geo_viewpoint.cpp
trunk/src/node/x3d-geospatial/geo_viewpoint.h
trunk/src/node/x3d-geospatial/register_node_metatypes.cpp
trunk/src/node/x3d-grouping/register_node_metatypes.cpp
trunk/src/node/x3d-grouping/static_group.cpp
trunk/src/node/x3d-grouping/static_group.h
trunk/src/node/x3d-h-anim/h_anim_displacer.cpp
trunk/src/node/x3d-h-anim/h_anim_displacer.h
trunk/src/node/x3d-h-anim/h_anim_humanoid.cpp
trunk/src/node/x3d-h-anim/h_anim_humanoid.h
trunk/src/node/x3d-h-anim/h_anim_joint.cpp
trunk/src/node/x3d-h-anim/h_anim_joint.h
trunk/src/node/x3d-h-anim/h_anim_segment.cpp
trunk/src/node/x3d-h-anim/h_anim_segment.h
trunk/src/node/x3d-h-anim/h_anim_site.cpp
trunk/src/node/x3d-h-anim/h_anim_site.h
trunk/src/node/x3d-h-anim/register_node_metatypes.cpp
trunk/src/node/x3d-interpolation/coordinate_interpolator2d.cpp
trunk/src/node/x3d-interpolation/coordinate_interpolator2d.h
trunk/src/node/x3d-interpolation/position_interpolator2d.cpp
trunk/src/node/x3d-interpolation/position_interpolator2d.h
trunk/src/node/x3d-interpolation/register_node_metatypes.cpp
trunk/src/node/x3d-key-device-sensor/key_sensor.cpp
trunk/src/node/x3d-key-device-sensor/key_sensor.h
trunk/src/node/x3d-key-device-sensor/register_node_metatypes.cpp
trunk/src/node/x3d-key-device-sensor/string_sensor.cpp
trunk/src/node/x3d-key-device-sensor/string_sensor.h
trunk/src/node/x3d-networking/load_sensor.cpp
trunk/src/node/x3d-networking/load_sensor.h
trunk/src/node/x3d-networking/register_node_metatypes.cpp
trunk/src/node/x3d-nurbs/contour2d.cpp
trunk/src/node/x3d-nurbs/contour2d.h
trunk/src/node/x3d-nurbs/contour_polyline2d.cpp
trunk/src/node/x3d-nurbs/contour_polyline2d.h
trunk/src/node/x3d-nurbs/coordinate_double.cpp
trunk/src/node/x3d-nurbs/coordinate_double.h
trunk/src/node/x3d-nurbs/nurbs_curve.cpp
trunk/src/node/x3d-nurbs/nurbs_curve.h
trunk/src/node/x3d-nurbs/nurbs_curve2d.cpp
trunk/src/node/x3d-nurbs/nurbs_curve2d.h
trunk/src/node/x3d-nurbs/nurbs_orientation_interpolator.cpp
trunk/src/node/x3d-nurbs/nurbs_orientation_interpolator.h
trunk/src/node/x3d-nurbs/nurbs_patch_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_patch_surface.h
trunk/src/node/x3d-nurbs/nurbs_position_interpolator.cpp
trunk/src/node/x3d-nurbs/nurbs_position_interpolator.h
trunk/src/node/x3d-nurbs/nurbs_set.cpp
trunk/src/node/x3d-nurbs/nurbs_set.h
trunk/src/node/x3d-nurbs/nurbs_surface_interpolator.cpp
trunk/src/node/x3d-nurbs/nurbs_surface_interpolator.h
trunk/src/node/x3d-nurbs/nurbs_swept_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_swept_surface.h
trunk/src/node/x3d-nurbs/nurbs_swung_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_swung_surface.h
trunk/src/node/x3d-nurbs/nurbs_texture_coordinate.cpp
trunk/src/node/x3d-nurbs/nurbs_texture_coordinate.h
trunk/src/node/x3d-nurbs/nurbs_trimmed_surface.cpp
trunk/src/node/x3d-nurbs/nurbs_trimmed_surface.h
trunk/src/node/x3d-nurbs/register_node_metatypes.cpp
trunk/src/node/x3d-rendering/color_rgba.cpp
trunk/src/node/x3d-rendering/color_rgba.h
trunk/src/node/x3d-rendering/indexed_triangle_fan_set.cpp
trunk/src/node/x3d-rendering/indexed_triangle_fan_set.h
trunk/src/node/x3d-rendering/indexed_triangle_set.cpp
trunk/src/node/x3d-rendering/indexed_triangle_set.h
trunk/src/node/x3d-rendering/indexed_triangle_strip_set.cpp
trunk/src/node/x3d-rendering/indexed_triangle_strip_set.h
trunk/src/node/x3d-rendering/register_node_metatypes.cpp
trunk/src/node/x3d-rendering/triangle_fan_set.cpp
trunk/src/node/x3d-rendering/triangle_fan_set.h
trunk/src/node/x3d-rendering/triangle_set.cpp
trunk/src/node/x3d-rendering/triangle_set.h
trunk/src/node/x3d-rendering/triangle_strip_set.cpp
trunk/src/node/x3d-rendering/triangle_strip_set.h
trunk/src/node/x3d-shape/fill_properties.cpp
trunk/src/node/x3d-shape/fill_properties.h
trunk/src/node/x3d-shape/line_properties.cpp
trunk/src/node/x3d-shape/line_properties.h
trunk/src/node/x3d-shape/register_node_metatypes.cpp
trunk/src/node/x3d-texturing/multi_texture.cpp
trunk/src/node/x3d-texturing/multi_texture.h
trunk/src/node/x3d-texturing/multi_texture_coordinate.cpp
trunk/src/node/x3d-texturing/multi_texture_coordinate.h
trunk/src/node/x3d-texturing/multi_texture_transform.cpp
trunk/src/node/x3d-texturing/multi_texture_transform.h
trunk/src/node/x3d-texturing/register_node_metatypes.cpp
trunk/src/node/x3d-texturing/texture_coordinate_generator.cpp
trunk/src/node/x3d-texturing/texture_coordinate_generator.h
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local:3677-3689
/branches/node-modules:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.17:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18:3951,3955,3960,3994,4104,4110,4152
/branches/local:3677-3689
/branches/node-modules:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/bad_url.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/bad_url.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/bad_url.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/bad_url.cpp:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/bad_url.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/bad_url.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/bad_url.cpp:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/bad_url.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/libopenvrml/openvrml/bad_url.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/bad_url.h:3736-3801
/branches/node-modules/src/libopenvrml/openvrml/browser.h:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674
+ /branches/0.18/src/libopenvrml/openvrml/bad_url.h:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/bad_url.h:3736-3801
/branches/node-modules/src/libopenvrml/openvrml/browser.h:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674
Modified: trunk/src/libopenvrml/openvrml/event.h
===================================================================
--- trunk/src/libopenvrml/openvrml/event.h 2010-07-09 16:22:15 UTC (rev 4158)
+++ trunk/src/libopenvrml/openvrml/event.h 2010-07-09 16:44:47 UTC (rev 4159)
@@ -57,7 +57,7 @@
template <typename FieldValue>
- class OPENVRML_API field_value_listener : public virtual event_listener {
+ class field_value_listener : public virtual event_listener {
BOOST_CLASS_REQUIRE(FieldValue, openvrml, FieldValueConcept);
public:
@@ -240,7 +240,7 @@
template <typename FieldValue>
- class OPENVRML_API field_value_emitter : public virtual event_emitter {
+ class field_value_emitter : public virtual event_emitter {
BOOST_CLASS_REQUIRE(FieldValue, openvrml, FieldValueConcept);
public:
Property changes on: trunk/src/libopenvrml/openvrml/local/proto.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/libopenvrml/openvrml/local/proto.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.cpp:3736-3801
+ /branches/0.18/src/libopenvrml/openvrml/local/proto.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.cpp:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/local/proto.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/libopenvrml/openvrml/local/proto.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.h:3736-3801
+ /branches/0.18/src/libopenvrml/openvrml/local/proto.h:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/browser.cpp:3677-3689
/branches/node-modules/src/libopenvrml/openvrml/browser.cpp:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
/branches/node-modules/src/libopenvrml/openvrml/local/proto.h:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/scene.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/scene.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/scene.cpp:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/scene.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/scene.cpp:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/scene.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/scene.h:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/scene.h:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/scene.h:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/scene.h:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/scene.h:3736-3801
Property changes on: trunk/src/libopenvrml/openvrml/script.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/script.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/script.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/script.cpp:3736-3801
+ /branches/0.17/src/libopenvrml/openvrml/script.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748,3750,3752,3754,3757,3759-3760,3764,3766,3824,3828,3836
/branches/0.18/src/libopenvrml/openvrml/script.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/libopenvrml/openvrml/script.cpp:3736-3801
Property changes on: trunk/src/mozilla-plugin
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/mozilla-plugin:3951,3953,3955,3960,3994,4104,4110,4152
+ /branches/0.18/src/mozilla-plugin:3951,3955,3960,3994,4104,4110,4152
Property changes on: trunk/src/node/vrml97/register_node_metatypes.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/vrml97node.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/vrml97/register_node_metatypes.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/vrml97node.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/vrml97node.cpp:3401-3734
+ /branches/0.17/src/libopenvrml/openvrml/vrml97node.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/vrml97/register_node_metatypes.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/vrml97node.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/vrml97node.cpp:3401-3734
Property changes on: trunk/src/node/x3d-cad-geometry/cad_face.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/cad_face.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/cad_face.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/cad_face.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/cad_face.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/cad_face.h:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/cad_face.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/indexed_quad_set.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.cpp:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/indexed_quad_set.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
+ /branches/0.18/src/node/x3d-cad-geometry/indexed_quad_set.h:3951,3955,3960,3994,4104,4110,4152
/branches/node-modules/src/node/x3d-cad-geometry/indexed_quad_set.h:3736-3801
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3630
Property changes on: trunk/src/node/x3d-cad-geometry/register_node_metatypes.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/x3d-cad-geometry/register_node_metatypes.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3734
+ /branches/0.17/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3713,3717,3719,3721,3725,3730,3732
/branches/0.18/src/node/x3d-cad-geometry/register_node_metatypes.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3677-3689
/trunk/src/libopenvrml/openvrml/x3d_cad_geometry.cpp:3401-3734
Property changes on: trunk/src/node/x3d-core/metadata_double.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_double.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_double.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_double.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_double.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_double.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_double.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_double.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_double.h:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_double.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_double.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_float.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_float.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_float.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_float.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_float.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_float.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_float.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_float.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_float.h:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_float.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_float.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_integer.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_integer.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_integer.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_integer.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_integer.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_integer.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_integer.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_integer.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_integer.h:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_integer.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_integer.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_set.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_set.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_set.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_set.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_set.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_set.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_set.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_set.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_set.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_set.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_set.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_set.h:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_set.h:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_set.h:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_string.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_string.cpp:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_string.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_string.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
+ /branches/0.18/src/node/x3d-core/metadata_string.cpp:3951,3955,3960,3994,4104,4110,4152
/branches/local/src/node/x3d-core/metadata_string.cpp:3677-3689
/branches/node-modules/src/node/x3d-core/metadata_string.cpp:3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688,3736-3801
Property changes on: trunk/src/node/x3d-core/metadata_string.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.18/src/node/x3d-core/metadata_string.h:3951,3953,3955,3960,3994,4104,4110,4152
/branches/local/src/...
[truncated message content] |
|
From: <br...@us...> - 2010-07-10 06:50:37
|
Revision: 4162
http://openvrml.svn.sourceforge.net/openvrml/?rev=4162&view=rev
Author: braden
Date: 2010-07-10 06:50:29 +0000 (Sat, 10 Jul 2010)
Log Message:
-----------
Fixed to compile without OPENVRML_ENABLE_RENDER_TEXT_NODE.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-09 17:05:15 UTC (rev 4161)
+++ trunk/ChangeLog 2010-07-10 06:50:29 UTC (rev 4162)
@@ -1,3 +1,8 @@
+2010-07-10 Braden McDaniel <br...@en...>
+
+ * src/node/vrml97/text.cpp: Fixed to compile without
+ OPENVRML_ENABLE_RENDER_TEXT_NODE.
+
2010-07-09 Braden McDaniel <br...@en...>
Removed OPENVRML_API from event listener/emitter class templates.
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-07-09 17:05:15 UTC (rev 4161)
+++ trunk/src/node/vrml97/text.cpp 2010-07-10 06:50:29 UTC (rev 4162)
@@ -130,6 +130,7 @@
max_extent_exposedfield max_extent_;
openvrml::sfbool solid_;
+# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
class glyph_geometry {
std::vector<openvrml::vec2f> coord_;
std::vector<openvrml::int32> coord_index_;
@@ -225,7 +226,6 @@
boost::scoped_ptr<text_geometry> text_geometry_;
-# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
typedef std::vector<std::vector<char32_t> > ucs4_string_t;
typedef std::map<FT_UInt, glyph_geometry> glyph_geometry_map_t;
@@ -620,6 +620,8 @@
* @brief maxExtent exposedField.
*/
+# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
+
/**
* @internal
*
@@ -654,8 +656,6 @@
* glyph.
*/
-# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
-
/**
* @internal
*
@@ -1219,7 +1219,6 @@
}
return 0;
}
-# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
/**
* @brief Construct from a set of contours.
@@ -1238,7 +1237,6 @@
advance_width_(0),
advance_height_(0)
{
-# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
using std::vector;
FT_Error error = FT_Err_Ok;
@@ -1282,7 +1280,6 @@
get_polygons_(glyphContours.contours);
std::for_each(polygons.begin(), polygons.end(),
draw_glyph_polygon(this->coord_, this->coord_index_));
-# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
}
/**
@@ -1923,6 +1920,7 @@
* glyph_geometry_map for rapid retrieval the next time the glyph is
* encountered.
*/
+# endif // OPENVRML_ENABLE_RENDER_TEXT_NODE
/**
* @var text_node::text_geometry text_node::text_geometry_
@@ -1958,8 +1956,10 @@
*/
text_node::~text_node() OPENVRML_NOTHROW
{
+# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
// shutdown sets this->face to 0.
assert(this->face == 0);
+# endif
}
/**
@@ -1984,6 +1984,7 @@
void text_node::do_render_geometry(openvrml::viewer & v,
openvrml::rendering_context)
{
+# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
using openvrml::int32;
if (this->text_geometry_) {
v.insert_shell(*this,
@@ -1997,6 +1998,7 @@
this->text_geometry_->tex_coord(),
std::vector<int32>()); // texCoordIndex
}
+# endif
if (this->font_style_.value()) {
this->font_style_.value()->modified(false);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-07-12 04:46:30
|
Revision: 4164
http://openvrml.svn.sourceforge.net/openvrml/?rev=4164&view=rev
Author: braden
Date: 2010-07-12 04:46:23 +0000 (Mon, 12 Jul 2010)
Log Message:
-----------
Only call FcInit for non-Windows platforms.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/node/vrml97/text.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-10 06:53:06 UTC (rev 4163)
+++ trunk/ChangeLog 2010-07-12 04:46:23 UTC (rev 4164)
@@ -1,3 +1,9 @@
+2010-07-12 Braden McDaniel <br...@en...>
+
+ * src/node/vrml/text.cpp
+ (openvrml_node_vrml97::text_metatype::text_metatype(openvrml::browser&):
+ Only call FcInit for non-Windows platforms.
+
2010-07-10 Braden McDaniel <br...@en...>
* src/node/vrml97/text.cpp: Fixed to compile without
Modified: trunk/src/node/vrml97/text.cpp
===================================================================
--- trunk/src/node/vrml97/text.cpp 2010-07-10 06:53:06 UTC (rev 4163)
+++ trunk/src/node/vrml97/text.cpp 2010-07-12 04:46:23 UTC (rev 4164)
@@ -2764,10 +2764,12 @@
node_metatype(text_metatype::id, browser)
{
# ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE
+# ifndef _WIN32
FcBool fc_succeeded = FcInit();
if (!fc_succeeded) {
browser.err("error initializing fontconfig library");
}
+# endif
FT_Error ft_error = 0;
ft_error = FT_Init_FreeType(&this->freeTypeLibrary);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-08-01 06:44:33
|
Revision: 4166
http://openvrml.svn.sourceforge.net/openvrml/?rev=4166&view=rev
Author: braden
Date: 2010-08-01 06:44:24 +0000 (Sun, 01 Aug 2010)
Log Message:
-----------
Added doc-comments for OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE and supporting macros.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/node_impl_util.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-12 04:50:01 UTC (rev 4165)
+++ trunk/ChangeLog 2010-08-01 06:44:24 UTC (rev 4166)
@@ -1,3 +1,9 @@
+2010-08-01 Braden McDaniel <br...@en...>
+
+ * src/libopenvrml/openvrml/node_impl_util.cpp: Added doc-comments
+ for OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE and supporting
+ macros.
+
2010-07-12 Braden McDaniel <br...@en...>
* src/node/vrml/text.cpp
Modified: trunk/src/libopenvrml/openvrml/node_impl_util.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node_impl_util.cpp 2010-07-12 04:50:01 UTC (rev 4165)
+++ trunk/src/libopenvrml/openvrml/node_impl_util.cpp 2010-08-01 06:44:24 UTC (rev 4166)
@@ -2,7 +2,7 @@
//
// OpenVRML
//
-// Copyright 2005, 2006, 2007 Braden McDaniel
+// Copyright 2005, 2006, 2007, 2010 Braden McDaniel
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
@@ -27,21 +27,130 @@
*/
/**
+ * @def OPENVRML_NODE_INTERFACE_TUPLE_ELEM(index, tuple)
+ *
+ * @internal
+ *
+ * @brief Get an element of a node interface tuple.
+ *
+ * @param index an index value from 0–3.
+ * @param tuple a node interface
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
+ * as described for use with
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ */
+
+/**
+ * @def OPENVRML_DEFINE_NODE_INTERFACE(interface_tuple)
+ *
+ * @internal
+ *
+ * @brief Create an @c openvrml::node_interface from an interface tuple.
+ *
+ * @param interface_tuple a node interface
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
+ * as described for use with
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ */
+
+/**
+ * @def OPENVRML_DEFINE_SUPPORTED_INTERFACES_ELEM(r, data, i, elem)
+ *
+ * @internal
+ *
+ * @brief A helper macro used with
+ * @c <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/ref/seq_for_each_i.html">
+ * BOOST_PP_SEQ_FOR_EACH_I</a>.
+ *
+ * @param r not used.
+ * @param data not used.
+ * @param i the index of the current repetition.
+ * @param elem a node interface
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
+ * as described for use with
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ */
+
+/**
+ * @def OPENVRML_SUPPORTED_INTERFACES_TYPE(interface_seq)
+ *
+ * @internal
+ *
+ * @brief The type of an array of supported @c openvrml::node_interface%s for
+ * a @c openvrml::node_metatype.
+ *
+ * This is a helper macro used in the implementation of
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ *
+ * @param interface_seq a <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/sequences.html">
+ * Boost.Preprocessor sequence</a> of
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuples</a>,
+ * as provided to
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ */
+
+/**
+ * @def OPENVRML_ADD_INTERFACE(node_type_obj, interface_type, supported_interface, node, handler)
+ *
+ * @internal
+ *
+ * @brief A helper macro used to implement @c OPENVRML_ADD_INTERFACE_TUPLE.
+ *
+ * @param node_type_obj a concrete @c openvrml::node_type instance.
+ * @param interface_type a node interface type name, in all lower-case, as
+ * described for use in the interface tuple
+ * provided to
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @param supported_interface a @c openvrml::node_interface.
+ * @param node a @c openvrml::node instance type.
+ * @param handler the name of a @p node member function that
+ * implements the node interface.
+ */
+
+/**
+ * @def OPENVRML_ADD_INTERFACE_TUPLE(node_type_obj, node_instance_type, node_interface, interface_tuple)
+ *
+ * @internal
+ *
+ * @brief A helper macro used to implement
+ * @c OPENVRML_ADD_INTERFACE_ALTERNATIVE.
+ *
+ * @param node_type_obj a concrete @c openvrml::node_type instance.
+ * @param node_instance_type a concrete @c openvrml::node instance type.
+ * @param node_interface a @c openvrml::node_interface.
+ * @param interface_tuple a node interface
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
+ * as described for use with
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ */
+
+/**
+ * @def OPENVRML_ADD_INTERFACE_ALTERNATIVE(r, data, elem)
+ *
+ * @internal
+ *
+ * @brief A helper macro used with
+ * @c <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/ref/seq_for_each.html">
+ * BOOST_PP_SEQ_FOR_EACH</a>.
+ *
+ * @param r not used.
+ * @param data a <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">Boost.Preprocessor tuple</a> consisting of
+ * variable names for:
+ * -# the @c openvrml::node_interface that is the subject of the
+ * current iteration;
+ * -# an iterator for the set of supported interfaces;
+ * -# the concrete @c openvrml::node_type instance;
+ * -# the concrete @c node type.
+ * @param elem
+ *
+ * This macro is used in the implementation of
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ */
+
+/**
* @def OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE(namespace_scope, node_metatype_type, node_instance_type, interface_seq)
*
- * @param namespace_scope the namespace scope where @p node_instance_type
- * is defined.
- * @param node_metatype_type the name of the concrete
- * @c openvrml::node_metatype type for the node
- * implementation.
- * @param node_instance_type the name of the concrete @c openvrml::node type
- * for the node implementation.
- * @param interface_seq a <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/sequences.html">
- * Boost.Preprocessor sequence</a> of
- * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuples</a>
- * defining the supported interfaces for the node
- * implementation and the @p node_instance_type
- * member that implements them.
+ * @brief Implement @c openvrml::node_metatype::do_create_type.
*
* @p interface_seq consists of tuples of the following form:
* <pre>
@@ -72,6 +181,20 @@
*
* In this example, @c set_wiggly_listener, @c wiggly, and @c height_field are
* all members of the @c my_node class.
+ *
+ * @param namespace_scope the namespace scope where @p node_instance_type
+ * is defined.
+ * @param node_metatype_type the name of the concrete
+ * @c openvrml::node_metatype type for the node
+ * implementation.
+ * @param node_instance_type the name of the concrete @c openvrml::node type
+ * for the node implementation.
+ * @param interface_seq a <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/sequences.html">
+ * Boost.Preprocessor sequence</a> of
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuples</a>
+ * defining the supported interfaces for the node
+ * implementation and the @p node_instance_type
+ * member that implements them.
*/
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-08-01 07:02:40
|
Revision: 4167
http://openvrml.svn.sourceforge.net/openvrml/?rev=4167&view=rev
Author: braden
Date: 2010-08-01 07:02:34 +0000 (Sun, 01 Aug 2010)
Log Message:
-----------
Removed obsolete reference to OPENVRML_FT_CONST.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-01 06:44:24 UTC (rev 4166)
+++ trunk/ChangeLog 2010-08-01 07:02:34 UTC (rev 4167)
@@ -1,5 +1,9 @@
2010-08-01 Braden McDaniel <br...@en...>
+ * README: Removed obsolete reference to OPENVRML_FT_CONST.
+
+2010-08-01 Braden McDaniel <br...@en...>
+
* src/libopenvrml/openvrml/node_impl_util.cpp: Added doc-comments
for OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE and supporting
macros.
Modified: trunk/README
===================================================================
--- trunk/README 2010-08-01 06:44:24 UTC (rev 4166)
+++ trunk/README 2010-08-01 07:02:34 UTC (rev 4167)
@@ -308,10 +308,6 @@
Include support for rendering text using the Text node. Requires
fontconfig and FreeType.
- OPENVRML_FT_CONST
- Define to "const" if "const" should be used in FreeType callback
- function signatures; define to empty otherwise.
-
OPENVRML_JNI_CONST
Define to "const" if "const" should be used in JNI function
signatures; define to empty otherwise.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-08-07 20:57:52
|
Revision: 4168
http://openvrml.svn.sourceforge.net/openvrml/?rev=4168&view=rev
Author: braden
Date: 2010-08-07 20:57:46 +0000 (Sat, 07 Aug 2010)
Log Message:
-----------
Doc-comment improvements.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/node.cpp
trunk/src/libopenvrml/openvrml/node_impl_util.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-01 07:02:34 UTC (rev 4167)
+++ trunk/ChangeLog 2010-08-07 20:57:46 UTC (rev 4168)
@@ -1,3 +1,10 @@
+2010-08-07 Braden McDaniel <br...@en...>
+
+ Doc-comment improvements.
+
+ * src/libopenvrml/openvrml/node.cpp
+ * src/libopenvrml/openvrml/node_impl_util.cpp
+
2010-08-01 Braden McDaniel <br...@en...>
* README: Removed obsolete reference to OPENVRML_FT_CONST.
Modified: trunk/src/libopenvrml/openvrml/node.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node.cpp 2010-08-01 07:02:34 UTC (rev 4167)
+++ trunk/src/libopenvrml/openvrml/node.cpp 2010-08-07 20:57:46 UTC (rev 4168)
@@ -725,8 +725,8 @@
* @c node_metatype can be thought of as a “supertype” of sorts.
* A given node implementation can support as many node types as there are
* unique combinations of the interfaces it supports. The most readily
- * apparent role of the @c node_metatype object for a node implementation is to
- * serve as a factory for these @c node_type%s.
+ * apparent role of the @c node_metatype object for a node implementation is
+ * to serve as a factory for these @c node_type%s.
*/
/**
@@ -887,6 +887,9 @@
*
* @brief Create a new @c node_type.
*
+ * Most %node implementations can use
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE to implement this function.
+ *
* @param[in] id the name for the new @c node_type.
* @param[in] interfaces a @c node_interface_set containing the
* interfaces for the new type.
@@ -899,6 +902,7 @@
* @exception std::bad_alloc if memory allocation fails.
*
* @sa #create_type
+ * @sa OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE
* @sa http://boost.org/libs/smart_ptr/shared_ptr.htm
*/
@@ -983,6 +987,18 @@
* @class openvrml::node_type openvrml/node.h
*
* @brief Type information object for @c node%s.
+ *
+ * Each implementation of a %node in %OpenVRML must have an associated
+ * concrete @c node_type that is capable of creating @c node%s with any subset
+ * of the implementation's supported %node interfaces. Because these can be
+ * somewhat tedious to create, %OpenVRML includes a good deal of machinery to
+ * facilitate the implementation of these classes. For most %node
+ * implementations, using @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE to
+ * implement @c node_metatype::do_create_type will generate an appropriate
+ * concrete @c node_type.
+ *
+ * @sa node_metatype::create_type
+ * @sa OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE
*/
/**
Modified: trunk/src/libopenvrml/openvrml/node_impl_util.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node_impl_util.cpp 2010-08-01 07:02:34 UTC (rev 4167)
+++ trunk/src/libopenvrml/openvrml/node_impl_util.cpp 2010-08-07 20:57:46 UTC (rev 4168)
@@ -31,13 +31,15 @@
*
* @internal
*
+ * @hideinitializer
+ *
* @brief Get an element of a node interface tuple.
*
* @param index an index value from 0–3.
* @param tuple a node interface
* <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
* as described for use with
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*/
/**
@@ -45,12 +47,14 @@
*
* @internal
*
+ * @hideinitializer
+ *
* @brief Create an @c openvrml::node_interface from an interface tuple.
*
* @param interface_tuple a node interface
* <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
* as described for use with
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*/
/**
@@ -58,6 +62,8 @@
*
* @internal
*
+ * @hideinitializer
+ *
* @brief A helper macro used with
* @c <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/ref/seq_for_each_i.html">
* BOOST_PP_SEQ_FOR_EACH_I</a>.
@@ -68,7 +74,7 @@
* @param elem a node interface
* <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
* as described for use with
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*/
/**
@@ -76,17 +82,19 @@
*
* @internal
*
+ * @hideinitializer
+ *
* @brief The type of an array of supported @c openvrml::node_interface%s for
* a @c openvrml::node_metatype.
*
* This is a helper macro used in the implementation of
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*
* @param interface_seq a <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/sequences.html">
* Boost.Preprocessor sequence</a> of
* <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuples</a>,
* as provided to
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*/
/**
@@ -94,13 +102,15 @@
*
* @internal
*
- * @brief A helper macro used to implement @c OPENVRML_ADD_INTERFACE_TUPLE.
+ * @hideinitializer
*
+ * @brief A helper macro used to implement @c #OPENVRML_ADD_INTERFACE_TUPLE.
+ *
* @param node_type_obj a concrete @c openvrml::node_type instance.
* @param interface_type a node interface type name, in all lower-case, as
* described for use in the interface tuple
* provided to
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
* @param supported_interface a @c openvrml::node_interface.
* @param node a @c openvrml::node instance type.
* @param handler the name of a @p node member function that
@@ -112,8 +122,10 @@
*
* @internal
*
+ * @hideinitializer
+ *
* @brief A helper macro used to implement
- * @c OPENVRML_ADD_INTERFACE_ALTERNATIVE.
+ * @c #OPENVRML_ADD_INTERFACE_ALTERNATIVE.
*
* @param node_type_obj a concrete @c openvrml::node_type instance.
* @param node_instance_type a concrete @c openvrml::node instance type.
@@ -121,7 +133,7 @@
* @param interface_tuple a node interface
* <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">tuple</a>
* as described for use with
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*/
/**
@@ -129,6 +141,8 @@
*
* @internal
*
+ * @hideinitializer
+ *
* @brief A helper macro used with
* @c <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/ref/seq_for_each.html">
* BOOST_PP_SEQ_FOR_EACH</a>.
@@ -144,15 +158,27 @@
* @param elem
*
* This macro is used in the implementation of
- * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE.
*/
/**
* @def OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE(namespace_scope, node_metatype_type, node_instance_type, interface_seq)
*
+ * @hideinitializer
+ *
* @brief Implement @c openvrml::node_metatype::do_create_type.
*
- * @p interface_seq consists of tuples of the following form:
+ * Most significantly, @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE
+ * generates a concrete @c openvrml::node_type implementation; by using this
+ * macro to implement @c openvrml::node_metatype::do_create_type, one can
+ * avoid manually creating a concrete @c openvrml::node_type.
+ *
+ * @c OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE is instantiated using a
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/index.html">
+ * Boost.Preprocessor</a> <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/sequences.html">sequence</a> of
+ * <a href="http://www.boost.org/doc/libs/release/libs/preprocessor/doc/data/tuples.html">
+ * tuples</a>. @p interface_seq consists of tuples of the following form:
+ *
* <pre>
* (@e interface-type, @e value-type, @e interface-id, @e handler)
* </pre>
@@ -195,6 +221,8 @@
* defining the supported interfaces for the node
* implementation and the @p node_instance_type
* member that implements them.
+ *
+ * @sa openvrml::node_metatype::do_create_type
*/
/**
@@ -406,9 +434,16 @@
/**
* @class openvrml::node_impl_util::node_type_impl openvrml/node_impl_util.h
*
- * @brief A template for concrete @c node_types.
+ * @brief A template for concrete @c node_type%s.
*
+ * @c node_type_impl is instantiated by
+ * @c #OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE to provide a concrete
+ * @c node_type implementation. Most node implementations can simply use that
+ * macro and consider this class template an implementation detail.
+ *
* @tparam Node a concrete node type.
+ *
+ * @sa OPENVRML_NODE_IMPL_UTIL_DEFINE_DO_CREATE_TYPE
*/
/**
@@ -1187,7 +1222,7 @@
* @brief Concrete pointer-to-member wrapper.
*
* @tparam EventEmitterMember the type of an @c openvrml::event_emitter
- * member of Node.
+ * member of @p Node.
*/
/**
@@ -1204,7 +1239,7 @@
*
* @brief Make an @c #event_emitter_ptr_ptr to a field member of a node.
*
- * @tparam EventEmitterMember an @c event_emitter member of Node.
+ * @tparam EventEmitterMember an @c event_emitter member of @p Node.
* @tparam DeducedNode the deduced type of the node may differ from
* its actual concrete type in the contexts in
* which this function is used. We @c static_cast
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2010-08-12 08:13:25
|
Revision: 4169
http://openvrml.svn.sourceforge.net/openvrml/?rev=4169&view=rev
Author: braden
Date: 2010-08-12 08:13:13 +0000 (Thu, 12 Aug 2010)
Log Message:
-----------
Updates for Doxygen 1.7.1.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/Doxyfile
trunk/doc/Makefile.am
trunk/doc/doxygen-header
Removed Paths:
-------------
trunk/doc/manual/tab_b-openvrml.png
trunk/doc/manual/tab_l-openvrml.png
trunk/doc/manual/tab_r-openvrml.png
Property Changed:
----------------
trunk/doc/manual/
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-07 20:57:46 UTC (rev 4168)
+++ trunk/ChangeLog 2010-08-12 08:13:13 UTC (rev 4169)
@@ -1,3 +1,14 @@
+2010-08-12 Braden McDaniel <br...@en...>
+
+ Updates for Doxygen 1.7.1.
+
+ * doc/Doxyfile
+ * doc/Makefile.am
+ * doc/doxygen-header
+ * doc/manual/tab_l-openvrml.png: Removed.
+ * doc/manual/tab_b-openvrml.png: Removed.
+ * doc/manual/tab_r-openvrml.png: Removed.
+
2010-08-07 Braden McDaniel <br...@en...>
Doc-comment improvements.
Modified: trunk/doc/Doxyfile
===================================================================
--- trunk/doc/Doxyfile 2010-08-07 20:57:46 UTC (rev 4168)
+++ trunk/doc/Doxyfile 2010-08-12 08:13:13 UTC (rev 4169)
@@ -1,4 +1,4 @@
-# Doxyfile 1.6.1
+# Doxyfile 1.7.1
#---------------------------------------------------------------------------
# Project related configuration options
@@ -47,14 +47,15 @@
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
-HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
+HIDE_FRIEND_COMPOUNDS = YES
HIDE_IN_BODY_DOCS = YES
-INTERNAL_DOCS = YES
+INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
+FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
@@ -137,11 +138,17 @@
HTML_FOOTER = doxygen-footer
HTML_TIMESTAMP = NO
HTML_STYLESHEET =
+HTML_COLORSTYLE_HUE = 0
+HTML_COLORSTYLE_SAT = 0
+HTML_COLORSTYLE_GAMMA = 100
+HTML_TIMESTAMP = NO
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
@@ -157,13 +164,18 @@
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
+GENERATE_ECLIPSEHELP = NO
+ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 1
GENERATE_TREEVIEW = NO
USE_INLINE_TREES = NO
TREEVIEW_WIDTH = 250
+EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
+FORMULA_TRANSPARENT = YES
SEARCHENGINE = NO
+SERVER_BASED_SEARCH = NO
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
@@ -252,6 +264,7 @@
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
+DOT_NUM_THREADS = 0
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
Modified: trunk/doc/Makefile.am
===================================================================
--- trunk/doc/Makefile.am 2010-08-07 20:57:46 UTC (rev 4168)
+++ trunk/doc/Makefile.am 2010-08-12 08:13:13 UTC (rev 4169)
@@ -59,20 +59,25 @@
$(srcdir)/manual/*.html \
$(srcdir)/manual/*.map \
$(srcdir)/manual/*.md5 \
+ $(srcdir)/manual/*__incl.png \
$(srcdir)/manual/*inherit__graph*.png \
+ $(srcdir)/manual/bc_s.png \
+ $(srcdir)/manual/closed.png \
$(srcdir)/manual/doxygen.png \
$(srcdir)/manual/formula.repository \
$(srcdir)/manual/form_*.png \
- $(srcdir)/manual/graph_legend.dot \
$(srcdir)/manual/graph_legend.png \
- $(srcdir)/manual/tab_?.gif
+ $(srcdir)/manual/nav_f.png \
+ $(srcdir)/manual/nav_h.png \
+ $(srcdir)/manual/open.png \
+ $(srcdir)/manual/tab_a.png \
+ $(srcdir)/manual/tab_b.png \
+ $(srcdir)/manual/tab_h.png \
+ $(srcdir)/manual/tab_s.png
CUSTOMIZED_IMAGES = \
$(srcdir)/manual/OGL_sm_wht.png \
- $(srcdir)/manual/x3d-white-on-black.png \
- $(srcdir)/manual/tab_b-openvrml.png \
- $(srcdir)/manual/tab_l-openvrml.png \
- $(srcdir)/manual/tab_r-openvrml.png
+ $(srcdir)/manual/x3d-white-on-black.png
JAVADOC_FILES = \
$(srcdir)/javadoc/*.html \
Modified: trunk/doc/doxygen-header
===================================================================
--- trunk/doc/doxygen-header 2010-08-07 20:57:46 UTC (rev 4168)
+++ trunk/doc/doxygen-header 2010-08-12 08:13:13 UTC (rev 4169)
@@ -12,52 +12,24 @@
<link rel="index" href="functions" title="OpenVRML Compound Members">
<link rel="appendix" href="conformance" title="Conformance Test Results">
<style type="text/css">
+@import url("doxygen.css");
@import url("tabs.css");
@import url("http://openvrml.org/openvrml.css");
-h2 {
- border-bottom-style: solid;
- border-bottom-width: 1px;
+body, table, div, p, dl {
+ font-family: inherit;
+ font-size: inherit;
}
-/*
- * Doxygen as of 1.5.4-20071217 uses the class "navpath" instead of "nav".
- * For now, we'll do both.
- */
-
-div.nav,
-div.navpath {
- background-color: transparent;
- text-align: left;
- margin-top: 1em;
- margin-bottom: 1em;
- border-color: black;
- border-left: none;
- border-right: none;
- padding-top: 0.5em;
- padding-bottom: 0.5em;
+a:hover {
+ text-decoration: none;
}
-div.nav :link, div.nav :visited,
-div.navpath :link, div.navpath :visited {
- border-width: 1px;
- border-style: solid;
- border-color: silver;
- padding: 2px;
+h2 {
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
}
-div.nav :link:hover, div.nav :visited:hover,
-div.navpath :link:hover, div.navpath :visited:hover {
- border-style: outset;
- border-color: gray;
-}
-
-div.nav :active,
-div.navpath :active {
- border-style: inset;
- border-color: gray;
-}
-
.body td {
background-color: transparent;
}
@@ -91,9 +63,13 @@
line-height: 1.2em;
}
+table.memberdecls {
+ width: 100%;
+}
+
td.memItemLeft, td.memItemRight,
td.memTemplParams, td.memTemplItemLeft, td.memTemplItemRight,
-.memtemplate, .memname td {
+.memtemplate, .memname td, .navpath li {
font-family: Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Lucida Console", LucidaTypewriter, monospace;
}
@@ -187,23 +163,10 @@
font-weight: inherit;
}
-div.tabs {
- background-image: url("tab_b-openvrml.png");
+.tablist a, .tablist a:hover {
+ border-style: none;
}
-div.tabs span {
- background-image: url("tab_l-openvrml.png");
-}
-
-div.tabs a {
- background-image: url("tab_r-openvrml.png");
- border-bottom: 1px solid #a5a5a5;
-}
-
-div.tabs a:link, div.tabs a:visited, div.tabs a:active, div.tabs a:hover {
- color: black;
-}
-
table {
border-collapse: collapse;
border-spacing: 0;
@@ -216,7 +179,7 @@
margin-right: 10%;
}
-h1 + h3 {
+h3.version {
text-align: center;
}
@@ -259,6 +222,18 @@
background-color: transparent;
border-style: none;
}
+
+div.header {
+ background-image: url("nav_h-openvrml.png");
+ background-color: rgb(98%, 98%, 98%);
+ border-color: black;
+}
+
+address.footer {
+ text-align: left;
+ padding-right: 0;
+ line-height: 3.0ex;
+}
</style>
</head>
<body>
Property changes on: trunk/doc/manual
___________________________________________________________________
Modified: svn:ignore
- *.css
*.dot
*.html
*.map
*.md5
*inherit__graph*.png
*__incl.png
doxygen.png
form_*.png
formula.repository
graph_legend.*
tab_?.gif
_formulas.tex
+ *.css
*.dot
*.html
*.map
*.md5
*inherit__graph*.png
*__incl.png
doxygen.png
form_*.png
formula.repository
graph_legend.*
bc_s.png
open.png
closed.png
nav_?.png
tab_?.png
_formulas.tex
Deleted: trunk/doc/manual/tab_b-openvrml.png
===================================================================
(Binary files differ)
Deleted: trunk/doc/manual/tab_l-openvrml.png
===================================================================
(Binary files differ)
Deleted: trunk/doc/manual/tab_r-openvrml.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|