Class CALayer

    • Constructor Detail

      • CALayer

        protected CALayer​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static CALayer alloc()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • defaultActionForKey

        public static CAAction defaultActionForKey​(java.lang.String event)
        Returns the default action object associated with the event named by the string 'event'. The default implementation returns a suitable animation object for events posted by animatable properties, nil otherwise.
      • defaultValueForKey

        public static java.lang.Object defaultValueForKey​(java.lang.String key)
        Returns the default value of the named property, or nil if no default value is known. Subclasses that override this method to define default values for their own properties should call `super' for unknown properties.
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • layer

        public static CALayer layer()
        Layer creation and initialization. *
      • needsDisplayForKey

        public static boolean needsDisplayForKey​(java.lang.String key)
        Method for subclasses to override. Returning true for a given property causes the layer's contents to be redrawn when the property is changed (including when changed by an animation attached to the layer). The default implementation returns NO. Subclasses should call super for properties defined by the superclass. (For example, do not try to return YES for properties implemented by CALayer, doing will have undefined results.)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • actionForKey

        public CAAction actionForKey​(java.lang.String event)
        Returns the action object associated with the event named by the string 'event'. The default implementation searches for an action object in the following places: 1. if defined, call the delegate method -actionForLayer:forKey: 2. look in the layer's `actions' dictionary 3. look in any `actions' dictionaries in the `style' hierarchy 4. call +defaultActionForKey: on the layer's class If any of these steps results in a non-nil action object, the following steps are ignored. If the final result is an instance of NSNull, it is converted to `nil'.
      • actions

        public NSDictionary<java.lang.String,​?> actions()
        A dictionary mapping keys to objects implementing the CAAction protocol. Default value is nil.
      • addAnimationForKey

        public void addAnimationForKey​(CAAnimation anim,
                                       java.lang.String key)
        Attach an animation object to the layer. Typically this is implicitly invoked through an action that is an CAAnimation object. 'key' may be any string such that only one animation per unique key is added per layer. The special key 'transition' is automatically used for transition animations. The nil pointer is also a valid key. If the `duration' property of the animation is zero or negative it is given the default duration, either the value of the `animationDuration' transaction property or .25 seconds otherwise. The animation is copied before being added to the layer, so any subsequent modifications to `anim' will have no affect unless it is added to another layer.
      • addSublayer

        public void addSublayer​(CALayer layer)
        Add 'layer' to the end of the receiver's sublayers array. If 'layer' already has a superlayer, it will be removed before being added.
      • affineTransform

        public CGAffineTransform affineTransform()
        Convenience methods for accessing the `transform' property as an affine transform.
      • allowsEdgeAntialiasing

        public boolean allowsEdgeAntialiasing()
        When true this layer is allowed to antialias its edges, as requested by the value of the edgeAntialiasingMask property. The default value is read from the boolean UIViewEdgeAntialiasing property in the main bundle's Info.plist. If no value is found in the Info.plist the default value is NO.
      • allowsGroupOpacity

        public boolean allowsGroupOpacity()
        When true, and the layer's opacity property is less than one, the layer is allowed to composite itself as a group separate from its parent. This gives the correct results when the layer contains multiple opaque components, but may reduce performance. The default value of the property is read from the boolean UIViewGroupOpacity property in the main bundle's Info.plist. If no value is found in the Info.plist the default value is YES for applications linked against the iOS 7 SDK or later and NO for applications linked against an earlier SDK.
      • anchorPoint

        public CGPoint anchorPoint()
        Defines the anchor point of the layer's bounds rect, as a point in normalized layer coordinates - '(0, 0)' is the bottom left corner of the bounds rect, '(1, 1)' is the top right corner. Defaults to '(0.5, 0.5)', i.e. the center of the bounds rect. Animatable.
      • anchorPointZ

        public double anchorPointZ()
        The Z component of the layer's anchor point (i.e. reference point for position and transform). Defaults to zero. Animatable.
      • animationForKey

        public CAAnimation animationForKey​(java.lang.String key)
        Returns the animation added to the layer with identifier 'key', or nil if no such animation exists. Attempting to modify any properties of the returned object will result in undefined behavior.
      • animationKeys

        public NSArray<java.lang.String> animationKeys()
        Returns an array containing the keys of all animations currently attached to the receiver. The order of the array matches the order in which animations will be applied.
      • autoreverses

        public boolean autoreverses()
        Description copied from interface: CAMediaTiming
        When true, the object plays backwards after playing forwards. Defaults to NO.
        Specified by:
        autoreverses in interface CAMediaTiming
      • backgroundColor

        public CGColorRef backgroundColor()
        The background color of the layer. Default value is nil. Colors created from tiled patterns are supported. Animatable.
      • backgroundFilters

        public NSArray<?> backgroundFilters()
        An array of filters that are applied to the background of the layer. The root layer ignores this property. Animatable.
      • beginTime

        public double beginTime()
        Description copied from interface: CAMediaTiming
        The begin time of the object, in relation to its parent object, if applicable. Defaults to 0.
        Specified by:
        beginTime in interface CAMediaTiming
      • borderColor

        public CGColorRef borderColor()
        The color of the layer's border. Defaults to opaque black. Colors created from tiled patterns are supported. Animatable.
      • borderWidth

        public double borderWidth()
        The width of the layer's border, inset from the layer bounds. The border is composited above the layer's content and sublayers and includes the effects of the `cornerRadius' property. Defaults to zero. Animatable.
      • bounds

        public CGRect bounds()
        The bounds of the layer. Defaults to CGRectZero. Animatable.
      • compositingFilter

        public java.lang.Object compositingFilter()
        A filter object used to composite the layer with its (possibly filtered) background. Default value is nil, which implies source- over compositing. Animatable. Note that if the inputs of the filter are modified directly after the filter is attached to a layer, the behavior is undefined. The filter must either be reattached to the layer, or filter properties should be modified by calling -setValue:forKeyPath: on each layer that the filter is attached to. (This also applies to the `filters' and `backgroundFilters' properties.)
      • containsPoint

        public boolean containsPoint​(CGPoint p)
        Returns true if the bounds of the layer contains point 'p'.
      • contents

        public java.lang.Object contents()
        An object providing the contents of the layer, typically a CGImageRef, but may be something else. (For example, NSImage objects are supported on Mac OS X 10.6 and later.) Default value is nil. Animatable.
      • contentsAreFlipped

        public boolean contentsAreFlipped()
        Returns true if the contents of the contents property of the layer will be implicitly flipped when rendered in relation to the local coordinate space (e.g. if there are an odd number of layers with flippedGeometry=YES from the receiver up to and including the implicit container of the root layer). Subclasses should not attempt to redefine this method. When this method returns true the CGContextRef object passed to -drawInContext: by the default -display method will have been y- flipped (and rectangles passed to -setNeedsDisplayInRect: will be similarly flipped).
      • contentsCenter

        public CGRect contentsCenter()
        A rectangle in normalized image coordinates defining the scaled center part of the `contents' image. When an image is resized due to its `contentsGravity' property its center part implicitly defines the 3x3 grid that controls how the image is scaled to its drawn size. The center part is stretched in both dimensions; the top and bottom parts are only stretched horizontally; the left and right parts are only stretched vertically; the four corner parts are not stretched at all. (This is often called "9-slice scaling".) The rectangle is interpreted after the effects of the `contentsRect' property have been applied. It defaults to the unit rectangle [0 0 1 1] meaning that the entire image is scaled. As a special case, if the width or height is zero, it is implicitly adjusted to the width or height of a single source pixel centered at that position. If the rectangle extends outside the [0 0 1 1] unit rectangle the result is undefined. Animatable.
      • contentsFormat

        public java.lang.String contentsFormat()
        A hint for the desired storage format of the layer contents provided by -drawLayerInContext. Defaults to kCAContentsFormatRGBA8Uint. Note that this does not affect the interpretation of the `contents' property directly.
      • contentsGravity

        public java.lang.String contentsGravity()
        A string defining how the contents of the layer is mapped into its bounds rect. Options are `center', `top', `bottom', `left', `right', `topLeft', `topRight', `bottomLeft', `bottomRight', `resize', `resizeAspect', `resizeAspectFill'. The default value is `resize'. Note that "bottom" always means "Minimum Y" and "top" always means "Maximum Y".
      • contentsRect

        public CGRect contentsRect()
        A rectangle in normalized image coordinates defining the subrectangle of the `contents' property that will be drawn into the layer. If pixels outside the unit rectangles are requested, the edge pixels of the contents image will be extended outwards. If an empty rectangle is provided, the results are undefined. Defaults to the unit rectangle [0 0 1 1]. Animatable.
      • contentsScale

        public double contentsScale()
        Defines the scale factor applied to the contents of the layer. If the physical size of the contents is '(w, h)' then the logical size (i.e. for contentsGravity calculations) is defined as '(w / contentsScale, h / contentsScale)'. Applies to both images provided explicitly and content provided via -drawInContext: (i.e. if contentsScale is two -drawInContext: will draw into a buffer twice as large as the layer bounds). Defaults to one. Animatable.
      • convertPointFromLayer

        public CGPoint convertPointFromLayer​(CGPoint p,
                                             CALayer l)
        Mapping between layer coordinate and time spaces. *
      • convertTimeFromLayer

        public double convertTimeFromLayer​(double t,
                                           CALayer l)
      • convertTimeToLayer

        public double convertTimeToLayer​(double t,
                                         CALayer l)
      • cornerRadius

        public double cornerRadius()
        When positive, the background of the layer will be drawn with rounded corners. Also effects the mask generated by the `masksToBounds' property. Defaults to zero. Animatable.
      • delegate

        public CALayerDelegate delegate()
        An object that will receive the CALayer delegate methods defined below (for those that it implements). The value of this property is not retained. Default value is nil.
      • display

        public void display()
        Reload the content of this layer. Calls the -drawInContext: method then updates the `contents' property of the layer. Typically this is not called directly.
      • displayIfNeeded

        public void displayIfNeeded()
        Call -display if receiver is marked as needing redrawing.
      • drawInContext

        public void drawInContext​(CGContextRef ctx)
        Called via the -display method when the `contents' property is being updated. Default implementation does nothing. The context may be clipped to protect valid layer content. Subclasses that wish to find the actual region to draw can call CGContextGetClipBoundingBox().
      • drawsAsynchronously

        public boolean drawsAsynchronously()
        When true, the CGContext object passed to the -drawInContext: method may queue the drawing commands submitted to it, such that they will be executed later (i.e. asynchronously to the execution of the -drawInContext: method). This may allow the layer to complete its drawing operations sooner than when executing synchronously. The default value is NO.
      • duration

        public double duration()
        Description copied from interface: CAMediaTiming
        The basic duration of the object. Defaults to 0.
        Specified by:
        duration in interface CAMediaTiming
      • edgeAntialiasingMask

        public int edgeAntialiasingMask()
        Defines how the edges of the layer are rasterized. For each of the four edges (left, right, bottom, top) if the corresponding bit is set the edge will be antialiased. Typically this property is used to disable antialiasing for edges that abut edges of other layers, to eliminate the seams that would otherwise occur. The default value is for all edges to be antialiased.
      • fillMode

        public java.lang.String fillMode()
        Description copied from interface: CAMediaTiming
        Defines how the timed object behaves outside its active duration. Local time may be clamped to either end of the active duration, or the element may be removed from the presentation. The legal values are `backwards', `forwards', `both' and `removed'. Defaults to `removed'.
        Specified by:
        fillMode in interface CAMediaTiming
      • filters

        public NSArray<?> filters()
        An array of filters that will be applied to the contents of the layer and its sublayers. Defaults to nil. Animatable.
      • frame

        public CGRect frame()
        Unlike NSView, each Layer in the hierarchy has an implicit frame rectangle, a function of the `position', `bounds', `anchorPoint', and `transform' properties. When setting the frame the `position' and `bounds.size' are changed to match the given frame.
      • hitTest

        public CALayer hitTest​(CGPoint p)
        Returns the farthest descendant of the layer containing point 'p'. Siblings are searched in top-to-bottom order. 'p' is defined to be in the coordinate space of the receiver's nearest ancestor that isn't a CATransformLayer (transform layers don't have a 2D coordinate space in which the point could be specified).
      • initWithLayer

        public CALayer initWithLayer​(java.lang.Object layer)
        This initializer is used by CoreAnimation to create shadow copies of layers, e.g. for use as presentation layers. Subclasses can override this method to copy their instance variables into the presentation layer (subclasses should call the superclass afterwards). Calling this method in any other situation will result in undefined behavior.
      • insertSublayerAbove

        public void insertSublayerAbove​(CALayer layer,
                                        CALayer sibling)
      • insertSublayerAtIndex

        public void insertSublayerAtIndex​(CALayer layer,
                                          int idx)
        Insert 'layer' at position 'idx' in the receiver's sublayers array. If 'layer' already has a superlayer, it will be removed before being inserted.
      • insertSublayerBelow

        public void insertSublayerBelow​(CALayer layer,
                                        CALayer sibling)
        Insert 'layer' either above or below the specified layer in the receiver's sublayers array. If 'layer' already has a superlayer, it will be removed before being inserted.
      • isDoubleSided

        public boolean isDoubleSided()
        When false layers facing away from the viewer are hidden from view. Defaults to YES. Animatable.
      • setDoubleSided

        public void setDoubleSided​(boolean value)
        When false layers facing away from the viewer are hidden from view. Defaults to YES. Animatable.
      • isGeometryFlipped

        public boolean isGeometryFlipped()
        Whether or not the geometry of the layer (and its sublayers) is flipped vertically. Defaults to NO. Note that even when geometry is flipped, image orientation remains the same (i.e. a CGImageRef stored in the `contents' property will display the same with both flipped=NO and flipped=YES, assuming no transform on the layer).
      • setGeometryFlipped

        public void setGeometryFlipped​(boolean value)
        Whether or not the geometry of the layer (and its sublayers) is flipped vertically. Defaults to NO. Note that even when geometry is flipped, image orientation remains the same (i.e. a CGImageRef stored in the `contents' property will display the same with both flipped=NO and flipped=YES, assuming no transform on the layer).
      • isHidden

        public boolean isHidden()
        When true the layer and its sublayers are not displayed. Defaults to NO. Animatable.
      • setHidden

        public void setHidden​(boolean value)
        When true the layer and its sublayers are not displayed. Defaults to NO. Animatable.
      • isOpaque

        public boolean isOpaque()
        A hint marking that the layer contents provided by -drawInContext: is completely opaque. Defaults to NO. Note that this does not affect the interpretation of the `contents' property directly.
      • setOpaque

        public void setOpaque​(boolean value)
        A hint marking that the layer contents provided by -drawInContext: is completely opaque. Defaults to NO. Note that this does not affect the interpretation of the `contents' property directly.
      • layoutIfNeeded

        public void layoutIfNeeded()
        Traverse upwards from the layer while the superlayer requires layout. Then layout the entire tree beneath that ancestor.
      • layoutSublayers

        public void layoutSublayers()
        Called when the layer requires layout. The default implementation calls the layout manager if one exists and it implements the -layoutSublayersOfLayer: method. Subclasses can override this to provide their own layout algorithm, which should set the frame of each sublayer.
      • magnificationFilter

        public java.lang.String magnificationFilter()
      • mask

        public CALayer mask()
        A layer whose alpha channel is used as a mask to select between the layer's background and the result of compositing the layer's contents with its filtered background. Defaults to nil. When used as a mask the layer's `compositingFilter' and `backgroundFilters' properties are ignored. When setting the mask to a new layer, the new layer must have a nil superlayer, otherwise the behavior is undefined. Nested masks (mask layers with their own masks) are unsupported.
      • masksToBounds

        public boolean masksToBounds()
        When true an implicit mask matching the layer bounds is applied to the layer (including the effects of the `cornerRadius' property). If both `mask' and `masksToBounds' are non-nil the two masks are multiplied to get the actual mask values. Defaults to NO. Animatable.
      • minificationFilter

        public java.lang.String minificationFilter()
        The filter types to use when rendering the `contents' property of the layer. The minification filter is used when to reduce the size of image data, the magnification filter to increase the size of image data. Currently the allowed values are `nearest' and `linear'. Both properties default to `linear'.
      • minificationFilterBias

        public float minificationFilterBias()
        The bias factor added when determining which levels of detail to use when minifying using trilinear filtering. The default value is 0. Animatable.
      • modelLayer

        public java.lang.Object modelLayer()
        When called on the result of the -presentationLayer method, returns the underlying layer with the current model values. When called on a non-presentation layer, returns the receiver. The result of calling this method after the transaction that produced the presentation layer has completed is undefined.
      • name

        public java.lang.String name()
        The name of the layer. Used by some layout managers. Defaults to nil.
      • needsDisplay

        public boolean needsDisplay()
        Returns true when the layer is marked as needing redrawing.
      • needsDisplayOnBoundsChange

        public boolean needsDisplayOnBoundsChange()
        When true -setNeedsDisplay will automatically be called when the bounds of the layer changes. Default value is NO.
      • needsLayout

        public boolean needsLayout()
        Returns true when the receiver is marked as needing layout.
      • opacity

        public float opacity()
        The opacity of the layer, as a value between zero and one. Defaults to one. Specifying a value outside the [0,1] range will give undefined results. Animatable.
      • position

        public CGPoint position()
        The position in the superlayer that the anchor point of the layer's bounds rect is aligned to. Defaults to the zero point. Animatable.
      • preferredFrameSize

        public CGSize preferredFrameSize()
        Returns the preferred frame size of the layer in the coordinate space of the superlayer. The default implementation calls the layout manager if one exists and it implements the -preferredSizeOfLayer: method, otherwise returns the size of the bounds rect mapped into the superlayer.
      • presentationLayer

        public java.lang.Object presentationLayer()
        Returns a copy of the layer containing all properties as they were at the start of the current transaction, with any active animations applied. This gives a close approximation to the version of the layer that is currently displayed. Returns nil if the layer has not yet been committed. The effect of attempting to modify the returned layer in any way is undefined. The `sublayers', `mask' and `superlayer' properties of the returned layer return the presentation versions of these properties. This carries through to read-only layer methods. E.g., calling -hitTest: on the result of the -presentationLayer will query the presentation values of the layer tree.
      • rasterizationScale

        public double rasterizationScale()
        The scale at which the layer will be rasterized (when the shouldRasterize property has been set to YES) relative to the coordinate space of the layer. Defaults to one. Animatable.
      • removeAllAnimations

        public void removeAllAnimations()
        Remove all animations attached to the layer.
      • removeAnimationForKey

        public void removeAnimationForKey​(java.lang.String key)
        Remove any animation attached to the layer for 'key'.
      • removeFromSuperlayer

        public void removeFromSuperlayer()
        Removes the layer from its superlayer, works both if the receiver is in its superlayer's `sublayers' array or set as its `mask' value.
      • renderInContext

        public void renderInContext​(CGContextRef ctx)
        Renders the receiver and its sublayers into 'ctx'. This method renders directly from the layer tree. Renders in the coordinate space of the layer. WARNING: currently this method does not implement the full CoreAnimation composition model, use with caution.
      • repeatCount

        public float repeatCount()
        Description copied from interface: CAMediaTiming
        The repeat count of the object. May be fractional. Defaults to 0.
        Specified by:
        repeatCount in interface CAMediaTiming
      • repeatDuration

        public double repeatDuration()
        Description copied from interface: CAMediaTiming
        The repeat duration of the object. Defaults to 0.
        Specified by:
        repeatDuration in interface CAMediaTiming
      • replaceSublayerWith

        public void replaceSublayerWith​(CALayer oldLayer,
                                        CALayer newLayer)
        Remove 'oldLayer' from the sublayers array of the receiver and insert 'newLayer' if non-nil in its position. If the superlayer of 'oldLayer' is not the receiver, the behavior is undefined.
      • scrollPoint

        public void scrollPoint​(CGPoint p)
        These methods search for the closest ancestor CAScrollLayer of the * receiver, and then call either -scrollToPoint: or -scrollToRect: on that layer with the specified geometry converted from the coordinate space of the receiver to that of the found scroll layer.
      • scrollRectToVisible

        public void scrollRectToVisible​(CGRect r)
      • setActions

        public void setActions​(NSDictionary<java.lang.String,​?> value)
        A dictionary mapping keys to objects implementing the CAAction protocol. Default value is nil.
      • setAllowsEdgeAntialiasing

        public void setAllowsEdgeAntialiasing​(boolean value)
        When true this layer is allowed to antialias its edges, as requested by the value of the edgeAntialiasingMask property. The default value is read from the boolean UIViewEdgeAntialiasing property in the main bundle's Info.plist. If no value is found in the Info.plist the default value is NO.
      • setAllowsGroupOpacity

        public void setAllowsGroupOpacity​(boolean value)
        When true, and the layer's opacity property is less than one, the layer is allowed to composite itself as a group separate from its parent. This gives the correct results when the layer contains multiple opaque components, but may reduce performance. The default value of the property is read from the boolean UIViewGroupOpacity property in the main bundle's Info.plist. If no value is found in the Info.plist the default value is YES for applications linked against the iOS 7 SDK or later and NO for applications linked against an earlier SDK.
      • setAnchorPoint

        public void setAnchorPoint​(CGPoint value)
        Defines the anchor point of the layer's bounds rect, as a point in normalized layer coordinates - '(0, 0)' is the bottom left corner of the bounds rect, '(1, 1)' is the top right corner. Defaults to '(0.5, 0.5)', i.e. the center of the bounds rect. Animatable.
      • setAnchorPointZ

        public void setAnchorPointZ​(double value)
        The Z component of the layer's anchor point (i.e. reference point for position and transform). Defaults to zero. Animatable.
      • setAutoreverses

        public void setAutoreverses​(boolean value)
        Description copied from interface: CAMediaTiming
        When true, the object plays backwards after playing forwards. Defaults to NO.
        Specified by:
        setAutoreverses in interface CAMediaTiming
      • setBackgroundColor

        public void setBackgroundColor​(CGColorRef value)
        The background color of the layer. Default value is nil. Colors created from tiled patterns are supported. Animatable.
      • setBackgroundFilters

        public void setBackgroundFilters​(NSArray<?> value)
        An array of filters that are applied to the background of the layer. The root layer ignores this property. Animatable.
      • setBeginTime

        public void setBeginTime​(double value)
        Description copied from interface: CAMediaTiming
        The begin time of the object, in relation to its parent object, if applicable. Defaults to 0.
        Specified by:
        setBeginTime in interface CAMediaTiming
      • setBorderColor

        public void setBorderColor​(CGColorRef value)
        The color of the layer's border. Defaults to opaque black. Colors created from tiled patterns are supported. Animatable.
      • setBorderWidth

        public void setBorderWidth​(double value)
        The width of the layer's border, inset from the layer bounds. The border is composited above the layer's content and sublayers and includes the effects of the `cornerRadius' property. Defaults to zero. Animatable.
      • setBounds

        public void setBounds​(CGRect value)
        The bounds of the layer. Defaults to CGRectZero. Animatable.
      • setCompositingFilter

        public void setCompositingFilter​(java.lang.Object value)
        A filter object used to composite the layer with its (possibly filtered) background. Default value is nil, which implies source- over compositing. Animatable. Note that if the inputs of the filter are modified directly after the filter is attached to a layer, the behavior is undefined. The filter must either be reattached to the layer, or filter properties should be modified by calling -setValue:forKeyPath: on each layer that the filter is attached to. (This also applies to the `filters' and `backgroundFilters' properties.)
      • setContents

        public void setContents​(java.lang.Object value)
        An object providing the contents of the layer, typically a CGImageRef, but may be something else. (For example, NSImage objects are supported on Mac OS X 10.6 and later.) Default value is nil. Animatable.
      • setContentsCenter

        public void setContentsCenter​(CGRect value)
        A rectangle in normalized image coordinates defining the scaled center part of the `contents' image. When an image is resized due to its `contentsGravity' property its center part implicitly defines the 3x3 grid that controls how the image is scaled to its drawn size. The center part is stretched in both dimensions; the top and bottom parts are only stretched horizontally; the left and right parts are only stretched vertically; the four corner parts are not stretched at all. (This is often called "9-slice scaling".) The rectangle is interpreted after the effects of the `contentsRect' property have been applied. It defaults to the unit rectangle [0 0 1 1] meaning that the entire image is scaled. As a special case, if the width or height is zero, it is implicitly adjusted to the width or height of a single source pixel centered at that position. If the rectangle extends outside the [0 0 1 1] unit rectangle the result is undefined. Animatable.
      • setContentsFormat

        public void setContentsFormat​(java.lang.String value)
        A hint for the desired storage format of the layer contents provided by -drawLayerInContext. Defaults to kCAContentsFormatRGBA8Uint. Note that this does not affect the interpretation of the `contents' property directly.
      • setContentsGravity

        public void setContentsGravity​(java.lang.String value)
        A string defining how the contents of the layer is mapped into its bounds rect. Options are `center', `top', `bottom', `left', `right', `topLeft', `topRight', `bottomLeft', `bottomRight', `resize', `resizeAspect', `resizeAspectFill'. The default value is `resize'. Note that "bottom" always means "Minimum Y" and "top" always means "Maximum Y".
      • setContentsRect

        public void setContentsRect​(CGRect value)
        A rectangle in normalized image coordinates defining the subrectangle of the `contents' property that will be drawn into the layer. If pixels outside the unit rectangles are requested, the edge pixels of the contents image will be extended outwards. If an empty rectangle is provided, the results are undefined. Defaults to the unit rectangle [0 0 1 1]. Animatable.
      • setContentsScale

        public void setContentsScale​(double value)
        Defines the scale factor applied to the contents of the layer. If the physical size of the contents is '(w, h)' then the logical size (i.e. for contentsGravity calculations) is defined as '(w / contentsScale, h / contentsScale)'. Applies to both images provided explicitly and content provided via -drawInContext: (i.e. if contentsScale is two -drawInContext: will draw into a buffer twice as large as the layer bounds). Defaults to one. Animatable.
      • setCornerRadius

        public void setCornerRadius​(double value)
        When positive, the background of the layer will be drawn with rounded corners. Also effects the mask generated by the `masksToBounds' property. Defaults to zero. Animatable.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(CALayerDelegate value)
        An object that will receive the CALayer delegate methods defined below (for those that it implements). The value of this property is not retained. Default value is nil.
      • setDelegate

        public void setDelegate​(CALayerDelegate value)
        An object that will receive the CALayer delegate methods defined below (for those that it implements). The value of this property is not retained. Default value is nil.
      • setDrawsAsynchronously

        public void setDrawsAsynchronously​(boolean value)
        When true, the CGContext object passed to the -drawInContext: method may queue the drawing commands submitted to it, such that they will be executed later (i.e. asynchronously to the execution of the -drawInContext: method). This may allow the layer to complete its drawing operations sooner than when executing synchronously. The default value is NO.
      • setDuration

        public void setDuration​(double value)
        Description copied from interface: CAMediaTiming
        The basic duration of the object. Defaults to 0.
        Specified by:
        setDuration in interface CAMediaTiming
      • setEdgeAntialiasingMask

        public void setEdgeAntialiasingMask​(int value)
        Defines how the edges of the layer are rasterized. For each of the four edges (left, right, bottom, top) if the corresponding bit is set the edge will be antialiased. Typically this property is used to disable antialiasing for edges that abut edges of other layers, to eliminate the seams that would otherwise occur. The default value is for all edges to be antialiased.
      • setFillMode

        public void setFillMode​(java.lang.String value)
        Description copied from interface: CAMediaTiming
        Defines how the timed object behaves outside its active duration. Local time may be clamped to either end of the active duration, or the element may be removed from the presentation. The legal values are `backwards', `forwards', `both' and `removed'. Defaults to `removed'.
        Specified by:
        setFillMode in interface CAMediaTiming
      • setFilters

        public void setFilters​(NSArray<?> value)
        An array of filters that will be applied to the contents of the layer and its sublayers. Defaults to nil. Animatable.
      • setFrame

        public void setFrame​(CGRect value)
        Unlike NSView, each Layer in the hierarchy has an implicit frame rectangle, a function of the `position', `bounds', `anchorPoint', and `transform' properties. When setting the frame the `position' and `bounds.size' are changed to match the given frame.
      • setMagnificationFilter

        public void setMagnificationFilter​(java.lang.String value)
      • setMask

        public void setMask​(CALayer value)
        A layer whose alpha channel is used as a mask to select between the layer's background and the result of compositing the layer's contents with its filtered background. Defaults to nil. When used as a mask the layer's `compositingFilter' and `backgroundFilters' properties are ignored. When setting the mask to a new layer, the new layer must have a nil superlayer, otherwise the behavior is undefined. Nested masks (mask layers with their own masks) are unsupported.
      • setMasksToBounds

        public void setMasksToBounds​(boolean value)
        When true an implicit mask matching the layer bounds is applied to the layer (including the effects of the `cornerRadius' property). If both `mask' and `masksToBounds' are non-nil the two masks are multiplied to get the actual mask values. Defaults to NO. Animatable.
      • setMinificationFilter

        public void setMinificationFilter​(java.lang.String value)
        The filter types to use when rendering the `contents' property of the layer. The minification filter is used when to reduce the size of image data, the magnification filter to increase the size of image data. Currently the allowed values are `nearest' and `linear'. Both properties default to `linear'.
      • setMinificationFilterBias

        public void setMinificationFilterBias​(float value)
        The bias factor added when determining which levels of detail to use when minifying using trilinear filtering. The default value is 0. Animatable.
      • setName

        public void setName​(java.lang.String value)
        The name of the layer. Used by some layout managers. Defaults to nil.
      • setNeedsDisplay

        public void setNeedsDisplay()
        Marks that -display needs to be called before the layer is next committed. If a region is specified, only that region of the layer is invalidated.
      • setNeedsDisplayInRect

        public void setNeedsDisplayInRect​(CGRect r)
      • setNeedsDisplayOnBoundsChange

        public void setNeedsDisplayOnBoundsChange​(boolean value)
        When true -setNeedsDisplay will automatically be called when the bounds of the layer changes. Default value is NO.
      • setNeedsLayout

        public void setNeedsLayout()
        Marks that -layoutSublayers needs to be invoked on the receiver before the next update. If the receiver's layout manager implements the -invalidateLayoutOfLayer: method it will be called. This method is automatically invoked on a layer whenever its `sublayers' or `layoutManager' property is modified, and is invoked on the layer and its superlayer whenever its `bounds' or `transform' properties are modified. Implicit calls to -setNeedsLayout are skipped if the layer is currently executing its -layoutSublayers method.
      • setOpacity

        public void setOpacity​(float value)
        The opacity of the layer, as a value between zero and one. Defaults to one. Specifying a value outside the [0,1] range will give undefined results. Animatable.
      • setPosition

        public void setPosition​(CGPoint value)
        The position in the superlayer that the anchor point of the layer's bounds rect is aligned to. Defaults to the zero point. Animatable.
      • setRasterizationScale

        public void setRasterizationScale​(double value)
        The scale at which the layer will be rasterized (when the shouldRasterize property has been set to YES) relative to the coordinate space of the layer. Defaults to one. Animatable.
      • setRepeatCount

        public void setRepeatCount​(float value)
        Description copied from interface: CAMediaTiming
        The repeat count of the object. May be fractional. Defaults to 0.
        Specified by:
        setRepeatCount in interface CAMediaTiming
      • setRepeatDuration

        public void setRepeatDuration​(double value)
        Description copied from interface: CAMediaTiming
        The repeat duration of the object. Defaults to 0.
        Specified by:
        setRepeatDuration in interface CAMediaTiming
      • setShadowColor

        public void setShadowColor​(CGColorRef value)
        The color of the shadow. Defaults to opaque black. Colors created from patterns are currently NOT supported. Animatable.
      • setShadowOffset

        public void setShadowOffset​(CGSize value)
        The shadow offset. Defaults to (0, -3). Animatable.
      • setShadowOpacity

        public void setShadowOpacity​(float value)
        The opacity of the shadow. Defaults to 0. Specifying a value outside the [0,1] range will give undefined results. Animatable.
      • setShadowPath

        public void setShadowPath​(CGPathRef value)
        When non-null this path defines the outline used to construct the layer's shadow instead of using the layer's composited alpha channel. The path is rendered using the non-zero winding rule. Specifying the path explicitly using this property will usually improve rendering performance, as will sharing the same path reference across multiple layers. Upon assignment the path is copied. Defaults to null. Animatable.
      • setShadowRadius

        public void setShadowRadius​(double value)
        The blur radius used to create the shadow. Defaults to 3. Animatable.
      • setShouldRasterize

        public void setShouldRasterize​(boolean value)
        When true, the layer is rendered as a bitmap in its local coordinate space ("rasterized"), then the bitmap is composited into the destination (with the minificationFilter and magnificationFilter properties of the layer applied if the bitmap needs scaling). Rasterization occurs after the layer's filters and shadow effects are applied, but before the opacity modulation. As an implementation detail the rendering engine may attempt to cache and reuse the bitmap from one frame to the next. (Whether it does or not will have no affect on the rendered output.) When false the layer is composited directly into the destination whenever possible (however, certain features of the compositing model may force rasterization, e.g. adding filters). Defaults to NO. Animatable.
      • setSpeed

        public void setSpeed​(float value)
        Description copied from interface: CAMediaTiming
        The rate of the layer. Used to scale parent time to local time, e.g. if rate is 2, local time progresses twice as fast as parent time. Defaults to 1.
        Specified by:
        setSpeed in interface CAMediaTiming
      • setStyle

        public void setStyle​(NSDictionary<?,​?> value)
        When non-nil, a dictionary dereferenced to find property values that aren't explicitly defined by the layer. (This dictionary may in turn have a `style' property, forming a hierarchy of default values.) If the style dictionary doesn't define a value for an attribute, the +defaultValueForKey: method is called. Defaults to nil. Note that if the dictionary or any of its ancestors are modified, the values of the layer's properties are undefined until the `style' property is reset.
      • setSublayerTransform

        public void setSublayerTransform​(CATransform3D value)
        A transform applied to each member of the `sublayers' array while rendering its contents into the receiver's output. Typically used as the projection matrix to add perspective and other viewing effects into the model. Defaults to identity. Animatable.
      • setSublayers

        public void setSublayers​(NSArray<? extends CALayer> value)
        The array of sublayers of this layer. The layers are listed in back to front order. Defaults to nil. When setting the value of the property, any newly added layers must have nil superlayers, otherwise the behavior is undefined. Note that the returned array is not guaranteed to retain its elements.
      • setTimeOffset

        public void setTimeOffset​(double value)
        Description copied from interface: CAMediaTiming
        Additional offset in active local time. i.e. to convert from parent time tp to active local time t: t = (tp - begin) * speed + offset. One use of this is to "pause" a layer by setting `speed' to zero and `offset' to a suitable value. Defaults to 0.
        Specified by:
        setTimeOffset in interface CAMediaTiming
      • setTransform

        public void setTransform​(CATransform3D value)
        A transform applied to the layer relative to the anchor point of its bounds rect. Defaults to the identity transform. Animatable.
      • setZPosition

        public void setZPosition​(double value)
        The Z component of the layer's position in its superlayer. Defaults to zero. Animatable.
      • shadowColor

        public CGColorRef shadowColor()
        The color of the shadow. Defaults to opaque black. Colors created from patterns are currently NOT supported. Animatable.
      • shadowOffset

        public CGSize shadowOffset()
        The shadow offset. Defaults to (0, -3). Animatable.
      • shadowOpacity

        public float shadowOpacity()
        The opacity of the shadow. Defaults to 0. Specifying a value outside the [0,1] range will give undefined results. Animatable.
      • shadowPath

        public CGPathRef shadowPath()
        When non-null this path defines the outline used to construct the layer's shadow instead of using the layer's composited alpha channel. The path is rendered using the non-zero winding rule. Specifying the path explicitly using this property will usually improve rendering performance, as will sharing the same path reference across multiple layers. Upon assignment the path is copied. Defaults to null. Animatable.
      • shadowRadius

        public double shadowRadius()
        The blur radius used to create the shadow. Defaults to 3. Animatable.
      • shouldArchiveValueForKey

        public boolean shouldArchiveValueForKey​(java.lang.String key)
        Called by the object's implementation of -encodeWithCoder:, returns false if the named property should not be archived. The base implementation returns YES. Subclasses should call super for unknown properties.
      • shouldRasterize

        public boolean shouldRasterize()
        When true, the layer is rendered as a bitmap in its local coordinate space ("rasterized"), then the bitmap is composited into the destination (with the minificationFilter and magnificationFilter properties of the layer applied if the bitmap needs scaling). Rasterization occurs after the layer's filters and shadow effects are applied, but before the opacity modulation. As an implementation detail the rendering engine may attempt to cache and reuse the bitmap from one frame to the next. (Whether it does or not will have no affect on the rendered output.) When false the layer is composited directly into the destination whenever possible (however, certain features of the compositing model may force rasterization, e.g. adding filters). Defaults to NO. Animatable.
      • speed

        public float speed()
        Description copied from interface: CAMediaTiming
        The rate of the layer. Used to scale parent time to local time, e.g. if rate is 2, local time progresses twice as fast as parent time. Defaults to 1.
        Specified by:
        speed in interface CAMediaTiming
      • style

        public NSDictionary<?,​?> style()
        When non-nil, a dictionary dereferenced to find property values that aren't explicitly defined by the layer. (This dictionary may in turn have a `style' property, forming a hierarchy of default values.) If the style dictionary doesn't define a value for an attribute, the +defaultValueForKey: method is called. Defaults to nil. Note that if the dictionary or any of its ancestors are modified, the values of the layer's properties are undefined until the `style' property is reset.
      • sublayerTransform

        public CATransform3D sublayerTransform()
        A transform applied to each member of the `sublayers' array while rendering its contents into the receiver's output. Typically used as the projection matrix to add perspective and other viewing effects into the model. Defaults to identity. Animatable.
      • sublayers

        public NSArray<? extends CALayer> sublayers()
        The array of sublayers of this layer. The layers are listed in back to front order. Defaults to nil. When setting the value of the property, any newly added layers must have nil superlayers, otherwise the behavior is undefined. Note that the returned array is not guaranteed to retain its elements.
      • superlayer

        public CALayer superlayer()
        The receiver's superlayer object. Implicitly changed to match the hierarchy described by the `sublayers' properties.
      • timeOffset

        public double timeOffset()
        Description copied from interface: CAMediaTiming
        Additional offset in active local time. i.e. to convert from parent time tp to active local time t: t = (tp - begin) * speed + offset. One use of this is to "pause" a layer by setting `speed' to zero and `offset' to a suitable value. Defaults to 0.
        Specified by:
        timeOffset in interface CAMediaTiming
      • transform

        public CATransform3D transform()
        A transform applied to the layer relative to the anchor point of its bounds rect. Defaults to the identity transform. Animatable.
      • visibleRect

        public CGRect visibleRect()
        Returns the visible region of the receiver, in its own coordinate space. The visible region is the area not clipped by the containing scroll layer.
      • zPosition

        public double zPosition()
        The Z component of the layer's position in its superlayer. Defaults to zero. Animatable.
      • maskedCorners

        public long maskedCorners()
        Defines which of the four corners receives the masking when using `cornerRadius' property. Defaults to all four corners.
      • setMaskedCorners

        public void setMaskedCorners​(long value)
        Defines which of the four corners receives the masking when using `cornerRadius' property. Defaults to all four corners.
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • cornerCurve

        public java.lang.String cornerCurve()
        Defines the curve used for rendering the rounded corners of the layer. Defaults to 'kCACornerCurveCircular'.
      • cornerCurveExpansionFactor

        public static double cornerCurveExpansionFactor​(java.lang.String curve)
        Expansion scale factor applied to the rounded corner bounding box size when specific corner curve is used.
      • setCornerCurve

        public void setCornerCurve​(java.lang.String value)
        Defines the curve used for rendering the rounded corners of the layer. Defaults to 'kCACornerCurveCircular'.