aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percept/src/egd_primitives.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-05-14 21:45:08 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-05-14 21:47:08 +0200
commitd378597c30bcdacfc0d440d9b8d9e4224ac1f54e (patch)
treec632a28cf9f6b24e51fa911dad2f28a770561181 /lib/percept/src/egd_primitives.erl
parent8d8318ed72cd4f3a135c96e88deac1e7dfa89dad (diff)
downloadotp-d378597c30bcdacfc0d440d9b8d9e4224ac1f54e.tar.gz
otp-d378597c30bcdacfc0d440d9b8d9e4224ac1f54e.tar.bz2
otp-d378597c30bcdacfc0d440d9b8d9e4224ac1f54e.zip
egd: Add line thickness algorithm for lines
Diffstat (limited to 'lib/percept/src/egd_primitives.erl')
-rw-r--r--lib/percept/src/egd_primitives.erl10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/percept/src/egd_primitives.erl b/lib/percept/src/egd_primitives.erl
index 388446cc15..b64189c552 100644
--- a/lib/percept/src/egd_primitives.erl
+++ b/lib/percept/src/egd_primitives.erl
@@ -71,15 +71,11 @@ object_info(O) ->
%% interface functions
line(#image{objects=Os}=I, Sp, Ep, Color) ->
- I#image{objects=[#image_object{
- type = line,
- points = [Sp, Ep],
- span = span([Sp, Ep]),
- color = Color}|Os]}.
+ line(#image{objects=Os}=I, Sp, Ep, 1, Color).
-line(#image{objects=Os}=I, Sp, Ep, Stroke, Color) ->
+line(#image{objects=Os}=I, Sp, Ep, Wd, Color) ->
I#image{objects=[#image_object{
- internals = Stroke,
+ internals = Wd,
type = line,
points = [Sp, Ep],
span = span([Sp, Ep]),