Loading...
Searching...
No Matches
Magick::DrawableStrokeDashArray Class Reference
Inheritance diagram for Magick::DrawableStrokeDashArray:

## Public Member Functions

| DrawableStrokeDashArray (const double *dasharray_)
| DrawableStrokeDashArray (const Magick::DrawableStrokeDashArray &original_)
void | operator() (MagickCore::DrawingWand *context_) const
DrawableBase * | copy () const
void | dasharray (const double *dasharray_)
const double * | dasharray (void) const
DrawableStrokeDashArray & | operator= (const Magick::DrawableStrokeDashArray &original_)

## Private Attributes

size_t | _size
double * | _dasharray

## Detailed Description

Definition at line 1721 of file Drawable.h.

## Constructor & Destructor Documentation

## DrawableStrokeDashArray() [1/2]

Magick::DrawableStrokeDashArray::DrawableStrokeDashArray | ( | const double * | dasharray_ | ) |

Definition at line 1162 of file Drawable.cpp.

: _size(0),
_dasharray(0)
{
dasharray(dasharray_);
}

## DrawableStrokeDashArray() [2/2]

Magick::DrawableStrokeDashArray::DrawableStrokeDashArray | ( | const Magick::DrawableStrokeDashArray & | original_ | ) |

Definition at line 1169 of file Drawable.cpp.

: DrawableBase (original_),
_size(original_._size),
_dasharray(new double[_size+1])
{
// Copy elements
{
for (size_t i=0; i < _size; i++)
_dasharray[i]=original_._dasharray[i];
_dasharray[_size]=0.0;
}
}

## ~DrawableStrokeDashArray()

Magick::DrawableStrokeDashArray::~DrawableStrokeDashArray | ( | void |  | ) |

Definition at line 1183 of file Drawable.cpp.

{
delete [] _dasharray;
_size=0;
_dasharray=(double *) NULL;
}

## Member Function Documentation

## copy()

Magick::DrawableBase * Magick::DrawableStrokeDashArray::copy | ( |  | ) | const

virtual

Reimplemented from Magick::DrawableBase.

Definition at line 1214 of file Drawable.cpp.

{
return(new DrawableStrokeDashArray(*this));
}

## dasharray() [1/2]

void Magick::DrawableStrokeDashArray::dasharray | ( | const double * | dasharray_ | ) |

Definition at line 1219 of file Drawable.cpp.

{
size_t
n;
delete [] _dasharray;
_size=0;
_dasharray=0;
if (dasharray_ != (const double *) NULL)
{
const double
*p;
// Count elements in dash array
n=0;
{
p = dasharray_;
while(*p++ != 0.0)
n++;
}
_size=n;
// Allocate elements
_dasharray=new double[_size+1];
// Copy elements
{
for (size_t i=0; i < _size; i++)
_dasharray[i]=dasharray_[i];
_dasharray[_size]=0.0;
}
}
}

## dasharray() [2/2]

const double * Magick::DrawableStrokeDashArray::dasharray | ( | void |  | ) | const

Definition at line 1253 of file Drawable.cpp.

{
return(_dasharray);
}

## operator()()

void Magick::DrawableStrokeDashArray::operator() | ( | MagickCore::DrawingWand * | context_ | ) | const

virtual

Reimplemented from Magick::DrawableBase.

Definition at line 1208 of file Drawable.cpp.

{
(void) DrawSetStrokeDashArray(context_,(unsigned long) _size,_dasharray);
}

## operator=()

Magick::DrawableStrokeDashArray & Magick::DrawableStrokeDashArray::operator= | ( | const Magick::DrawableStrokeDashArray & | original_ | ) |

Definition at line 1190 of file Drawable.cpp.

{
if (this != &original_)
{
delete [] _dasharray;
_size=original_._size;
_dasharray = new double[_size+1];
// Copy elements
{
for (size_t i=0; i < _size; i++)
_dasharray[i]=original_._dasharray[i];
_dasharray[_size]=0.0;
}
}
return(*this);
}

## Field Documentation

## _dasharray

double* Magick::DrawableStrokeDashArray::_dasharray

private

Definition at line 1745 of file Drawable.h.

## _size

size_t Magick::DrawableStrokeDashArray::_size

private

Definition at line 1744 of file Drawable.h.

The documentation for this class was generated from the following files:

- Drawable.h
- Drawable.cpp