Page 1 of 1

Question about DimOperator

Posted: Sun Apr 01, 2007 19:14
by Pompei2
Hello,

Again, a question concerning the look'n'feel files.

How is it possible, using the DimOperator, to do an operation like this:

(Text.H - ImageA.H) / 2

My problem is not getting the Text.H or ImageA.H, I know these, but my problem is the order of the operations. Any hint is appreciated.

Posted: Wed Apr 25, 2007 17:11
by phoenixy
I think you can do that in the following order.

AbsoluteDim value='2'
DimOperator op='/' (I'm not sure what the exact op name of /. Divide?)
Text.h
DimOperator op='-'
ImageA.H
/DimOperator
/Text.h
/DimOperator

Since DimOperator does operation from inside to out,
Text.H - ImageA.H is done first (I've learned that the most inside two is done in the same order as they are)
and then using that result the next dimoperator is calculated.

Posted: Mon Apr 30, 2007 22:11
by Pompei2
Ok, thank you for your answer looks good, but I can't test ... cause i forgot where i needed this :D but .. it seems to me that your code would do a:

2 / (Text.H - Image.H)

no ?
Edit: because if you write:

Code: Select all

<FontDim type="LineSpacing" padding="0">
   <DimOperator op="Divide">
      <AbsoluteDim value="2" />
   </DimOperator>
</FontDim>

this does a linespacing / 2, and not 2 / linespacing. correct me if i'm wrong.