Esempio n. 1
0
void
CSVGStroke::
update(const CSVGStroke &stroke)
{
  if (stroke.getColorValid())
    setColor(stroke.getColor());

  if (stroke.getOpacityValid())
    setOpacity(stroke.getOpacity());

  if (stroke.getWidthValid())
    setWidth(stroke.getWidth());

  if (stroke.getDashValid())
    setDash(stroke.getDash());

  if (stroke.getLineCapValid())
    setLineCap(stroke.getLineCap());

  if (stroke.getLineJoinValid())
    setLineJoin(stroke.getLineJoin());

  if (stroke.getMitreLimitValid())
    setMitreLimit(stroke.getMitreLimit());
}
Esempio n. 2
0
void
CSVGStroke::
setMitreLimit(const string &limit_str)
{
  double limit;

  if (svg_.lengthToReal(limit_str, &limit))
    setMitreLimit(limit);
}
Esempio n. 3
0
// public
BufferParameters::BufferParameters(int quadrantSegments,
                                   EndCapStyle endCapStyle,
                                   JoinStyle joinStyle,
                                   double mitreLimit)
	:
	quadrantSegments(DEFAULT_QUADRANT_SEGMENTS),
	endCapStyle(CAP_ROUND),
	joinStyle(JOIN_ROUND),
	mitreLimit(DEFAULT_MITRE_LIMIT),
	_isSingleSided(false)
{
	setQuadrantSegments(quadrantSegments);
	setEndCapStyle(endCapStyle);
	setJoinStyle(joinStyle);
	setMitreLimit(mitreLimit);
}