init(texture:size:highlight:offset:tintColor:)
Creates a new image with the specified texture, size, highlight texture, offset, and color tint.
Declaration
init(texture: any MTLTexture, size: CGSize, highlight highlightTexture: (any MTLTexture)?, offset: CGPoint, tintColor: CGColor)Parameters
- texture:
The Metal texture to use for the image.
- size:
The size of the image in points.
- highlightTexture:
The Metal texture to use for the image when highlighted. May be
nil. - offset:
The offset from the center of the parent control in points.
- tintColor:
The color tint to apply to the texture. The color ref is retained.
Return Value
A new TCControlImage instance.