return new DrawableAffine(*this);
}
-// Change pixel matte value to transparent using PaintMethod
Magick::DrawableAlpha::~DrawableAlpha(void)
{
}
return new DrawableFillRule(*this);
}
-// Specify drawing fill alpha
-Magick::DrawableFillAlpha::~DrawableFillAlpha ( void )
+Magick::DrawableFillOpacity::~DrawableFillOpacity(void)
{
}
-void Magick::DrawableFillAlpha::operator()
- ( MagickCore::DrawingWand * context_ ) const
+
+void Magick::DrawableFillOpacity::operator()
+ (MagickCore::DrawingWand *context_) const
{
- DrawSetFillAlpha( context_, _alpha );
+ DrawSetFillOpacity(context_,_opacity);
}
-Magick::DrawableBase* Magick::DrawableFillAlpha::copy() const
+
+Magick::DrawableBase* Magick::DrawableFillOpacity::copy() const
{
- return new DrawableFillAlpha(*this);
+ return new DrawableFillOpacity(*this);
}
// Specify text font
return new DrawableStrokeColor(*this);
}
-// Stroke alpha
-Magick::DrawableStrokeAlpha::~DrawableStrokeAlpha ( void )
+Magick::DrawableStrokeOpacity::~DrawableStrokeOpacity(void)
{
}
-void Magick::DrawableStrokeAlpha::operator()
- ( MagickCore::DrawingWand * context_ ) const
+
+void Magick::DrawableStrokeOpacity::operator()
+ (MagickCore::DrawingWand * context_) const
{
- DrawSetStrokeAlpha( context_, _alpha );
+ DrawSetStrokeOpacity(context_,_opacity);
}
-Magick::DrawableBase* Magick::DrawableStrokeAlpha::copy() const
+
+Magick::DrawableBase* Magick::DrawableStrokeOpacity::copy() const
{
- return new DrawableStrokeAlpha(*this);
+ return new DrawableStrokeOpacity(*this);
}
// Stroke width
};
// Specify drawing fill alpha
-class MagickPPExport DrawableFillAlpha : public DrawableBase
+class MagickPPExport DrawableFillOpacity : public DrawableBase
{
public:
- DrawableFillAlpha ( double alpha_ )
- : _alpha(alpha_)
- {
- }
- /*virtual*/ ~DrawableFillAlpha ( void );
+ DrawableFillOpacity(double opacity_)
+ : _opacity(opacity_)
+ {
+ }
+
+ ~DrawableFillOpacity ( void );
// Operator to invoke equivalent draw API call
- /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
+ void operator()(MagickCore::DrawingWand *context_) const;
// Return polymorphic copy of object
- /*virtual*/ DrawableBase* copy() const;
+ DrawableBase* copy() const;
- void alpha( double alpha_ )
- {
- _alpha = alpha_;
- }
- double alpha( void ) const
- {
- return _alpha;
- }
+ void opacity(double opacity_)
+ {
+ _opacity=opacity_;
+ }
+
+ double opacity(void) const
+ {
+ return(_opacity);
+ }
private:
- double _alpha;
+ double _opacity;
};
// Specify text font
Color _color;
};
-// Stroke alpha
-class MagickPPExport DrawableStrokeAlpha : public DrawableBase
+// Stroke opacity
+class MagickPPExport DrawableStrokeOpacity : public DrawableBase
{
public:
- DrawableStrokeAlpha ( double alpha_ )
- : _alpha(alpha_)
- {
- }
- /*virtual*/ ~DrawableStrokeAlpha ( void );
+ DrawableStrokeOpacity(double opacity_)
+ : _opacity(opacity_)
+ {
+ }
+
+ ~DrawableStrokeOpacity(void);
// Operator to invoke equivalent draw API call
- /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
+ void operator()(MagickCore::DrawingWand *context_) const;
// Return polymorphic copy of object
- /*virtual*/ DrawableBase* copy() const;
+ DrawableBase* copy() const;
- void alpha( double alpha_ )
- {
- _alpha = alpha_;
- }
- double alpha( void ) const
- {
- return _alpha;
- }
+ void opacity(double opacity_)
+ {
+ _opacity=opacity_;
+ }
+
+ double opacity(void) const
+ {
+ return(_opacity);
+ }
private:
- double _alpha;
+ double _opacity;
};
// Stroke width
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DrawGetFillAlpha() returns the alpha used when drawing using the fill
+% DrawGetFillOpacity() returns the alpha used when drawing using the fill
% color or fill texture. Fully opaque is 1.0.
%
-% The format of the DrawGetFillAlpha method is:
+% The format of the DrawGetFillOpacity method is:
%
-% double DrawGetFillAlpha(const DrawingWand *wand)
+% double DrawGetFillOpacity(const DrawingWand *wand)
%
% A description of each parameter follows:
%
% o wand: the drawing wand.
%
*/
-WandExport double DrawGetFillAlpha(const DrawingWand *wand)
+WandExport double DrawGetFillOpacity(const DrawingWand *wand)
{
double
alpha;
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DrawGetAlpha() returns the alpha used when drawing with the fill
+% DrawGetOpacity() returns the alpha used when drawing with the fill
% or stroke color or texture. Fully opaque is 1.0.
%
-% The format of the DrawGetAlpha method is:
+% The format of the DrawGetOpacity method is:
%
-% double DrawGetAlpha(const DrawingWand *wand)
+% double DrawGetOpacity(const DrawingWand *wand)
%
% A description of each parameter follows:
%
% o wand: the drawing wand.
%
*/
-WandExport double DrawGetAlpha(const DrawingWand *wand)
+WandExport double DrawGetOpacity(const DrawingWand *wand)
{
double
alpha;
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DrawGetStrokeAlpha() returns the alpha of stroked object outlines.
+% DrawGetStrokeOpacity() returns the alpha of stroked object outlines.
%
-% The format of the DrawGetStrokeAlpha method is:
+% The format of the DrawGetStrokeOpacity method is:
%
-% double DrawGetStrokeAlpha(const DrawingWand *wand)
+% double DrawGetStrokeOpacity(const DrawingWand *wand)
%
% A description of each parameter follows:
%
% o wand: the drawing wand.
%
*/
-WandExport double DrawGetStrokeAlpha(const DrawingWand *wand)
+WandExport double DrawGetStrokeOpacity(const DrawingWand *wand)
{
double
alpha;
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
- child=AddChildToXMLTree(xml_info,"fill-alpha",0);
+ child=AddChildToXMLTree(xml_info,"fill-opacity",0);
if (child != (XMLTreeInfo *) NULL)
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",
CurrentContext->miterlimit);
(void) SetXMLTreeContent(child,value);
}
- child=AddChildToXMLTree(xml_info,"stroke-alpha",0);
+ child=AddChildToXMLTree(xml_info,"stroke-opacity",0);
if (child != (XMLTreeInfo *) NULL)
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DrawSetFillAlpha() sets the alpha to use when drawing using the fill
+% DrawSetFillOpacity() sets the alpha to use when drawing using the fill
% color or fill texture. Fully opaque is 1.0.
%
-% The format of the DrawSetFillAlpha method is:
+% The format of the DrawSetFillOpacity method is:
%
-% void DrawSetFillAlpha(DrawingWand *wand,const double fill_alpha)
+% void DrawSetFillOpacity(DrawingWand *wand,const double fill_alpha)
%
% A description of each parameter follows:
%
% o wand: the drawing wand.
%
-% o fill_alpha: fill alpha
+% o fill_opacity: fill opacity
%
*/
-WandExport void DrawSetFillAlpha(DrawingWand *wand,const double fill_alpha)
+WandExport void DrawSetFillOpacity(DrawingWand *wand,const double fill_opacity)
{
double
alpha;
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- alpha=(double) ClampToQuantum(QuantumRange*(1.0-fill_alpha));
+ alpha=(double) ClampToQuantum(QuantumRange*fill_opacity);
if ((wand->filter_off != MagickFalse) ||
(CurrentContext->fill.alpha != alpha))
{
CurrentContext->fill.alpha=alpha;
- (void) MvgPrintf(wand,"fill-alpha %.20g\n",fill_alpha);
+ (void) MvgPrintf(wand,"fill-opacity %.20g\n",fill_opacity);
}
}
\f
%
% o wand: the drawing wand.
%
-% o alpha: fill alpha
+% o opacity: fill and stroke opacity. The value 1.0 is opaque.
%
*/
-WandExport void DrawSetOpacity(DrawingWand *wand,const double alpha)
+WandExport void DrawSetOpacity(DrawingWand *wand,const double opacity)
{
Quantum
quantum_alpha;
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- quantum_alpha=ClampToQuantum(QuantumRange*(1.0-alpha));
+ quantum_alpha=ClampToQuantum(QuantumRange*opacity);
if ((wand->filter_off != MagickFalse) ||
(CurrentContext->alpha != quantum_alpha))
{
- CurrentContext->alpha=(Quantum) alpha;
- (void) MvgPrintf(wand,"opacity %.20g\n",alpha);
+ CurrentContext->alpha=(Quantum) opacity;
+ (void) MvgPrintf(wand,"opacity %.20g\n",opacity);
}
}
\f
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DrawSetStrokeAlpha() specifies the alpha of stroked object outlines.
+% DrawSetStrokeOpacity() specifies the alpha of stroked object outlines.
%
-% The format of the DrawSetStrokeAlpha method is:
+% The format of the DrawSetStrokeOpacity method is:
%
-% void DrawSetStrokeAlpha(DrawingWand *wand,
+% void DrawSetStrokeOpacity(DrawingWand *wand,
% const double stroke_alpha)
%
% A description of each parameter follows:
%
% o wand: the drawing wand.
%
-% o stroke_alpha: stroke alpha. The value 1.0 is opaque.
+% o opacity: stroke opacity. The value 1.0 is opaque.
%
*/
-WandExport void DrawSetStrokeAlpha(DrawingWand *wand,
- const double stroke_alpha)
+WandExport void DrawSetStrokeOpacity(DrawingWand *wand,
+ const double opacity)
{
double
alpha;
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- alpha=(double) ClampToQuantum(QuantumRange*(1.0-stroke_alpha));
+ alpha=(double) ClampToQuantum(QuantumRange*opacity);
if ((wand->filter_off != MagickFalse) ||
(CurrentContext->stroke.alpha != alpha))
{
CurrentContext->stroke.alpha=alpha;
- (void) MvgPrintf(wand,"stroke-alpha %.20g\n",stroke_alpha);
+ (void) MvgPrintf(wand,"stroke-opacity %.20g\n",opacity);
}
}
\f
(void) QueryColorCompliance(value,AllCompliance,&CurrentContext->fill,
wand->exception);
}
- child=GetXMLTreeChild(xml_info,"fill-alpha");
+ child=GetXMLTreeChild(xml_info,"fill-opacity");
if (child != (XMLTreeInfo *) NULL)
{
value=GetXMLTreeContent(child);
if (value != (const char *) NULL)
CurrentContext->miterlimit=StringToUnsignedLong(value);
}
- child=GetXMLTreeChild(xml_info,"stroke-alpha");
+ child=GetXMLTreeChild(xml_info,"stroke-opacity");
if (child != (XMLTreeInfo *) NULL)
{
value=GetXMLTreeContent(child);
DrawGetTextDirection(const DrawingWand *);
extern WandExport double
- DrawGetFillAlpha(const DrawingWand *),
+ DrawGetFillOpacity(const DrawingWand *),
DrawGetFontSize(const DrawingWand *),
- DrawGetAlpha(const DrawingWand *),
+ DrawGetOpacity(const DrawingWand *),
*DrawGetStrokeDashArray(const DrawingWand *,size_t *),
DrawGetStrokeDashOffset(const DrawingWand *),
- DrawGetStrokeAlpha(const DrawingWand *),
+ DrawGetStrokeOpacty(const DrawingWand *),
DrawGetStrokeWidth(const DrawingWand *),
DrawGetTextKerning(DrawingWand *),
DrawGetTextInterlineSpacing(DrawingWand *),
DrawSetClipRule(DrawingWand *,const FillRule),
DrawSetClipUnits(DrawingWand *,const ClipPathUnits),
DrawSetFillColor(DrawingWand *,const PixelWand *),
- DrawSetFillAlpha(DrawingWand *,const double),
+ DrawSetFillOpacity(DrawingWand *,const double),
DrawSetFillRule(DrawingWand *,const FillRule),
DrawSetFontSize(DrawingWand *,const double),
DrawSetFontStretch(DrawingWand *,const StretchType),
DrawSetStrokeLineCap(DrawingWand *,const LineCap),
DrawSetStrokeLineJoin(DrawingWand *,const LineJoin),
DrawSetStrokeMiterLimit(DrawingWand *,const size_t),
- DrawSetStrokeAlpha(DrawingWand *, const double),
+ DrawSetStrokeOpacity(DrawingWand *, const double),
DrawSetStrokeWidth(DrawingWand *,const double),
DrawSetTextAlignment(DrawingWand *,const AlignType),
DrawSetTextAntialias(DrawingWand *,const MagickBooleanType),