wish : simple expression evaluator for x,y,width,height and so on
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
For technical drawing it could be usefull if one could enter expression in input boxes such as x,y,width,height.
Eg :
My page is 512px wide. I want to make a centered rect that starts at 48px from the left.
So x is 48 and width is 416.
Instead of entering 416 I wish I could enter the expression 512 -48 * 2
--
Maybe this could be delegated to libxslt (if inkscape use it)
create the xsl and evaluate it
<xsl>
<variable pw="512" /> <!-- page width -->
<variable ph="1024" /> <!-- page height -->
<variable bbw="400" /> <!-- bounding box width of current item -->
<variable bbh="200" /> <!-- bb height -->
<variable bbx="20" /> <!-- bb x -->
<variable bby="100" /> <!-- bb y -->
<xsl:template match="/">
<xsl:value-of select=" 512 - 48 * 2 " /><!-- maybe we could evaluate more complex expressions such as math.cos()... -->
</xsl:template>
</xsl>
Already implemented in trunk (for Inkscape 0.49): wiki.inkscape. org/wiki/ index.php/ Release_ notes/0. 49#Simple_ calculations_ in_spinboxes>
<http://
Linking as duplicate to /bugs.launchpad .net/inkscape/ +bug/171282>
Bug #171282 (sf1488591) “Calculator in input fields”
<https:/
Please add a comment here and revert the duplicate status here if you don't agree and think these are different feature requests.