<html> <head> <title>Interface XColorSpace</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimain"><a href="XColorSpace-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' Details</td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">rendering</a> :: </p> </td> </tr> <tr> <td class="title"><table class="title-table" width="99%"> <tr> <td width="25%" class="title2">unpublished </td> <td width="50%" class="title">interface XColorSpace</td> <td width="*"/></tr> </table> </td> </tr> <tr> <td/></tr> <tr> <td><dl> <dt><b>Usage Restrictions</b></dt> <dd><i>not published</i></dd> <dt><b>Description</b></dt> <dd>Information how to interpret certain color data.</dd> <dd><p> This interface encapsulates all information that is necessary to interpret color data, by defining a describing color space, like for example CMYK or sRGB. You can either convert between this and an arbitrary other colorspace, or into the standard RGB or ARGB formats (because those are so overwhelmingly common in computer graphics).<p> All canvas interfaces standardize to sequences of IEEE doubles for color representation. As this is overly verbose when used for bitmap data, derived interfaces exist, e.g. <a href="XIntegerBitmapColorSpace.html">XIntegerBitmapColorSpace</a>, which use sequences of integers for color representation.<p> </dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#getType">getType</a></td> <td class="imsum_right">Query type of this color space. </td> </tr> <tr> <td class="imsum_left"><a href="#getComponentTags">getComponentTags</a></td> <td class="imsum_right">Query the kind for each color component. </td> </tr> <tr> <td class="imsum_left"><a href="#getRenderingIntent">getRenderingIntent</a></td> <td class="imsum_right">Query rendering intent of this color space. </td> </tr> <tr> <td class="imsum_left"><a href="#getProperties">getProperties</a></td> <td class="imsum_right">Query various optional properties from the color space. </td> </tr> <tr> <td class="imsum_left"><a href="#convertColorSpace">convertColorSpace</a></td> <td class="imsum_right">Convert to color of another color space. </td> </tr> <tr> <td class="imsum_left"><a href="#convertToRGB">convertToRGB</a></td> <td class="imsum_right">Convert color value in this color space to sRGB color values. </td> </tr> <tr> <td class="imsum_left"><a href="#convertToARGB">convertToARGB</a></td> <td class="imsum_right">Convert color value in this color space to sRGB color values, with linear alpha. </td> </tr> <tr> <td class="imsum_left"><a href="#convertToPARGB">convertToPARGB</a></td> <td class="imsum_right">Convert color value in this color space to premultiplied sRGB color values, with linear alpha. </td> </tr> <tr> <td class="imsum_left"><a href="#convertFromRGB">convertFromRGB</a></td> <td class="imsum_right">Convert sRGB color to a representation in this color space. </td> </tr> <tr> <td class="imsum_left"><a href="#convertFromARGB">convertFromARGB</a></td> <td class="imsum_right">Convert sRGB color with linear alpha into this color space. </td> </tr> <tr> <td class="imsum_left"><a href="#convertFromPARGB">convertFromPARGB</a></td> <td class="imsum_right">Convert premultiplied sRGB color with linear alpha into this color space. </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="getType" class="membertitle">getType</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">byte</td> </tr> <tr> <td valign="top"><b>getType</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Query type of this color space.</dd> <dd><p> </dd> <dt><b>Returns</b></dt> <dd>a value from the <a href="ColorSpaceType.html">ColorSpaceType</a> constant group. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getComponentTags" class="membertitle">getComponentTags</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< byte ></td> </tr> <tr> <td valign="top"><b>getComponentTags</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Query the kind for each color component.</dd> <dd><p> Color space components tend to correspond to physical attributes like the amount of one specific colorant contained in the final output color. This method returns a sequence of tags, specifying for each component of a color value, to what color attribute (if any) it corresponds. The values must be one of the <a href="ColorComponentTag.html">ColorComponentTag</a> constants.<p> At the same time, the number of elements in this sequence corresponds to the number of color channels for this color space.<p> </dd> <dt><b>Example</b></dt> <dd>For the standard RGB color space, ComponentTags consists of three elements, containing RGB_RED, RGB_GREEN and RGB_BLUE tags, respectively </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getRenderingIntent" class="membertitle">getRenderingIntent</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">byte</td> </tr> <tr> <td valign="top"><b>getRenderingIntent</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Query rendering intent of this color space.</dd> <dd><p> </dd> <dt><b>Returns</b></dt> <dd>a value from the <a href="RenderingIntent.html">RenderingIntent</a> constant group. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getProperties" class="membertitle">getProperties</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a> ></td> </tr> <tr> <td valign="top"><b>getProperties</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Query various optional properties from the color space.</dd> <dd><p> If this color space has an ICC color profile, the sequence contains an element named ICCProfile. Some color spaces also have properties Gamma, Whitepoint and Blackpoint. Background information for these is available <a href="http://en.wikipedia.org/wiki/Color_temperature">here</a>. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertColorSpace" class="membertitle">convertColorSpace</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> </tr> <tr> <td valign="top"><b>convertColorSpace</b>(</td> <td valign="top">[in] sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> <td valign="bottom"> deviceColor,</td> </tr> <tr> <td/><td valign="top">[in] <a href="XColorSpace.html">XColorSpace</a></td> <td valign="bottom"> targetColorSpace )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert to color of another color space.</dd> <dd><p> </dd> <dt><b>Parameter deviceColor</b></dt> <dd>Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multiple color values is possible. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of device colors in the target color space (e.g. <double>::sequence or <byte>::sequence). </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format (e.g. if the number of components is wrong) </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertToRGB" class="membertitle">convertToRGB</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="RGBColor.html">RGBColor</a> ></td> </tr> <tr> <td valign="top"><b>convertToRGB</b>(</td> <td valign="top">[in] sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> <td valign="bottom"> deviceColor )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert color value in this color space to sRGB color values.</dd> <dd><p> Any information not representable in the <a href="RGBColor.html">RGBColor</a> struct is discarded during the conversion. This includes alpha information. </dd> <dt><b>Parameter deviceColor</b></dt> <dd>Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multiple color values is possible. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of colors in the sRGB color space. </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format. </dd> <dt><b>See also</b></dt> <dd><a href="#convertToARGB">convertToARGB</a></dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertToARGB" class="membertitle">convertToARGB</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ARGBColor.html">ARGBColor</a> ></td> </tr> <tr> <td valign="top"><b>convertToARGB</b>(</td> <td valign="top">[in] sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> <td valign="bottom"> deviceColor )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert color value in this color space to sRGB color values, with linear alpha.</dd> <dd><p> If the given input color does not carry alpha information, an alpha value of 1.0 (fully opaque) is assumed. </dd> <dt><b>Parameter deviceColor</b></dt> <dd>Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multiple color values is possible. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of colors in the sRGB color space. </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertToPARGB" class="membertitle">convertToPARGB</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ARGBColor.html">ARGBColor</a> ></td> </tr> <tr> <td valign="top"><b>convertToPARGB</b>(</td> <td valign="top">[in] sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> <td valign="bottom"> deviceColor )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert color value in this color space to premultiplied sRGB color values, with linear alpha.</dd> <dd><p> If the given input color does not carry alpha information, an alpha value of 1.0 (fully opaque) is assumed. The resulting individual RGB color values are premultiplied by the alpha value (e.g. if alpha is 0.5, each color value has only half of the original intensity).<p> </dd> <dt><b>Parameter deviceColor</b></dt> <dd>Sequence of device color components. Is permitted to contain more than one device color element, therefore, batch conversion of multiple color values is possible. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of colors in the sRGB color space. </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertFromRGB" class="membertitle">convertFromRGB</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> </tr> <tr> <td valign="top"><b>convertFromRGB</b>(</td> <td valign="top">[in] sequence< <a href="RGBColor.html">RGBColor</a> ></td> <td valign="bottom"> rgbColor )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert sRGB color to a representation in this color space.</dd> <dd><p> If this color space conveys alpha information, it is assumed be fully opaque for the given rgb color value. </dd> <dt><b>Parameter deviceColor</b></dt> <dd>Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color values is possible. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of device colors. </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertFromARGB" class="membertitle">convertFromARGB</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> </tr> <tr> <td valign="top"><b>convertFromARGB</b>(</td> <td valign="top">[in] sequence< <a href="ARGBColor.html">ARGBColor</a> ></td> <td valign="bottom"> rgbColor )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert sRGB color with linear alpha into this color space.</dd> <dd><p> If this color space does not convey alpha information, the specified alpha value is silently ignored. </dd> <dt><b>Parameter rgbColor</b></dt> <dd>Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color values is possible. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of device colors. </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="convertFromPARGB" class="membertitle">convertFromPARGB</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< <a href="ColorComponent.html">ColorComponent</a> ></td> </tr> <tr> <td valign="top"><b>convertFromPARGB</b>(</td> <td valign="top">[in] sequence< <a href="ARGBColor.html">ARGBColor</a> ></td> <td valign="bottom"> rgbColor )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Convert premultiplied sRGB color with linear alpha into this color space.</dd> <dd><p> If this color space does not convey alpha information, the specified alpha value is silently ignored. </dd> <dt><b>Parameter rgbColor</b></dt> <dd>Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, batch conversion of multiple color values is possible. The individual color values are assumed to be premultiplied by the alpha value. </dd> <dt><b>Returns</b></dt> <dd>the corresponding sequence of device colors. </dd> <dt><b>Throws</b></dt> <dd>a com::sun::star::lang::IllegalArgumentException, if the input sequence does not match the device color format. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-idlref" --> </body> </html>