1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
|
# File 'lib/epdfpw.rb', line 1243
def line_width(value=nil, units=nil)
return from_points(@units, @line_width || 0) if value.nil?
return from_points(value, @line_width || 0) if value.is_a?(Symbol)
prev_line_width = @line_width || 0
if !units.nil?
u, value = units.to_sym, value.to_f
elsif value.respond_to?(:to_str) and value =~ /\D+/
u, value = $&.to_sym, value.to_f
else
u = @units
end
@line_width = to_points(u, value)
from_points(@units, prev_line_width)
end
|