Show / Hide Table of Contents

Class Transparency

Represents the transparency of a layer or an entity.

Inheritance
System.Object
Transparency
Implements
System.ICloneable
System.IEquatable<Transparency>
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.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf
Assembly: CADability.dll
Syntax
public class Transparency : ICloneable, IEquatable<Transparency>
Remarks

When the transparency of an entity is ByLayer the code 440 will not appear in the dxf, but for comparison purposes the ByLayer transparency is assigned a value of -1.

Constructors

| Improve this Doc View Source

Transparency()

Initializes a new instance of the Transparency class.

Declaration
public Transparency()
| Improve this Doc View Source

Transparency(Int16)

Initializes a new instance of the Transparency class.

Declaration
public Transparency(short value)
Parameters
Type Name Description
System.Int16 value

Alpha value range from 0 to 90.

Remarks

Accepted transparency values range from 0 (opaque) to 90 (almost transparent), the reserved values -1 and 100 represents ByLayer and ByBlock transparency.

Properties

| Improve this Doc View Source

ByBlock

Gets the ByBlock transparency.

Declaration
public static Transparency ByBlock { get; }
Property Value
Type Description
Transparency
| Improve this Doc View Source

ByLayer

Gets the ByLayer transparency.

Declaration
public static Transparency ByLayer { get; }
Property Value
Type Description
Transparency
| Improve this Doc View Source

IsByBlock

Defines if the transparency is defined by block.

Declaration
public bool IsByBlock { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsByLayer

Defines if the transparency is defined by layer.

Declaration
public bool IsByLayer { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Value

Gets or sets the transparency value range from 0 to 90.

Declaration
public short Value { get; set; }
Property Value
Type Description
System.Int16
Remarks

Accepted transparency values range from 0 to 90, the reserved values -1 and 100 represents ByLayer and ByBlock.

Methods

| Improve this Doc View Source

Clone()

Creates a new transparency that is a copy of the current instance.

Declaration
public object Clone()
Returns
Type Description
System.Object

A new transparency that is a copy of this instance.

| Improve this Doc View Source

Equals(Transparency)

Check if the components of two transparencies are equal.

Declaration
public bool Equals(Transparency other)
Parameters
Type Name Description
Transparency other

Another transparency to compare to.

Returns
Type Description
System.Boolean

True if their indexes are equal or false in any other case.

| Improve this Doc View Source

FromAlphaValue(Int32)

Gets the Transparency object from a transparency value.

Declaration
public static Transparency FromAlphaValue(int value)
Parameters
Type Name Description
System.Int32 value

A transparency value.

Returns
Type Description
Transparency

A Transparency

| Improve this Doc View Source

ToAlphaValue(Transparency)

Gets the transparency value from a Transparency object.

Declaration
public static int ToAlphaValue(Transparency transparency)
Parameters
Type Name Description
Transparency transparency

A Transparency.

Returns
Type Description
System.Int32

A transparency value.

| Improve this Doc View Source

ToString()

Converts the value of this instance to its equivalent string representation.

Declaration
public override string ToString()
Returns
Type Description
System.String

The string representation.

Overrides
System.Object.ToString()

Implements

System.ICloneable
System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX