Menu

Tree [dc791f] master /
 History

HTTPS access


File Date Author Commit
 example 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 README.txt 2014-08-16 cah12 cah12 [dc791f] Re-formatted text to correct column distortion
 backgroundMisc.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_layer.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_layer.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_layer_bkgrnd.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_layer_bkgrnd.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_layer_query.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_layer_query.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_non_rect_bkgrnd.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_non_rect_bkgrnd.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_path_name.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_path_name.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_rect_bkgrnd.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_rect_bkgrnd.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_rect_bkgrnd_page.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_rect_bkgrnd_page.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_text_layer.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qml_text_layer.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qmlbox2dstaticexporter.inx 2014-08-16 cah12 cah12 [f4308d] This is a first commit.
 qmlbox2dstaticexporter.py 2014-08-16 cah12 cah12 [f4308d] This is a first commit.

Read Me

Version 0.1:
 
INSTALLATION:
-------------
1. Copy the .INX and the .PY files to the ...Inkscape\share\extensions
   folder
2. Open (or reopen) inkscape.
3. Check the submenus under the Extensions menu. You should see the 
arrangement shown below. If you don't, make sure your scripts are 
executeable.

Extensions --
	     |
             |
             QML --- DBR to page
		 |
		 |		 
		 --- Export
                 |
                 |
                 --- Make Layer DTL
                 |
                 |
                 --- Make Layer non-DTL
		 |
		 |
		 --- Make Rectangle DBR
		 |
		 |
		 --- Make Rectangle non-DBR
                 |
                 |
                 --- Path Name
		 |
		 |
		 --- Query layer


DBR to page:
------------
Resize and aligns the "dedicated background rectangle" (DBR) to the page. A 
DBR is a rectangle dedicated to defining the background. Only one DBR, which
lives on the lowest layer, can be defined for an image. Any DBR is always 
resized and aligned to page during export.

Export:
--------
This launches the "Export" dialog. This dialog has six fields.
1. "QML element name"				-	This is the name of 
							the output QML file
2. "Save the QML element to this directory"	-	The drectory 
							containing exported
							files. 
3. "Display resolution fit mode"		-	An option that determines 
							if and how images 
							are zoomed to the 
							display. See table below.
--------------------------------------------------------------------------------
Display resolution fit mode	|	How zooming occurs
--------------------------------------------------------------------------------
Letter Box			|The content is scaled uniformly (i.e. with the 
				|same value for x and y scale) 
				|so the smaller side fits into the display. 
				|(scale = xScale < yScale ? xScale : yScale
To Bigger			|The content is scaled uniformly (i.e. with the
				|same value for x and y scale) 
				|so the bigger side fits into the display. 
				|(scale = xScale > yScale ? xScale : yScale
Non Uniform			|Zoomed exactly to match the display. For 
				|displays with that have a different 
				|aspect ratio scene, this fit mode result in 
				|unequal scale factors for x and y. 
				|The may result in distortion of the background 
				|and its contents 
Zoom None			|No zooming (scaling) occurs
--------------------------------------------------------------------------------
4. "Scene Alignment X"				-	An option that determines
							how the Qml Image element 
							associated with a DBR 
							(see below) is anchored 
							to its parent. See table
							below.
---------------------------------------------------------------------------------
Scene Alignment X		| Anchor
---------------------------------------------------------------------------------
Center				|anchor horizontalCenter
Left				|anchor left
Right				|anchor right
---------------------------------------------------------------------------------
5. "Scene Alignment Y"				-	An option that determines 
							how the Qml Image element 
							associated with a DBR 
							(see below) is anchored 
							to its parent. See table 
							below.
---------------------------------------------------------------------------------
Scene Alignment Y		| Anchor
---------------------------------------------------------------------------------
Center				|anchor verticalCenter
Top				|anchor top
Bottom				|anchor bottom
---------------------------------------------------------------------------------
6. "Bind width and height"			-	If checked, the width and 
							height attribuets of the 
							root of the exported Qml 
							element are bound to width 
							and height attributes of 
							the eventual parent of the 
							exported Qml element.



Make Layer DTL:
---------------
This makes the current layer a Dedicated Text Layer (DTL). If you require a text 
item to be exported as a QML Text element, place the text item on a DTL. If you 
require a text item to be exported as a QML Image element, place the text item on 
a layer that is not a DTL. A DTL manages a single text item. During export, only 
the first text item found on a DTL is exported. Any other items are ignored.

Make Layer non-DTL:
-------------------
This makes a layer, that was early made a DTL, a "non dedicated text layer". Items 
on a non-DTL are exported as QML Images. Usually, you must run the Export script 
for the output files to be re-written and reflect changes.

Make Rectangle DBR:
-------------------
This makes the selected rectangle a Dedicated Background Rectangle (DBR). If you 
require a QML Image element to be exported as the parent of other QML Image 
elements, define a DBR". Scene Alignment X and Scene alignment Y are Qml Image 
element alignment options associated with a DBR. If no DBR is defined, the
options specified in Scene Alignment X and Scene alignment Y are ignored.

Make Rectangle non-DBR:
-----------------------
This makes a rectangle, that was early made a DTL, a "non dedicated rectangle". 
You must run the Export script for the output files to be re-written and reflect 
changes.

Path Name:
----------
If you want to export the layers to a Box2d QML document, you must define at 
least one path(Box2d path) that describes a box2d fixture. The "Path Name" submenu 
launches the "Path Name" dialog. This dialog has three fields.
"Unique path name"		-	The name of tha the selected path must get	
"Fixture Type"			-	Specifies the fixture shape to associate 
					with the path.
					(see table below)
----------------------------------------------------------------------------------
Fixture Type 	|	Kind of Path 
----------------------------------------------------------------------------------
"Box"		|A single straight line drawn diagonally. The bounding rect of 
		|this line describes the fixture to the exporter.
"Circle"	|A single straight line drawn roughly at 45 degrees. The bounding 
		|rect of this line is used by the exporter in computing the x, y 
		|and radius attribues of the fixture. 
"Edge"		|A single straight line. 
"Chain"		|A collection straight lines joined end to end. Chains may
		|be closed.
"Polygon"	|A collection straight lines joined end to end. Polygons are always
		|closed.
-----------------------------------------------------------------------------------
"Set body type as dynamic"	-	If checked, the box2d body type is dynamic.
Layers on which Box2d paths are drawn must not contain items that must be exported. 
Naming a path through the "Path Name" dialog marks the layer containing the path as 
a "Box2d Path Layer". The exporter ignores anything on a "Box2d Path Layer" that is 
not a Box2d path.

Query layer:
------------
Tells if the current layer is a DTL or non-DTL

General:
--------
Box2d paths use for fixture description must be straight lines or connected straight 
lines. No curves must exist within a Box2d path.
Generally, layers and groups are exported as image elements in the root.qml file and 
png images are dumped into the images subirectory. 
Hidden layers are not exported.
Output files are replaced without warning!
Sublayer use is not supported. 
If you wish to rename a layer that wil contain a DBR, rename the layer before 
defining the DBR.