Revision: 2284
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2284&view=rev
Author:   hofman
Date:     2007-06-13 03:15:09 -0700 (Wed, 13 Jun 2007)

Log Message:
-----------
Add AppleScript property for media box bounds of page.

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.h
    trunk/PDFPage_SKExtensions.m
    trunk/Skim.sdef

Modified: trunk/PDFPage_SKExtensions.h
===================================================================
--- trunk/PDFPage_SKExtensions.h        2007-06-13 10:07:18 UTC (rev 2283)
+++ trunk/PDFPage_SKExtensions.h        2007-06-13 10:15:09 UTC (rev 2284)
@@ -60,6 +60,7 @@
 - (void)setRotationAngle:(int)angle;
 - (NSData *)boundsAsQDRect;
 - (void)setBoundsAsQDRect:(NSData *)inQDBoundsAsData;
+- (NSData *)mediaBoundsAsQDRect;
 - (NSData *)contentBoundsAsQDRect;
 - (id)richText;
 - (NSArray *)notes;

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2007-06-13 10:07:18 UTC (rev 2283)
+++ trunk/PDFPage_SKExtensions.m        2007-06-13 10:15:09 UTC (rev 2284)
@@ -318,6 +318,11 @@
     }
 }
 
+- (NSData *)mediaBoundsAsQDRect {
+    Rect qdBounds = RectFromNSRect([self boundsForBox:kPDFDisplayBoxMediaBox]);
+    return [NSData dataWithBytes:&qdBounds length:sizeof(Rect)];
+}
+
 - (NSData *)contentBoundsAsQDRect {
     Rect qdBounds = RectFromNSRect([self foregroundBox]);
     return [NSData dataWithBytes:&qdBounds length:sizeof(Rect)];

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2007-06-13 10:07:18 UTC (rev 2283)
+++ trunk/Skim.sdef     2007-06-13 10:15:09 UTC (rev 2284)
@@ -545,11 +545,15 @@
                 <cocoa key="label"/>
             </property>
             <property name="bounds" code="pbnd" type="rectangle"
-                description="The bounding rectangle of the page (left, top, 
right, bottom).">
+                description="The bounding rectangle for the crop box of the 
page (left, top, right, bottom).">
                 <cocoa key="boundsAsQDRect"/>
             </property>
-            <property name="content bounds" code="CBnd" type="rectangle" 
access="r"
-                description="The bounding rectangle for the content of the 
page (left, top, right, bottom).">
+            <property name="media bounds" code="MBnd" type="rectangle" 
access="r"
+                description="The bounding rectangle for the media box of the 
page (left, top, right, bottom).">
+                <cocoa key="mediaBoundsAsQDRect"/>
+            </property>
+            <property name="content bounds" code="FBnd" type="rectangle" 
access="r"
+                description="The bounding rectangle for the foreground of the 
page (left, top, right, bottom).">
                 <cocoa key="contentBoundsAsQDRect"/>
             </property>
             <property name="rotation" code="PRot" type="integer"


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to