mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
add bleed edge option, get_card_export_settings function
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Function: get_card_export_settings
|
||||
|
||||
--Usage--
|
||||
> get_card_export_settings(card)
|
||||
|
||||
Get the zoom, angle and bleed with which a card is to be exported, as specified by the user in the preferences menu.
|
||||
|
||||
Returns and array whose first element is the zoom percentage, the second is the angle in degrees, and the third is the bleed edge size in pixels.
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:card]] The card you want to retrieve the export settings from.
|
||||
| @set@ [[type:set]] The set the card belongs to. This can be omited since "set" is a predefined variable.
|
||||
@@ -108,6 +108,7 @@ These functions are built into the program, other [[type:function]]s can be defi
|
||||
| [[fun:add_card_to_set]] Add a [[type:card]] to a [[type:set]].
|
||||
| [[fun:get_card_styling]] Get the styling data of a [[type:card]].
|
||||
| [[fun:get_card_stylesheet]] Get the stylesheet of a [[type:card]].
|
||||
| [[fun:get_card_export_settings]] Get the zoom, angle and bleed size at which the card will be exported.
|
||||
| [[fun:get_card_from_uid]] Find the [[type:card]] with the given uid.
|
||||
| [[fun:get_cards_from_link]] Find all [[type:card]]s that have the given link type to the given [[type:card]].
|
||||
| [[fun:get_front_face]] Find a [[type:card]] that has the link type "Front Face" to the given [[type:card]].
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Function: write_image_file
|
||||
|
||||
--Usage--
|
||||
> write_image_file(some_image, file: filename)
|
||||
> write_image_file(some_image, file: filename, width: 375, height: 523)
|
||||
> write_image_file(some_card, file: filename, zoom: 1.0, angle: 0.0, bleed: 18.0)
|
||||
|
||||
Write an image to a file in the output directory.
|
||||
Write a given image, or a given card's image to a file in the output directory.
|
||||
If a file with the given name already exists it is overwritten.
|
||||
|
||||
Returns the name of the file written.
|
||||
@@ -12,10 +13,14 @@ This function can only be used in an [[type:export template]], when <tt>create d
|
||||
|
||||
--Parameters--
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:image]] Image to write to the file.
|
||||
| @file@ [[type:string]] Name of the file to write to
|
||||
| @input@ [[type:image]] or [[type:card]] Image or Card to write to the file.
|
||||
| @file@ [[type:string]] Name of the file to write to.
|
||||
| @width@ [[type:int]] Width in pixels to use for the image, by default the size of the image is used if available.
|
||||
| @height@ [[type:int]] Height in pixels to use for the image, by default the size of the image is used if available.
|
||||
| @zoom@ [[type:double]] Zoom percentage to apply to the card render.
|
||||
| @angle@ [[type:double]] Angle in degrees to apply to the card render.
|
||||
| @bleed@ [[type:double]] Print bleed margin in pixels to apply to the card render.
|
||||
| @use_user_settings@ [[type:bool]] Use app settings for zoom, angle and bleed instead.
|
||||
|
||||
--Examples--
|
||||
> write_image_file(file:"image_out.png", linear_blend(...)) == "image_out.png" # image_out.png now contains the given image
|
||||
|
||||
Reference in New Issue
Block a user