module Chitra
Defined in:
chitra.crcontext.cr
elements/background.cr
elements/composite.cr
elements/image.cr
elements/line.cr
elements/markup.cr
elements/markup_tokens.cr
elements/new_page.cr
elements/oval.cr
elements/polygon.cr
elements/properties.cr
elements/rect.cr
elements/rotate.cr
elements/scale.cr
elements/text.cr
elements/translate.cr
helpers.cr
surfaces/pdf.cr
surfaces/png.cr
surfaces/svg.cr
Constant Summary
-
RAINBOW_COLORS =
["#9400D3", "#4B0082", "#0000FF", "#00FF00", "#FFFF00", "#FF7F00", "#FF0000"]
Constructors
-
.new(w, h = 0)
Initialize the Chitra drawing Context
# width height ctx = Chitra.new 1600, 900
-
.new
Initialize the Chitra drawing Context with default surface size
ctx = Chitra.new
Class Method Summary
- .global_context
- .global_context=(global_context)
- .image_surface(path)
-
.resolution(val)
Set resolution Default value is 72 ppi
Chitra.resolution 300 ctx = Chitra.new 297.mm, 210.mm ctx.rect 10.mm, 10.mm, 500
- .resolution
Constructor Detail
def self.new(w, h = 0)
#
Initialize the Chitra drawing Context
# width height
ctx = Chitra.new 1600, 900
Class Method Detail
def self.resolution(val)
#
Set resolution Default value is 72 ppi
Chitra.resolution 300
ctx = Chitra.new 297.mm, 210.mm
ctx.rect 10.mm, 10.mm, 500