module Chitra

Defined in:

chitra.cr
context.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

Class Method Summary

Constructor Detail

def self.new(w, h = 0) #

Initialize the Chitra drawing Context

#                width height
ctx = Chitra.new 1600, 900

[View source]
def self.new #

Initialize the Chitra drawing Context with default surface size

ctx = Chitra.new

[View source]

Class Method Detail

def self.global_context #

[View source]
def self.global_context=(global_context) #

[View source]
def self.image_surface(path) #

[View source]
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

[View source]
def self.resolution #

[View source]