ColorPaint

Since: BlackBerry 10.0.0

#include <bb/cascades/ColorPaint>

A representation of a color.

The actual value of the color is not exposed through this API.

Note:

This class currently has a limited purpose. In the future we may want to represent "theme colors" rather than colors with specific RGB values, and then this class provides the appropriate level of abstraction. We already make use of it in SystemDefaults.

See also:

Color


Overview

Inheritance

bb::cascades::Paint
bb::cascades::ColorPaint
bb::cascades::Color

Public Functions Index

ColorPaint ()
ColorPaint (const ColorPaint &orig)
virtual ~ColorPaint ()
virtual booloperator!= (const Paint &other) const
virtual ColorPaint &operator= (const ColorPaint &other)
virtual booloperator== (const Paint &other) const
boolisNull () const Inherited
Paint &operator= (const Paint &other)Inherited
Paint (const Paint &orig)Inherited

Public Functions

ColorPaint ()

Creates a null ColorPaint object.

See also:

Paint::isNull()

Since:

BlackBerry 10.0.0

ColorPaint (

A copy constructor which creates a copy of the passed ColorPaint object.

Allows instantiation of a ColorPaint based on another ColorPaint object:
 ColorPaint c = SystemDefaults::Paints::defaultText();
        or
 ColorPaint c(SystemDefaults::Paints::defaultText());
Parameters
orig

The ColorPaint object to create a copy of.

Since:

BlackBerry 10.0.0

virtual~ColorPaint ()

Destructor.

Since:

BlackBerry 10.0.0

virtual bool operator!= (

A != operator for paint objects.

This is equivalent to !operator==();

Return:

true if the objects are not equal, false otherwise.

Since:

BlackBerry 10.0.0

virtualColorPaint & operator= (

Assignment operator that makes this color a copy of the passed color.

Parameters
other

The ColorPaint object to make a copy of.

Since:

BlackBerry 10.0.0

virtual bool operator== (

An == operator for ColorPaint objects.

The objects are equal if they stem from the same original object (for example, if they represent the same SystemDefault color) or if they are both null paints.

Subclasses can override this criteria in their own implementation.

See also:

SystemDefaults

Return:

true if the objects stem from the same original object, or if both paints are null, false otherwise.

Since:

BlackBerry 10.0.0

bool isNull ()Inherited

Checks whether this Paint object is a null paint.

Return:

true if this Paint object is a null paint, false otherwise.

Since:

BlackBerry 10.0.0

Paint & operator= (Inherited

A = operator for Paint objects.

Since:

BlackBerry 10.0.0

Paint (Inherited

Copy constructor for Paint objects.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus