BridgeContext ctx) {
// percentages and units are relative to the strokedElement's viewport
UnitProcessor.Context uctx
= UnitProcessor.createContext(ctx, strokedElement);
CSSOMReadOnlyStyleDeclaration decl
= CSSUtilities.getComputedStyle(strokedElement);
CSSValue v;
v = decl.getPropertyCSSValueInternal(CSS_STROKE_WIDTH_PROPERTY);
float width = UnitProcessor.cssOtherLengthToUserSpace
(v, CSS_STROKE_WIDTH_PROPERTY, uctx);
v = decl.getPropertyCSSValueInternal(CSS_STROKE_LINECAP_PROPERTY);
int linecap = convertStrokeLinecap((CSSPrimitiveValue)v);
v = decl.getPropertyCSSValueInternal(CSS_STROKE_LINEJOIN_PROPERTY);
int linejoin = convertStrokeLinejoin((CSSPrimitiveValue)v);
v = decl.getPropertyCSSValueInternal(CSS_STROKE_MITERLIMIT_PROPERTY);
float miterlimit = convertStrokeMiterlimit((CSSPrimitiveValue)v);
v = decl.getPropertyCSSValueInternal(CSS_STROKE_DASHARRAY_PROPERTY);
float [] dasharray = convertStrokeDasharray(v, uctx);
float dashoffset = 0;
if (dasharray != null) {
v = decl.getPropertyCSSValueInternal
(CSS_STROKE_DASHOFFSET_PROPERTY);
dashoffset = UnitProcessor.cssOtherLengthToUserSpace
(v, CSS_STROKE_DASHOFFSET_PROPERTY, uctx);
}
return new BasicStroke(width,