Show / Hide Table of Contents

Class ColorPt

ColorPt is an array of colorants (or tint values) representing a color point in an associated color space.

Inheritance
System.Object
ColorPt
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF
Assembly: PDFNetAndroid.dll
Syntax
public class ColorPt : IDisposable

Constructors

ColorPt()

Instantiates a new ColorPt object.

Declaration
public ColorPt()
Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

ColorPt(Double)

Instantiates a new ColorPt object.

Declaration
public ColorPt(double x)
Parameters
Type Name Description
System.Double x

the x

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

ColorPt(Double, Double)

Instantiates a new ColorPt object.

Declaration
public ColorPt(double x, double y)
Parameters
Type Name Description
System.Double x

the x

System.Double y

the y

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

ColorPt(Double, Double, Double)

Instantiates a new ColorPt object.

Declaration
public ColorPt(double x, double y, double z)
Parameters
Type Name Description
System.Double x

the x

System.Double y

the y

System.Double z

the z

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

ColorPt(Double, Double, Double, Double)

Instantiates a new ColorPt object.

Declaration
public ColorPt(double x, double y, double z, double w)
Parameters
Type Name Description
System.Double x

the x

System.Double y

the y

System.Double z

the z

System.Double w

the w

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Methods

Destroy()

Declaration
public void Destroy()

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Finalize()

Releases all resources used by the ColorPt

Declaration
protected void Finalize()

Get(Int32)

Gets the tint value at a given colorant index.

Declaration
public double Get(int colorant_index)
Parameters
Type Name Description
System.Int32 colorant_index

the colorant_index

Returns
Type Description
System.Double

the tint value at the specified colorant index.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

op_Assign(ColorPt)

Assignment operator

Declaration
public ColorPt op_Assign(ColorPt r)
Parameters
Type Name Description
ColorPt r

object at the right of the operator

Returns
Type Description
ColorPt

object equals to the given object

Set(ColorPt)

Sets value to the given ColorPt object

Declaration
public void Set(ColorPt p)
Parameters
Type Name Description
ColorPt p

given ColorPt object

Set(Double)

Sets the first value x of the ColorPt.

Declaration
public void Set(double x)
Parameters
Type Name Description
System.Double x

the x

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Set(Double, Double)

Sets the first two values x and y of the ColorPt.

Declaration
public void Set(double x, double y)
Parameters
Type Name Description
System.Double x

the x

System.Double y

the y

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Set(Double, Double, Double)

Sets the first three values x, y, and z of the ColorPt.

Declaration
public void Set(double x, double y, double z)
Parameters
Type Name Description
System.Double x

the x

System.Double y

the y

System.Double z

the z

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Set(Double, Double, Double, Double)

A utility method to set the first 4 tint values. For example, color.Set(red, green, blue) will initialize the ColorPt to given tint values.

Declaration
public void Set(double x, double y, double z, double w)
Parameters
Type Name Description
System.Double x

the x

System.Double y

the y

System.Double z

the z

System.Double w

the w

Remarks

All colorants should be in the range [0..1].

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Set(Int32, Double)

Sets the colorant index and value.

Declaration
public void Set(int colorant_index, double colorant_value)
Parameters
Type Name Description
System.Int32 colorant_index

the colorant_index. For example, for a color point associated with a Gray color space the only allowed value for index is 0. For a color point associated with a CMYK color space, the color_index can range from 0 (cyan) to 4 (black).

System.Double colorant_value

the colorant_value The new tint value.

Remarks

If a color point has more than 4 colorants, SetColorantNum(num_colorants) must be called before getting or setting tint values.

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

SetColorantNum(Int32)

Sets the colorant number.

Declaration
public void SetColorantNum(int num)
Parameters
Type Name Description
System.Int32 num

the new colorant number

Remarks

If a color point has more than 4 colorants, SetColorantNum(num_colorants) must be called before getting or setting tint values. The number of colorants depends on the associated color space. To find how many colorant are associated with a given color space use color_space.GetComponentNum().

Exceptions
Type Condition
PDFNetException

PDFNetException the PDFNet exception

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX