[webkit-changes] cvs commit: WebKit/WebCoreSupport.subproj
WebTextRenderer.m
Darin
darin at opensource.apple.com
Sun Jun 19 18:20:02 PDT 2005
darin 05/06/19 18:20:02
Modified: . ChangeLog
WebCoreSupport.subproj WebTextRenderer.m
Log:
Changes by Mitz Pettel
Reviewed by me.
- fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3466>
ATSUI text doesn't render at coordinates greater than 32K
* WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
Translate the matrix of the CGContext instead of passing the appropriate coordinates to ATSU.
Revision Changes Path
1.3198 +11 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3197
retrieving revision 1.3198
diff -u -r1.3197 -r1.3198
--- ChangeLog 17 Jun 2005 17:09:32 -0000 1.3197
+++ ChangeLog 20 Jun 2005 01:19:59 -0000 1.3198
@@ -1,3 +1,14 @@
+2005-06-19 Darin Adler <darin at apple.com>
+
+ Changes by Mitz Pettel
+ Reviewed by me.
+
+ - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3466>
+ ATSUI text doesn't render at coordinates greater than 32K
+
+ * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
+ Translate the matrix of the CGContext instead of passing the appropriate coordinates to ATSU.
+
2005-06-17 Richard Williamson <rjw at apple.com>
Changes by Mitz Pettel
1.174 +7 -6 WebKit/WebCoreSupport.subproj/WebTextRenderer.m
Index: WebTextRenderer.m
===================================================================
RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- WebTextRenderer.m 17 Jun 2005 17:09:36 -0000 1.173
+++ WebTextRenderer.m 20 Jun 2005 01:20:01 -0000 1.174
@@ -1662,7 +1662,7 @@
- (void)_ATSU_drawRun:(const WebCoreTextRun *)run style:(const WebCoreTextStyle *)style geometry:(const WebCoreTextGeometry *)geometry
{
- // The only Cocoa calls made here are to NSColor, plus the self
+ // The only Cocoa calls made here are to NSColor and NSGraphicsContext, plus the self
// calls to _createATSUTextLayoutForRun: and
// _ATSU_drawHighlightForRun:. These are all exception-safe.
@@ -1695,11 +1695,12 @@
[style->textColor set];
- status = ATSUDrawText(layout,
- aRun->from,
- runLength,
- FloatToFixed(geometry->point.x), // these values are
- FloatToFixed(geometry->point.y)); // also of type Fixed
+ // ATSUI can't draw beyond -32768 to +32767 so we translate the CTM and tell ATSUI to draw at (0, 0).
+ CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+ CGContextTranslateCTM(context, geometry->point.x, geometry->point.y);
+ status = ATSUDrawText(layout, aRun->from, runLength, 0, 0);
+ CGContextTranslateCTM(context, -geometry->point.x, -geometry->point.y);
+
if (status != noErr){
// Nothing to do but report the error (dev build only).
ERROR ("ATSUDrawText() failed(%d)", status);
More information about the webkit-changes
mailing list