Skip to content

Commit

Permalink
GC-LINE-STYLE is :DASH, not :ON-OFF-DASH
Browse files Browse the repository at this point in the history
Commit from #209 introduced a change that was not backward compatible breaking
preexisting software. I've updated tests too.
  • Loading branch information
dkochmanski committed Sep 11, 2024
1 parent 69f2ebb commit 52f457f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gcontext.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
(def-gc-accessor foreground card32)
(def-gc-accessor background card32)
(def-gc-accessor line-width card16)
(def-gc-accessor line-style (member :solid :on-off-dash :double-dash))
(def-gc-accessor line-style (member :solid :dash :double-dash))
(def-gc-accessor cap-style (member :not-last :butt :round :projecting))
(def-gc-accessor join-style (member :miter :round :bevel))
(def-gc-accessor fill-style (member :solid :tiled :stippled :opaque-stippled))
Expand Down
4 changes: 2 additions & 2 deletions manual/clx.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -5796,15 +5796,15 @@ than the odd dashes. The @var{:butt} style is used where even and odd
dashes meet (see paragraph 5.4.7, Fill-Rule and
Fill-Style).

@item :on-off-dash
@item :dash
Only the even dashes are drawn, with cap-style applied to all internal
ends of the individual dashes, except @var{:not-last} is treated as
@var{:butt}.
@end table

@table @var
@item line-style
One of @var{:on-off-dash}, @var{:double-dash}, or @var{:solid}.
One of @var{:dash}, @var{:double-dash}, or @var{:solid}.
@end table

@end defun
Expand Down
6 changes: 3 additions & 3 deletions tests/core-protocol.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@
(is (equalp (xlib:gcontext-join-style gc) :round))
(is (member (xlib:gcontext-line-style gc) '(:solid
:double-dash
:on-off-dash)))
:dash)))
(finishes (setf (xlib:gcontext-line-style gc) :double-dash))
(is (equalp (xlib:gcontext-line-style gc) :double-dash))
(finishes (setf (xlib:gcontext-line-style gc) :on-off-dash))
(is (equalp (xlib:gcontext-line-style gc) :on-off-dash))
(finishes (setf (xlib:gcontext-line-style gc) :dash))
(is (equalp (xlib:gcontext-line-style gc) :dash))
(is (typep (xlib:gcontext-line-width gc) 'xlib:card16))
(is (xlib:gcontext-p gc))
(is (not (xlib:gcontext-p root-window)))
Expand Down

0 comments on commit 52f457f

Please sign in to comment.