Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DrawThemeTextBox and the clip




On May 12, 2005, at 8:37 AM, Steve Mills wrote:

On May 12, 2005, at 09:07, David Duncan wrote:


My presumption would be that it still has to use QD semantics to be compatible with the drawing model that is expected of it. If you want simple Quartz savvy text editing, then use HIThemeDrawTextBox() instead (requires 10.3)


Always with the new APIs. :) Not that they'll fix it probably, but I still think I'll submit a bug that DrawThemeTextBox ignores the context clip. If you give it a context, you expect it to use all of Quartz and not just part of it.

I don't think we could ever change this now. There are undoubtedly existing applications that depend on this behavior, and we can't break them.


For what it's worth, this aspect of DrawThemeTextBox will be documented in some upcoming documentation about using Quartz to draw text. Here's an excerpt, which also mentions some other limitations of DrawThemeTextBox:

"The routine DrawThemeTextBox is available on all versions of Mac OS X but it isn’t as well suited to
drawing to a Quartz context. You can use it but it has a number of problems when drawing to a
Quartz context that limit its utility. Some of the limitations of DrawThemeTextBox are:


■ it resets the coordinate system prior to drawing so that all scaling, translation, and rotation is
removed prior to drawing


■ it always interprets the coordinates you pass for the rectangle to draw into as QuickDraw
coordinates with the origin at the top–left corner of the window or view, regardless of the current
CTM in effect


 ■ it resets the clip to a default value

■ for contexts that are not associated with a window, it produces undefined results"

-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden
References: 
 >DrawThemeTextBox and the clip (From: "Steve Mills" <email@hidden>)
 >Re: DrawThemeTextBox and the clip (From: David Duncan <email@hidden>)
 >Re: DrawThemeTextBox and the clip (From: "Steve Mills" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.