One Logo Pool Ball
CoreGraphics · IOS API REFERENCE

CGBitmapInfo

struct · iOS 2.0+ · SDK 27.1

struct CGBitmapInfo

Members (38)

get · iOS 2.0+ · Deprecated in iOS 100000.0

byteOrder16Big

TypeScript
get byteOrder16Big(): CGBitmapInfo
Swift declaration
static var byteOrder16Big: CGBitmapInfo { get }
get · iOS 2.0+ · Deprecated in iOS 100000.0

byteOrder16Little

TypeScript
get byteOrder16Little(): CGBitmapInfo
Swift declaration
static var byteOrder16Little: CGBitmapInfo { get }
get · iOS 2.0+ · Deprecated in iOS 100000.0

byteOrder32Big

TypeScript
get byteOrder32Big(): CGBitmapInfo
Swift declaration
static var byteOrder32Big: CGBitmapInfo { get }
get · iOS 2.0+ · Deprecated in iOS 100000.0

byteOrder32Little

TypeScript
get byteOrder32Little(): CGBitmapInfo
Swift declaration
static var byteOrder32Little: CGBitmapInfo { get }
get · iOS 2.0+ · Deprecated in iOS 100000.0

byteOrderDefault

TypeScript
get byteOrderDefault(): CGBitmapInfo
Swift declaration
static var byteOrderDefault: CGBitmapInfo { get }
get · iOS 2.0+ · Deprecated in iOS 100000.0

floatComponents

TypeScript
get floatComponents(): CGBitmapInfo
Swift declaration
static var floatComponents: CGBitmapInfo { get }
get · iOS 7.0+ · Deprecated in iOS 10000.0

alphaInfoMask

TypeScript
get alphaInfoMask(): CGBitmapInfo
Swift declaration
static var alphaInfoMask: CGBitmapInfo { get }
get · iOS 7.0+ · Deprecated in iOS 10000.0

floatInfoMask

TypeScript
get floatInfoMask(): CGBitmapInfo
Swift declaration
static var floatInfoMask: CGBitmapInfo { get }
method · iOS 7.0+ · Deprecated in iOS 10000.0

isDisjoint

TypeScript
isDisjoint($self: CGBitmapInfo, other: CGBitmapInfo): boolean
Swift declaration
func isDisjoint(with other: CGBitmapInfo) -> Bool

Returns a Boolean value that indicates whether the set has no members in common with the given set. In the following example, the `employees` set is disjoint with the `visitors` set because no name appears in both sets. let employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let visitors: Set = ["Marcia", "Nathaniel", "Olivia"] print(employees.isDisjoint(with: visitors)) // Prints "true" - Parameter other: A set of the same type as the current set. - Returns: `true` if the set has no elements in common with `other`; otherwise, `false`.

method · iOS 7.0+ · Deprecated in iOS 10000.0

isSuperset

TypeScript
isSuperset($self: CGBitmapInfo, other: CGBitmapInfo): boolean
Swift declaration
func isSuperset(of other: CGBitmapInfo) -> Bool

Returns a Boolean value that indicates whether the set is a superset of the given set. Set *A* is a superset of another set *B* if every member of *B* is also a member of *A*. let employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let attendees: Set = ["Alicia", "Bethany", "Diana"] print(employees.isSuperset(of: attendees)) // Prints "true" - Parameter other: A set of the same type as the current set. - Returns: `true` if the set is a superset of `possibleSubset`; otherwise, `false`.

get · iOS 12.0+

pixelFormat

TypeScript
getPixelFormat($self: CGBitmapInfo): CGImagePixelFormatInfo
Swift declaration
var pixelFormat: CGImagePixelFormatInfo { get set }
set · iOS 12.0+

pixelFormat

TypeScript
setPixelFormat($self: CGBitmapInfo, value: CGImagePixelFormatInfo): void
Swift declaration
var pixelFormat: CGImagePixelFormatInfo { get set }
method · iOS 7.0+ · Deprecated in iOS 10000.0

subtracting

TypeScript
subtracting($self: CGBitmapInfo, other: CGBitmapInfo): CGBitmapInfo
Swift declaration
func subtracting(_ other: CGBitmapInfo) -> CGBitmapInfo

Returns a new set containing the elements of this set that do not occur in the given set. In the following example, the `nonNeighbors` set is made up of the elements of the `employees` set that are not elements of `neighbors`: let employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] let nonNeighbors = employees.subtracting(neighbors) print(nonNeighbors) // Prints "["Diana", "Chris", "Alicia"]" - Parameter other: A set of the same type as the current set. - Returns: A new set.

get · iOS 7.0+

customMirror

