Skip to content

Commit

Permalink
Default line_width to 1 for cairo
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Mar 12, 2024
1 parent 137f49e commit 292e9d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/backend_cairo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ let set_background ctx color =
Cairo.fill ctx.cairo_ctx

(** Sets the width of lines for both stroke of shapes and line primitives.
Can be any positive integer, with larger numbers producing thicker lines.
default is 2 *)
Can be any positive integer, with larger numbers producing thicker lines. *)
let set_line_width ctx line_width =
Cairo.set_line_width ctx.cairo_ctx (float_of_int line_width)

Expand Down
2 changes: 1 addition & 1 deletion lib/joy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type context = Context.context
let show = Context.show
let set_line_width = Context.set_line_width

let init ?(size = (500, 500)) ?(line_width = 2) ?(axes = false) _ =
let init ?(size = (500, 500)) ?(line_width = 1) ?(axes = false) _ =
let ctx =
Backend_cairo.create ~background_color:Color.white ~size ~line_width ~axes
in
Expand Down

0 comments on commit 292e9d6

Please sign in to comment.