[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: FDK: Comparing MetricT values



Hi Rick...

I think that all you need to do is to define 'pts' as a MetricT value and multiply 12 by 'pts' ..

 #define pts (MetricT) 65536
 MetricT mTfHeight, mTfLocY, mOverflow;

 // Get the text frame height, y location and calculate the overflow location.
 mTfHeight = F_ApiGetMetric(oDoc, oTextFrame, FP_Height);
 mTfLocY = F_ApiGetMetric(oDoc, oTextFrame, FP_LocY);
 mOverflow = (mTfHeight + mTfLocY) - (12*pts);


Or something like that.


...scott

Scott Prentice
Leximation, Inc.
www.leximation.com
+1.415.485.1892



Rick Quatro wrote:

Hello Framers,

I need to get the Height of a text frame, add its LocY value to it, and then
subtract 12 points from it. For example,

MetricT mTfHeight, mTfLocY, mOverflow;

 // Get the text frame height, y location and calculate the overflow
location.
 mTfHeight = F_ApiGetMetric(oDoc, oTextFrame, FP_Height);
 mTfLocY = F_ApiGetMetric(oDoc, oTextFrame, FP_LocY);
 mOverflow = (mTfHeight + mTfLocY) - 12;

I don't think this is correct. Do I have to somehow convert the MetricT
values before I can do math on them? If I do, then what data type do I need
to declare for mOverflow? Should this be a floating point number? Thanks in
advance.

Rick Quatro
Carmen Publishing
585 659-8267
rick@xxxxxxxxxxxxxxx
www.frameexpert.com


** To unsubscribe, send a message to majordomo@xxxxxxxxx ** ** with "unsubscribe framers" (no quotes) in the body. **








** To unsubscribe, send a message to majordomo@xxxxxxxxx **
** with "unsubscribe framers" (no quotes) in the body.   **