TypeScript
getCustomMirror($self: CGBitmapInfo): SDKHandle
Swift declaration
var customMirror: Mirror { get }

The custom mirror for this instance. If this type has value semantics, the mirror should be unaffected by subsequent mutations of the instance.

method · iOS 7.0+ · Deprecated in iOS 10000.0

intersection

TypeScript
intersection($self: CGBitmapInfo, other: CGBitmapInfo): CGBitmapInfo
Swift declaration
func intersection(_ other: CGBitmapInfo) -> CGBitmapInfo

Returns a new set with the elements that are common to both this set and the given set. In the following example, the `bothNeighborsAndEmployees` set is made up of the elements that are in *both* the `employees` and `neighbors` sets. Elements that are in only one or the other are left out of the result of the intersection. let employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] let bothNeighborsAndEmployees = employees.intersection(neighbors) print(bothNeighborsAndEmployees) // Prints "["Bethany", "Eric"]" - Parameter other: A set of the same type as the current set. - Returns: A new set. - Note: if this set and `other` contain elements that are equal but distinguishable (e.g. via `===`), which of these elements is present in the result is unspecified.

get · iOS 7.0+ · Deprecated in iOS 10000.0

byteOrderMask

TypeScript
get byteOrderMask(): CGBitmapInfo
Swift declaration
static var byteOrderMask: CGBitmapInfo { get }
get · iOS 7.0+

debugDescription

TypeScript
getDebugDescription($self: CGBitmapInfo): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 7.0+ · Deprecated in iOS 10000.0

formIntersection

TypeScript
formIntersection($self: CGBitmapInfo, other: CGBitmapInfo): void
Swift declaration
mutating func formIntersection(_ other: CGBitmapInfo)

Removes the elements of this set that aren't also in the given set. In the following example, the elements of the `employees` set that are not also members of the `neighbors` set are removed. In particular, the names `"Alicia"`, `"Chris"`, and `"Diana"` are removed. var employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] employees.formIntersection(neighbors) print(employees) // Prints "["Bethany", "Eric"]" - Parameter other: A set of the same type as the current set.

method · iOS 7.0+ · Deprecated in iOS 10000.0

symmetricDifference

TypeScript
symmetricDifference($self: CGBitmapInfo, other: CGBitmapInfo): CGBitmapInfo
Swift declaration
func symmetricDifference(_ other: CGBitmapInfo) -> CGBitmapInfo

