diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-05-14 21:45:08 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-05-14 21:47:08 +0200 |
commit | d378597c30bcdacfc0d440d9b8d9e4224ac1f54e (patch) | |
tree | c632a28cf9f6b24e51fa911dad2f28a770561181 /lib/percept/src/egd_primitives.erl | |
parent | 8d8318ed72cd4f3a135c96e88deac1e7dfa89dad (diff) | |
download | otp-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.erl | 10 |
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]), |