ADG Lua 

ADG Lua Commit Details

Date:2013-03-17 19:14:32 (6 years 8 months ago)
Author:Nicola Fontana
Branch:master
Commit:e7fc702428a27ee6f6b752d694c2a30024fbc8c5
Parents: e85424e9dc85718429e5991ed90ca354003a576b
Message:Corrected margin APIs and orientation

Changes:
Mpiston.lua (2 diffs)

File differences

piston.lua
360360
361361
362362
363
364
363
364
365365
366366
367367
......
376376
377377
378378
379
379
380380
381381
382382
-- The export format is guessed from the file suffix
local suffix = file:match('%..*$')
local size = canvas:get_size()
size.x = size.x + canvas:left_margin() + canvas:right_margin()
size.y = size.y + canvas:top_margin() + canvas:bottom_margin()
size.x = size.x + canvas:get_left_margin() + canvas:get_right_margin()
size.y = size.y + canvas:get_top_margin() + canvas:get_bottom_margin()
-- Create the cairo surface
local surface
surface = cairo.PsSurface.create(file, size.x, size.y)
surface:dsc_comment('%%Title: adg-lua demonstration program')
surface:dsc_comment('%%Copyright: Copyleft (C) 2013 Fontana Nicola')
surface:dsc_comment('%%Orientation: Landscape')
surface:dsc_comment('%%Orientation: Portrait')
surface:dsc_begin_setup()
surface:dsc_begin_page_setup()
surface:dsc_comment('%%IncludeFeature: *PageSize A4')

Archive Download the corresponding diff file

Branches

Tags