Returns a new set with the elements that are either in this set or in the given set, but not in both. In the following example, the `eitherNeighborsOrEmployees` set is made up of the elements of the `employees` and `neighbors` sets that are not in both `employees` *and* `neighbors`. In particular, the names `"Bethany"` and `"Eric"` do not appear in `eitherNeighborsOrEmployees`. let employees: Set = ["Alicia", "Bethany", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani"] let eitherNeighborsOrEmployees = employees.symmetricDifference(neighbors) print(eitherNeighborsOrEmployees) // Prints "["Diana", "Forlani", "Alicia"]" - Parameter other: A set of the same type as the current set. - Returns: A new set.

method · iOS 7.0+ · Deprecated in iOS 10000.0

formSymmetricDifference

TypeScript
formSymmetricDifference($self: CGBitmapInfo, other: CGBitmapInfo): void
Swift declaration
mutating func formSymmetricDifference(_ other: CGBitmapInfo)

Removes the elements of the set that are also in the given set and adds the members of the given set that are not already in the set. In the following example, the elements of the `employees` set that are also members of `neighbors` are removed from `employees`, while the elements of `neighbors` that are not members of `employees` are added to `employees`. In particular, the names `"Bethany"` and `"Eric"` are removed from `employees` while the name `"Forlani"` is added. var employees: Set = ["Alicia", "Bethany", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani"] employees.formSymmetricDifference(neighbors) print(employees) // Prints "["Diana", "Forlani", "Alicia"]" - Parameter other: A set of the same type.

init · iOS 12.0+

init

TypeScript
initAlphaComponentByteOrderPixelFormat(alpha?: CGImageAlphaInfo, component?: CGImageComponentInfo, byteOrder?: CGImageByteOrderInfo, pixelFormat?: CGImagePixelFormatInfo): CGBitmapInfo
Swift declaration
init(alpha: CGImageAlphaInfo = .none, component: CGImageComponentInfo = .integer, byteOrder: CGImageByteOrderInfo = .orderDefault, pixelFormat: CGImagePixelFormatInfo = .packed)
init · iOS 7.0+

init

TypeScript
initAlphaComponentByteOrder(alpha?: CGImageAlphaInfo, component?: CGImageComponentInfo, byteOrder?: CGImageByteOrderInfo): CGBitmapInfo
Swift declaration
init(alpha: CGImageAlphaInfo = .none, component: CGImageComponentInfo = .integer, byteOrder: CGImageByteOrderInfo = .orderDefault)
get · iOS 7.0+

alpha

TypeScript
getAlpha($self: CGBitmapInfo): CGImageAlphaInfo
Swift declaration
var alpha: CGImageAlphaInfo { get set }
set · iOS 7.0+

alpha

TypeScript
setAlpha($self: CGBitmapInfo, value: CGImageAlphaInfo): void
Swift declaration
var alpha: CGImageAlphaInfo { get set }
method · iOS 7.0+ · Deprecated in iOS 10000.0

union

TypeScript
union($self: CGBitmapInfo, other: CGBitmapInfo): CGBitmapInfo
Swift declaration
func union(_ other: CGBitmapInfo) -> CGBitmapInfo

Returns a new set with the elements of both this and the given set. In the following example, the `attendeesAndVisitors` set is made up of the elements of the `attendees` and `visitors` sets: let attendees: Set = ["Alicia", "Bethany", "Diana"] let visitors = ["Marcia", "Nathaniel"] let attendeesAndVisitors = attendees.union(visitors) print(attendeesAndVisitors) // Prints "["Diana", "Nathaniel", "Bethany", "Alicia", "Marcia"]" If the set already contains one or more elements that are also in `other`, the existing members are kept. let initialIndices = Set(0..<5) let expandedIndices = initialIndices.union([2, 3, 6, 7]) print(expandedIndices) // Prints "[2, 4, 6, 7, 0, 1, 3]" - Parameter other: A set of the same type as the current set. - Returns: A new set with the unique elements of this set and `other`. - Note: if this set and `other` contain elements that are equal but distinguishable (e.g. via `===`), which of these elements is present in the result is unspecified.

method · iOS 7.0+ · Deprecated in iOS 10000.0

insert

TypeScript
insert($self: CGBitmapInfo, newMember: CGBitmapInfo): { "inserted": boolean; "memberAfterInsert": CGBitmapInfo }
Swift declaration
@discardableResult mutating func insert(_ newMember: CGBitmapInfo) -> (inserted: Bool, memberAfterInsert: CGBitmapInfo)

Inserts the given element in the set if it is not already present. If an element equal to `newMember` is already contained in the set, this method has no effect. In this example, a new element is inserted into `classDays`, a set of days of the week. When an existing element is inserted, the `classDays` set does not change. enum DayOfTheWeek: Int { case sunday, monday, tuesday, wednesday, thursday, friday, saturday } var classDays: Set<DayOfTheWeek> = [.wednesday, .friday] print(classDays.insert(.monday)) // Prints "(true, .monday)" print(classDays) // Prints "[.friday, .wednesday, .monday]" print(classDays.insert(.friday)) // Prints "(false, .friday)" print(classDays) // Prints "[.friday, .wednesday, .monday]" - Parameter newMember: An element to insert into the set. - Returns: `(true, newMember)` if `newMember` was not contained in the set. If an element equal to `newMember` was already contained in the set, the method returns `(false, oldMember)`, where `oldMember` is the element that was equal to `newMember`. In some cases, `oldMember` may be distinguishable from `newMember` by identity comparison or some other means.

method · iOS 7.0+ · Deprecated in iOS 10000.0

remove

TypeScript
remove($self: CGBitmapInfo, member: CGBitmapInfo): (CGBitmapInfo) | null
Swift declaration
@discardableResult mutating func remove(_ member: CGBitmapInfo) -> CGBitmapInfo?

Removes the given element and any elements subsumed by the given element. - Parameter member: The element of the set to remove. - Returns: For ordinary sets, an element equal to `member` if `member` is contained in the set; otherwise, `nil`. In some cases, a returned element may be distinguishable from `member` by identity comparison or some other means. For sets where the set type and element type are the same, like `OptionSet` types, this method returns any intersection between the set and `[member]`, or `nil` if the intersection is empty.

method · iOS 7.0+ · Deprecated in iOS 10000.0

update

TypeScript
update($self: CGBitmapInfo, newMember: CGBitmapInfo): (CGBitmapInfo) | null
Swift declaration
@discardableResult mutating func update(with newMember: CGBitmapInfo) -> CGBitmapInfo?

Inserts the given element into the set unconditionally. If an element equal to `newMember` is already contained in the set, `newMember` replaces the existing element. In this example, an existing element is inserted into `classDays`, a set of days of the week. enum DayOfTheWeek: Int { case sunday, monday, tuesday, wednesday, thursday, friday, saturday } var classDays: Set<DayOfTheWeek> = [.monday, .wednesday, .friday] print(classDays.update(with: .monday)) // Prints "Optional(.monday)" - Parameter newMember: An element to insert into the set. - Returns: For ordinary sets, an element equal to `newMember` if the set already contained such a member; otherwise, `nil`. In some cases, the returned element may be distinguishable from `newMember` by identity comparison or some other means. For sets where the set type and element type are the same, like `OptionSet` types, this method returns any intersection between the set and `[newMember]`, or `nil` if the intersection is empty.

get · iOS 7.0+ · Deprecated in iOS 10000.0

isEmpty

TypeScript
getIsEmpty($self: CGBitmapInfo): boolean
Swift declaration
var isEmpty: Bool { get }

A Boolean value that indicates whether the set has no elements.

method · iOS 7.0+ · Deprecated in iOS 10000.0

contains

TypeScript
contains($self: CGBitmapInfo, member: CGBitmapInfo): boolean
Swift declaration
func contains(_ member: CGBitmapInfo) -> Bool

Returns a Boolean value that indicates whether the given element exists in the set. This example uses the `contains(_:)` method to test whether an integer is a member of a set of prime numbers. let primes: Set = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37] let x = 5 if primes.contains(x) { print("\(x) is prime!") } else { print("\(x). Not prime.") } // Prints "5 is prime!" - Parameter member: An element to look for in the set. - Returns: `true` if `member` exists in the set; otherwise, `false`.

method · iOS 7.0+ · Deprecated in iOS 10000.0

isSubset

TypeScript
isSubset($self: CGBitmapInfo, other: CGBitmapInfo): boolean
Swift declaration
func isSubset(of other: CGBitmapInfo) -> Bool

Returns a Boolean value that indicates whether the set is a subset of another set. Set *A* is a subset of another set *B* if every member of *A* is also a member of *B*. let employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let attendees: Set = ["Alicia", "Bethany", "Diana"] print(attendees.isSubset(of: employees)) // Prints "true" - Parameter other: A set of the same type as the current set. - Returns: `true` if the set is a subset of `other`; otherwise, `false`.

method · iOS 7.0+ · Deprecated in iOS 10000.0

subtract

TypeScript
subtract($self: CGBitmapInfo, other: CGBitmapInfo): void
Swift declaration
mutating func subtract(_ other: CGBitmapInfo)

Removes the elements of the given set from this set. In the following example, the elements of the `employees` set that are also members of the `neighbors` set are removed. In particular, the names `"Bethany"` and `"Eric"` are removed from `employees`. var employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] employees.subtract(neighbors) print(employees) // Prints "["Diana", "Chris", "Alicia"]" - Parameter other: A set of the same type as the current set.

