CPObjectCPResponder
CPView
CPControl
CPImageView
@implementation CPImageView : CPControl
This class is a control that displays an image.
Method Summary | |
---|---|
-(id) | initWithCoder:(CPCoder)aCoder Initializes the image view with the provided coder. |
-(id) | initWithFrame:(CGRect)aFrame Initializes the receiver for usage with the specified bounding rectangle. |
-(void) | encodeWithCoder:(CPCoder)aCoder Writes the image view out to the coder. |
-(BOOL) | hasShadow Returns YES if the image view draws with
a drop shadow. |
-(void) | hideOrDisplayContents Toggles the display of the image view. |
-(CPImage) | image Returns the view's image. |
-(CGRect) | imageRect Returns the view's image rectangle. |
-(CPImageScaling) | imageScaling Returns the image scaling method used to render this image. |
-(void) | setFrameSize:(CGSize)aSize Sets the receiver's frame size. |
-(void) | setHasShadow:(BOOL)shouldHaveShadow Sets whether the image view should draw with a drop shadow. |
-(void) | setImage:(CPImage)anImage Sets the image for the view. |
-(void) | setImageScaling:(CPImageScaling)anImageScaling Sets the type of image scaling that should be used to render the image. |
-(void) | tile Add a description. |
Methods inherited from class CPControl |
---|
initWithFrame, action, alignment, backgroundColorForName, floatValue, font, isEnabled, mouseUp, sendAction, setAction, setAlignment, setBackgroundColor, setBackgroundColorWithName, setBackgroundColor, setEnabled, setFloatValue, setFont, setTarget, setTextColor, setTextShadow, target, textColor, textShadow |
Method Detail |
---|
-(id)initWithCoder:(CPCoder)aCoder
aCoder
- the coder from which data will be read.-(id)initWithFrame:(CGRect)aFrame
aFrame
-(void)encodeWithCoder:(CPCoder)aCoder
aCoder
- the coder to which the image
view will be written-(BOOL)hasShadow
YES
if the image view draws with
a drop shadow. The default is NO
.-(void)hideOrDisplayContents
-(CPImage)image
-(CGRect)imageRect
-(CPImageScaling)imageScaling
-(void)setFrameSize:(CGSize)aSize
aSize
is the same as the frame's current dimensions, this
method simply returns. The method posts a CPViewFrameDidChangeNotification
to the
default notification center if the receiver is configured to do so.aSize
- the new size for the frame-(void)setHasShadow:(BOOL)shouldHaveShadow
shouldHaveShadow
- whether the image view should have a shadow-(void)setImage:(CPImage)anImage
anImage
- the view's image-(void)setImageScaling:(CPImageScaling)anImageScaling
anImageScaling
- the type of scaling to use-(void)tile
Created on Sat Sep 13 14:15:43 PDT 2008