* examples/logo.sifz use transparent straight blends to do
* masking, which no longer works now that 'straight' blending is
* fixed.
+ *
+ * Tangent lengths calculated by the "Segment Tangent" and "BLine
+ * Tangent" ValueNodes were scaled by a factor of 0.5.
+ *
+ * 0.4: svn r1856
+ *
+ * Stop scaling tangents by 0.5.
*/
-#define CURRENT_CANVAS_VERSION "0.3"
+#define CURRENT_CANVAS_VERSION "0.4"
/* === T Y P E D E F S ===================================================== */
}
}
+ // pre 0.4 canvases had *calctangent outputs scaled down by 0.5 for some reason
+ if (element->get_name() == "blinecalctangent" || element->get_name() == "segcalctangent")
+ {
+ String version(canvas->get_version());
+ if (version == "0.1" || version == "0.2" || version == "0.3")
+ {
+ handle<LinkableValueNode> scale_value_node=LinkableValueNode::create("scale",type);
+ scale_value_node->set_link(scale_value_node->get_link_index_from_name("link"), value_node);
+ scale_value_node->set_link(scale_value_node->get_link_index_from_name("scalar"), ValueNode_Const::create(Real(0.5)));
+ value_node = scale_value_node;
+ }
+ }
+
return value_node;
}
switch (get_type())
{
- case ValueBase::TYPE_ANGLE: return (deriv(amount-from_vertex)*(0.5)).angle();
- case ValueBase::TYPE_VECTOR: return deriv(amount-from_vertex)*(0.5);
+ case ValueBase::TYPE_ANGLE: return deriv(amount-from_vertex).angle();
+ case ValueBase::TYPE_VECTOR: return deriv(amount-from_vertex);
default: assert(0); return ValueBase();
}
}
etl::hermite<Vector> curve(segment.p1,segment.p2,segment.t1,segment.t2);
etl::derivative< etl::hermite<Vector> > deriv(curve, 0.0001);
- return deriv((*amount_)(t).get(Real()))*(0.5);
+ return deriv((*amount_)(t).get(Real()));
}