Package apple.uikit

Class UIImage

    • Constructor Detail

      • UIImage

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static UIImage alloc()
      • allocWithZone

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

        public static UIImage animatedImageNamedDuration​(java.lang.String name,
                                                         double duration)
        read sequence of files with suffix starting at 0 or 1
      • animatedImageWithImagesDuration

        public static UIImage animatedImageWithImagesDuration​(NSArray<? extends UIImage> images,
                                                              double duration)
      • animatedResizableImageNamedCapInsetsDuration

        public static UIImage animatedResizableImageNamedCapInsetsDuration​(java.lang.String name,
                                                                           UIEdgeInsets capInsets,
                                                                           double duration)
        sequence of files
      • animatedResizableImageNamedCapInsetsResizingModeDuration

        public static UIImage animatedResizableImageNamedCapInsetsResizingModeDuration​(java.lang.String name,
                                                                                       UIEdgeInsets capInsets,
                                                                                       long resizingMode,
                                                                                       double duration)
      • 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()
      • description_static

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

        public static long hash_static()
      • imageNamed

        public static UIImage imageNamed​(java.lang.String name)
        load from main bundle
      • imageNamedInBundleCompatibleWithTraitCollection

        public static UIImage imageNamedInBundleCompatibleWithTraitCollection​(java.lang.String name,
                                                                              NSBundle bundle,
                                                                              UITraitCollection traitCollection)
      • imageWithCGImageScaleOrientation

        public static UIImage imageWithCGImageScaleOrientation​(CGImageRef cgImage,
                                                               double scale,
                                                               long orientation)
      • imageWithCIImage

        public static UIImage imageWithCIImage​(CIImage ciImage)
      • imageWithCIImageScaleOrientation

        public static UIImage imageWithCIImageScaleOrientation​(CIImage ciImage,
                                                               double scale,
                                                               long orientation)
      • imageWithContentsOfFile

        public static UIImage imageWithContentsOfFile​(java.lang.String path)
      • imageWithData

        public static UIImage imageWithData​(NSData data)
      • imageWithDataScale

        public static UIImage imageWithDataScale​(NSData data,
                                                 double scale)
      • 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)
      • 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()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • CIImage

        public CIImage CIImage()
        returns underlying CIImage or nil if CGImageRef based
      • alignmentRectInsets

        public UIEdgeInsets alignmentRectInsets()
      • capInsets

        public UIEdgeInsets capInsets()
        default is UIEdgeInsetsZero for non resizable images
      • drawAsPatternInRect

        public void drawAsPatternInRect​(CGRect rect)
        draws the image as a CGPattern
      • drawAtPoint

        public void drawAtPoint​(CGPoint point)
        mode = kCGBlendModeNormal, alpha = 1.0
      • drawAtPointBlendModeAlpha

        public void drawAtPointBlendModeAlpha​(CGPoint point,
                                              int blendMode,
                                              double alpha)
      • drawInRect

        public void drawInRect​(CGRect rect)
        mode = kCGBlendModeNormal, alpha = 1.0
      • drawInRectBlendModeAlpha

        public void drawInRectBlendModeAlpha​(CGRect rect,
                                             int blendMode,
                                             double alpha)
      • duration

        public double duration()
        total duration for all frames. default is 0 for non-animated images
      • flipsForRightToLeftLayoutDirection

        public boolean flipsForRightToLeftLayoutDirection()
      • imageAsset

        public UIImageAsset imageAsset()
        The asset is not encoded along with the image. Returns nil if the image is not CGImage based.
      • imageFlippedForRightToLeftLayoutDirection

        public UIImage imageFlippedForRightToLeftLayoutDirection()
        Creates a version of this image that, when assigned to a UIImageView’s image property, draws its underlying image contents horizontally mirrored when running under a right-to-left language. Affects the flipsForRightToLeftLayoutDirection property; does not affect the imageOrientation property. This method cannot be used to create a left-to-right version of a right-to-left source image, and will be deprecated in a future release. New code should instead use -imageWithHorizontallyFlippedOrientation to construct a UIImageAsset.
      • imageOrientation

        public long imageOrientation()
        this will affect how the image is composited
      • imageRendererFormat

        public UIGraphicsImageRendererFormat imageRendererFormat()
        Returns an optimal UIGraphicsImageRendererFormat instance for this image, maintaining pixel format and color space.
      • imageWithAlignmentRectInsets

        public UIImage imageWithAlignmentRectInsets​(UIEdgeInsets alignmentInsets)
        Support for constraint-based layout (auto layout) The alignmentRectInsets of a UIImage are used by UIImageView and other UIView and UIControl subclasses that take custom images to determine the view's alignment rect insets for constraint-based layout. The default alignmentRectInsets are UIEdgeInsetsZero.
      • imageWithHorizontallyFlippedOrientation

        public UIImage imageWithHorizontallyFlippedOrientation()
        Creates a version of this image with an imageOrientation property that is horizontally mirrored from this image’s. Does not affect the flipsForRightToLeftLayoutDirection property.
      • imageWithRenderingMode

        public UIImage imageWithRenderingMode​(long renderingMode)
        Create a version of this image with the specified rendering mode. By default, images have a rendering mode of UIImageRenderingModeAutomatic.
      • images

        public NSArray<? extends UIImage> images()
        default is nil for non-animated images
      • initWithCGImageScaleOrientation

        public UIImage initWithCGImageScaleOrientation​(CGImageRef cgImage,
                                                       double scale,
                                                       long orientation)
      • initWithCIImage

        public UIImage initWithCIImage​(CIImage ciImage)
      • initWithCIImageScaleOrientation

        public UIImage initWithCIImageScaleOrientation​(CIImage ciImage,
                                                       double scale,
                                                       long orientation)
      • initWithContentsOfFile

        public UIImage initWithContentsOfFile​(java.lang.String path)
      • initWithDataScale

        public UIImage initWithDataScale​(NSData data,
                                         double scale)
      • leftCapWidth

        public long leftCapWidth()
        default is 0. if non-zero, horiz. stretchable. right cap is calculated as width - leftCapWidth - 1
      • renderingMode

        public long renderingMode()
      • resizableImageWithCapInsets

        public UIImage resizableImageWithCapInsets​(UIEdgeInsets capInsets)
        create a resizable version of this image. the interior is tiled when drawn.
      • resizableImageWithCapInsetsResizingMode

        public UIImage resizableImageWithCapInsetsResizingMode​(UIEdgeInsets capInsets,
                                                               long resizingMode)
        the interior is resized according to the resizingMode
      • resizingMode

        public long resizingMode()
        default is UIImageResizingModeTile
      • scale

        public double scale()
      • size

        public CGSize size()
        reflects orientation setting. In iOS 4.0 and later, this is measured in points. In 3.x and earlier, measured in pixels
      • stretchableImageWithLeftCapWidthTopCapHeight

        public UIImage stretchableImageWithLeftCapWidthTopCapHeight​(long leftCapWidth,
                                                                    long topCapHeight)
        use resizableImageWithCapInsets: and capInsets.
      • _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
      • topCapHeight

        public long topCapHeight()
        default is 0. if non-zero, vert. stretchable. bottom cap is calculated as height - topCapWidth - 1
      • traitCollection

        public UITraitCollection traitCollection()
        describes the image in terms of its traits
      • itemProviderVisibilityForRepresentationWithTypeIdentifier_static

        public static long itemProviderVisibilityForRepresentationWithTypeIdentifier_static​(java.lang.String typeIdentifier)
      • itemProviderVisibilityForRepresentationWithTypeIdentifier

        public long itemProviderVisibilityForRepresentationWithTypeIdentifier​(java.lang.String typeIdentifier)
      • objectWithItemProviderDataTypeIdentifierError

        public static java.lang.Object objectWithItemProviderDataTypeIdentifierError​(NSData data,
                                                                                     java.lang.String typeIdentifier,
                                                                                     org.moe.natj.general.ptr.Ptr<NSError> outError)
      • readableTypeIdentifiersForItemProvider

        public static NSArray<java.lang.String> readableTypeIdentifiersForItemProvider()
      • writableTypeIdentifiersForItemProvider_static

        public static NSArray<java.lang.String> writableTypeIdentifiersForItemProvider_static()
      • writableTypeIdentifiersForItemProvider

        public NSArray<java.lang.String> writableTypeIdentifiersForItemProvider()
      • actionsImage

        public static UIImage actionsImage()
        currently: white ellipsis on tinted filled circle
      • addImage

        public static UIImage addImage()
        currently: white + on green filled cirlce
      • baselineOffsetFromBottom

        public double baselineOffsetFromBottom()
        The baseline offset is expressed in points from the bottom of the image (positive = up, negative = down). If the image doesn't have a defined baseline, this value will be 0, but you can use -hasBaseline to see if it actually has one defined (because it is perfectly possible to have a baseline with the value of 0).
      • checkmarkImage

        public static UIImage checkmarkImage()
        currently: white ✓ on tinted filled circle
      • configuration

        public UIImageConfiguration configuration()
        Configuration support --------------------- This describes the configuration of the image. Depending on which type of image, the configuration might be different. Symbol images will always have a UIImageSymbolConfiguration, even if you give it another type of configuration (it will merge the trait info from the other configuration into its current configuration). Images start off with an unspecified configuration but can be modified by the methods below. The preferred ways of adding configurations for displaying images is to specify them on the image view, but it is possible to modify images with a more specific configuration.
      • hasBaseline

        public boolean hasBaseline()
      • imageByApplyingSymbolConfiguration

        public UIImage imageByApplyingSymbolConfiguration​(UIImageSymbolConfiguration configuration)
        This is a convience method to apply another symbol configuration over an existing one. If the image doesn't have a symbolconfiguration, it will just merge the traits of the existing with the new one (where the new traits override the old traits). The symbol in Create a new image by applying the specified configuration over the existing one. This only works if the configuration already has a configuration (i.e. is a symbol image). The image will be configured with a combination of both configurations. If you use this on a symbol image with other layout modifications done (e.g. changed baseline), those changes will be lost and overwritten with the new configuration's layout properties. This applies to size, contentInsets and baseline.
      • imageNamedInBundleWithConfiguration

        public static UIImage imageNamedInBundleWithConfiguration​(java.lang.String name,
                                                                  NSBundle bundle,
                                                                  UIImageConfiguration configuration)
      • imageWithBaselineOffsetFromBottom

        public UIImage imageWithBaselineOffsetFromBottom​(double baselineOffset)
      • imageWithConfiguration

        public UIImage imageWithConfiguration​(UIImageConfiguration configuration)
        * Create a new image by replacing the existing configuration with a new one. * For symbol images this will always result in an image with a UIImageSymbolConfiguration, * even if you give it another type of configuration (the trait info from the new configuration * will be merged into the current symbol configuration resulting in anew symbol configuration). * For non-symbol images, this will replace the configuration of the image with a new one. * * Important note! Given (for example): * * image = image(named:"the_image").withRenderingMode(.alwaysTemplate) * the following two statements aren't exactly equivalent: * * a = image.imageAsset.withConfiguration(configuration) * b = image.withConfiguration(configuration) * * The first one will resolve the image again from the asset catalog (if it is originating from one), * resulting in a fresh image without any modifications. In other words, `a` won't have the * rendering mode change set anymore, and it will be "reverted" to `.automatic`. * The second one will resolve the image, but apply and changes that were made to the image. * That means that `b` might be a different image, but it will still have the same rendering mode * as `image`.
      • imageWithTintColor

        public UIImage imageWithTintColor​(UIColor color)
      • imageWithTintColorRenderingMode

        public UIImage imageWithTintColorRenderingMode​(UIColor color,
                                                       long renderingMode)
      • imageWithoutBaseline

        public UIImage imageWithoutBaseline()
      • isSymbolImage

        public boolean isSymbolImage()
      • removeImage

        public static UIImage removeImage()
        currently: white - on red filled circle
      • strokedCheckmarkImage

        public static UIImage strokedCheckmarkImage()
        currently: white ✓ on tinted filled and white stroked circle
      • symbolConfiguration

        public UIImageSymbolConfiguration symbolConfiguration()
        Symbol configuration support ---------------------------- This describes the symbol configuration of a symbol image. Symbol images start off with an unspecified configuration but can be modified by using `image.withConfiguration(:)`. However... the preferred ways of adding configurations for displaying images is to specify them on the image view using `preferredSymbolConfiguration`, but it is possible to modify images with a more specific configuration. This include image related traits, for example you can use this to fix a symbol image to a dynamic type style at a fixed preferred content size category.
      • systemImageNamed

        public static UIImage systemImageNamed​(java.lang.String name)
        Retrieve a system-provided image with the specified name. This will only return system-provided images. If you want a custom image as defined in your own catalogs, you should use +imageNamed:. UIKit applications on macOS may pass NSImageName values (defined in ) for the name to access macOS system images. Returns nil if an image with specified name doesn't exist.
      • systemImageNamedCompatibleWithTraitCollection

        public static UIImage systemImageNamedCompatibleWithTraitCollection​(java.lang.String name,
                                                                            UITraitCollection traitCollection)
      • systemImageNamedWithConfiguration

        public static UIImage systemImageNamedWithConfiguration​(java.lang.String name,
                                                                UIImageConfiguration configuration)