public class CT_ColorSpace extends OFDElement
本标准支持 GRAY、RGB、CMYK 颜色空间。除通过 设置各通道使用颜色空间内的任意颜色之外,还可 在颜色空间内定义调色板或指定相应颜色配置文件, 通过设置索引值进行引用。
8.3 颜色 图 24
proxy| 构造器和说明 |
|---|
CT_ColorSpace() |
CT_ColorSpace(org.dom4j.Element proxy) |
CT_ColorSpace(OFDColorSpaceType type) |
CT_ColorSpace(OFDColorSpaceType type,
long id) |
| 限定符和类型 | 方法和说明 |
|---|---|
BitsPerComponent |
getBitsPerComponent()
【可选 属性】
获取 每个颜色通道使用的位数
有效取值为:1,2,4,8,16 参考
BitsPerComponent |
ST_ID |
getID() |
Palette |
getPalette()
【可选】
获取 调色板
调色板中颜色的索引编号从 0 开始
|
ST_Loc |
getProfile()
【可选 属性】
获取 指向包内颜色配置文件
|
OFDColorSpaceType |
getType()
【必选 属性】
获取 颜色空间的类型
可选类型
OFDColorSpaceType |
CT_ColorSpace |
setBitsPerComponent(BitsPerComponent bitsPerComponent)
【可选 属性】
设置 每个颜色通道使用的位数
有效取值为:1,2,4,8,16 参考
BitsPerComponent |
CT_ColorSpace |
setID(ST_ID id) |
CT_ColorSpace |
setPalette(Palette palette)
【可选】
设置 调色板
调色板中颜色的索引编号从 0 开始
|
CT_ColorSpace |
setProfile(ST_Loc profile)
【可选 属性】
设置 指向包内颜色配置文件
|
CT_ColorSpace |
setType(OFDColorSpaceType type)
【必选 属性】
设置 颜色空间的类型
可选类型
OFDColorSpaceType |
addOFDEntity, getElements, getInstance, getObjID, getOFDElement, getOFDElement, getOFDElements, getOFDElementText, getQualifiedName, removeAll, removeAttr, removeOFDElemByNames, set, setObjID, setObjID, setOFDEntity, setOFDNameaccept, add, add, add, add, add, add, add, add, add, addAttribute, addAttribute, addCDATA, addComment, addElement, addElement, addElement, addEntity, additionalNamespaces, addNamespace, addProcessingInstruction, addProcessingInstruction, addText, appendAttributes, appendContent, asXML, asXPathResult, attribute, attribute, attribute, attributeCount, attributeIterator, attributes, attributeValue, attributeValue, attributeValue, attributeValue, clearContent, clone, content, createCopy, createCopy, createCopy, createXPath, declaredNamespaces, detach, element, element, elementByID, elementIterator, elementIterator, elementIterator, elements, elements, elements, elementText, elementText, elementTextTrim, elementTextTrim, equals, getData, getDocument, getName, getNamespace, getNamespaceForPrefix, getNamespaceForURI, getNamespacePrefix, getNamespacesForURI, getNamespaceURI, getNodeType, getNodeTypeName, getParent, getPath, getPath, getProxy, getQName, getQName, getStringValue, getText, getTextTrim, getUniquePath, getUniquePath, getXPathResult, hasContent, hasMixedContent, indexOf, isReadOnly, isRootElement, isTextOnly, matches, node, nodeCount, nodeIterator, normalize, numberValueOf, processingInstruction, processingInstructions, processingInstructions, remove, remove, remove, remove, remove, remove, remove, remove, remove, removeProcessingInstruction, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setAttributes, setAttributeValue, setAttributeValue, setContent, setData, setDocument, setName, setParent, setProcessingInstructions, setProxy, setQName, setText, supportsParent, valueOf, writepublic CT_ColorSpace(org.dom4j.Element proxy)
public CT_ColorSpace()
public CT_ColorSpace(OFDColorSpaceType type)
type - 颜色类型public CT_ColorSpace(OFDColorSpaceType type, long id)
type - 颜色类型id - 对象IDpublic ST_ID getID()
public CT_ColorSpace setID(ST_ID id)
public CT_ColorSpace setType(OFDColorSpaceType type)
type - 颜色空间的类型public OFDColorSpaceType getType()
public CT_ColorSpace setBitsPerComponent(BitsPerComponent bitsPerComponent)
有效取值为:1,2,4,8,16 参考BitsPerComponent
bitsPerComponent - 每个颜色通道使用的位数public BitsPerComponent getBitsPerComponent()
有效取值为:1,2,4,8,16 参考BitsPerComponent
public CT_ColorSpace setProfile(ST_Loc profile)
profile - 指向包内颜色配置文件路径public ST_Loc getProfile()
public CT_ColorSpace setPalette(Palette palette)
调色板中颜色的索引编号从 0 开始
palette - 调色板public Palette getPalette()
调色板中颜色的索引编号从 0 开始
Copyright © 2021. All rights reserved.