MonobjcMonobjc Documented Class Library
BoundingRectWithSizeOptionsAttributes Method (__target, size, options, attributes)
NamespacesMonobjc.AppKitNSString_AppKitAdditionsBoundingRectWithSizeOptionsAttributes(NSString, NSSize, NSStringDrawingOptions, NSDictionary)

Calculates and returns the bounding rect for the receiver drawn using the given options and display characteristics, within the specified rectangle in the current graphics context.

Original signature is '- (NSRect)boundingRectWithSize:(NSSize)size options:(NSStringDrawingOptions)options attributes:(NSDictionary *)attributes'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSRect BoundingRectWithSizeOptionsAttributes(
	this NSString __target,
	NSSize size,
	NSStringDrawingOptions options,
	NSDictionary attributes
)
<ExtensionAttribute> _
Public Shared Function BoundingRectWithSizeOptionsAttributes ( _
	__target As NSString, _
	size As NSSize, _
	options As NSStringDrawingOptions, _
	attributes As NSDictionary _
) As NSRect
[ExtensionAttribute]
public:
static NSRect BoundingRectWithSizeOptionsAttributes(
	NSString^ __target, 
	NSSize size, 
	NSStringDrawingOptions options, 
	NSDictionary^ attributes
)
Parameters
__target (NSString)
The target instance.
size (NSSize)
The size of the rectangle to draw in.
options (NSStringDrawingOptions)
String drawing options.
attributes (NSDictionary)
A dictionary of text attributes to be applied to the string. These are the same attributes that can be applied to an NSAttributedString object, but in the case of NSString objects, the attributes apply to the entire string, rather than ranges within the string.
Return Value
The bounding rect for the receiver drawn using the given options and display characteristics. The rect origin returned from this method is the first glyph origin.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type NSString. When you use instance method syntax to call this method, omit the first parameter.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)