get · iOS 7.0+

byteOrder

TypeScript
getByteOrder($self: CGBitmapInfo): CGImageByteOrderInfo
Swift declaration
var byteOrder: CGImageByteOrderInfo { get set }
set · iOS 7.0+

byteOrder

TypeScript
setByteOrder($self: CGBitmapInfo, value: CGImageByteOrderInfo): void
Swift declaration
var byteOrder: CGImageByteOrderInfo { get set }
get · iOS 7.0+

component

TypeScript
getComponent($self: CGBitmapInfo): CGImageComponentInfo
Swift declaration
var component: CGImageComponentInfo { get set }
set · iOS 7.0+

component

TypeScript
setComponent($self: CGBitmapInfo, value: CGImageComponentInfo): void
Swift declaration
var component: CGImageComponentInfo { get set }
method · iOS 7.0+ · Deprecated in iOS 10000.0

formUnion

TypeScript
formUnion($self: CGBitmapInfo, other: CGBitmapInfo): void
Swift declaration
mutating func formUnion(_ other: CGBitmapInfo)

Adds the elements of the given set to the set. In the following example, the elements of the `visitors` set are added to the `attendees` set: var attendees: Set = ["Alicia", "Bethany", "Diana"] let visitors: Set = ["Diana", "Marcia", "Nathaniel"] attendees.formUnion(visitors) print(attendees) // Prints "["Diana", "Nathaniel", "Bethany", "Alicia", "Marcia"]" If the set already contains one or more elements that are also in `other`, the existing members are kept. var initialIndices = Set(0..<5) initialIndices.formUnion([2, 3, 6, 7]) print(initialIndices) // Prints "[2, 4, 6, 7, 0, 1, 3]" - Parameter other: A set of the same type as the current set.

init · iOS 2.0+

init

TypeScript
initRawValue(rawValue: number): CGBitmapInfo
Swift declaration
init(rawValue: UInt32)

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CGBitmapInfo.init(arrayLiteral:)

A variable number of Swift arguments is not supported.

CGBitmapInfo.init(_:)

This parameter hides a concrete Swift type.

All CoreGraphics types →