LibreOffice Module vcl (master) 1
|
#include <gradient.hxx>
Classes | |
class | Impl |
Public Member Functions | |
Gradient () | |
Gradient (const Gradient &rGradient) | |
Gradient (Gradient &&rGradient) | |
Gradient (css::awt::GradientStyle eStyle, const Color &rStartColor, const Color &rEndColor) | |
~Gradient () | |
void | SetStyle (css::awt::GradientStyle eStyle) |
css::awt::GradientStyle | GetStyle () const |
void | SetStartColor (const Color &rColor) |
const Color & | GetStartColor () const |
void | SetEndColor (const Color &rColor) |
const Color & | GetEndColor () const |
void | MakeGrayscale () |
void | SetAngle (Degree10 nAngle) |
Degree10 | GetAngle () const |
void | SetBorder (sal_uInt16 nBorder) |
sal_uInt16 | GetBorder () const |
void | SetOfsX (sal_uInt16 nOfsX) |
sal_uInt16 | GetOfsX () const |
void | SetOfsY (sal_uInt16 nOfsY) |
sal_uInt16 | GetOfsY () const |
void | SetStartIntensity (sal_uInt16 nIntens) |
sal_uInt16 | GetStartIntensity () const |
void | SetEndIntensity (sal_uInt16 nIntens) |
sal_uInt16 | GetEndIntensity () const |
void | SetSteps (sal_uInt16 nSteps) |
sal_uInt16 | GetSteps () const |
void | GetBoundRect (const tools::Rectangle &rRect, tools::Rectangle &rBoundRect, Point &rCenter) const |
void | AddGradientActions (tools::Rectangle const &rRect, GDIMetaFile &rMetaFile) |
Gradient & | operator= (const Gradient &rGradient) |
Gradient & | operator= (Gradient &&rGradient) |
bool | operator== (const Gradient &rGradient) const |
bool | operator!= (const Gradient &rGradient) const |
Private Member Functions | |
tools::Long | GetMetafileSteps (tools::Rectangle const &rRect) const |
void | DrawComplexGradientToMetafile (tools::Rectangle const &rRect, GDIMetaFile &rMetaFile) const |
void | DrawLinearGradientToMetafile (tools::Rectangle const &rRect, GDIMetaFile &rMetaFile) const |
Private Attributes | |
::o3tl::cow_wrapper< Impl > | mpImplGradient |
Definition at line 39 of file gradient.hxx.
|
default |
|
default |
|
default |
Gradient::Gradient | ( | css::awt::GradientStyle | eStyle, |
const Color & | rStartColor, | ||
const Color & | rEndColor | ||
) |
Definition at line 89 of file gdi/gradient.cxx.
References mpImplGradient.
|
default |
References GetAngle().
void Gradient::AddGradientActions | ( | tools::Rectangle const & | rRect, |
GDIMetaFile & | rMetaFile | ||
) |
Definition at line 303 of file gdi/gradient.cxx.
References GDIMetaFile::AddAction(), tools::Rectangle::AdjustBottom(), tools::Rectangle::AdjustLeft(), tools::Rectangle::AdjustRight(), tools::Rectangle::AdjustTop(), vcl::ALL, DrawComplexGradientToMetafile(), DrawLinearGradientToMetafile(), GetSteps(), GetStyle(), GRADIENT_DEFAULT_STEPCOUNT, tools::Rectangle::IsEmpty(), tools::Rectangle::Normalize(), and SetSteps().
Referenced by EMFWriter::ImplWrite(), vcl::PDFWriterImpl::implWriteGradient(), and WMFWriter::WriteRecords().
|
private |
Definition at line 531 of file gdi/gradient.cxx.
References GDIMetaFile::AddAction(), tools::Rectangle::Bottom(), tools::Rectangle::Center(), GetAngle(), Color::GetBlue(), tools::Polygon::GetBoundRect(), GetBoundRect(), GetEndColor(), GetEndIntensity(), GetGradientColorValue(), Color::GetGreen(), tools::Rectangle::GetHeight(), GetMetafileSteps(), Color::GetRed(), GetStartColor(), GetStartIntensity(), GetStyle(), tools::Rectangle::GetWidth(), i, tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), tools::Rectangle::Right(), tools::Polygon::Rotate(), tools::Rectangle::SetBottom(), tools::Rectangle::SetLeft(), tools::Rectangle::SetRight(), tools::Rectangle::SetTop(), and tools::Rectangle::Top().
Referenced by AddGradientActions().
|
private |
Definition at line 360 of file gdi/gradient.cxx.
References GDIMetaFile::AddAction(), tools::Rectangle::Bottom(), tools::Rectangle::BottomLeft(), tools::Rectangle::BottomRight(), GetAngle(), Color::GetBlue(), GetBorder(), GetBoundRect(), GetEndColor(), GetEndIntensity(), GetGradientColorValue(), Color::GetGreen(), tools::Rectangle::GetHeight(), GetMetafileSteps(), Color::GetRed(), GetStartColor(), GetStartIntensity(), GetStyle(), i, tools::Polygon::Rotate(), tools::Rectangle::SetBottom(), tools::Rectangle::SetTop(), tools::Rectangle::Top(), tools::Rectangle::TopLeft(), and tools::Rectangle::TopRight().
Referenced by AddGradientActions().
Degree10 Gradient::GetAngle | ( | ) | const |
Definition at line 130 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), GetBoundRect(), TypeSerializer::writeGradient(), and vcl::PDFWriterImpl::writeGradientFunction().
sal_uInt16 Gradient::GetBorder | ( | ) | const |
Definition at line 140 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), GetBoundRect(), TypeSerializer::writeGradient(), and vcl::PDFWriterImpl::writeGradientFunction().
void Gradient::GetBoundRect | ( | const tools::Rectangle & | rRect, |
tools::Rectangle & | rBoundRect, | ||
Point & | rCenter | ||
) | const |
Definition at line 200 of file gdi/gradient.cxx.
References tools::Rectangle::AdjustBottom(), Size::AdjustHeight(), tools::Rectangle::AdjustLeft(), tools::Rectangle::AdjustRight(), tools::Rectangle::AdjustTop(), Size::AdjustWidth(), tools::Rectangle::Center(), GetAngle(), GetBorder(), tools::Rectangle::GetHeight(), GetOfsX(), GetOfsY(), tools::Rectangle::GetSize(), GetStyle(), tools::Rectangle::GetWidth(), Size::Height(), tools::Rectangle::Left(), Size::setHeight(), tools::Rectangle::SetLeft(), tools::Rectangle::SetSize(), tools::Rectangle::SetTop(), Size::setWidth(), tools::Rectangle::Top(), toRadians(), Size::Width(), Point::X(), and Point::Y().
Referenced by OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), and vcl::PDFWriterImpl::writeGradientFunction().
const Color & Gradient::GetEndColor | ( | ) | const |
Definition at line 120 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), Printer::DrawGradientEx(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), OutputDevice::DrawTransparent(), GDIMetaFile::ImplExchangeColors(), MakeGrayscale(), vcl::PDFWriterImpl::playMetafile(), TypeSerializer::writeGradient(), and vcl::PDFWriterImpl::writeGradientFunction().
sal_uInt16 Gradient::GetEndIntensity | ( | ) | const |
Definition at line 180 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), Printer::DrawGradientEx(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), and TypeSerializer::writeGradient().
|
private |
Definition at line 335 of file gdi/gradient.cxx.
References tools::Rectangle::GetHeight(), GetSteps(), GetStyle(), and tools::Rectangle::GetWidth().
Referenced by DrawComplexGradientToMetafile(), and DrawLinearGradientToMetafile().
sal_uInt16 Gradient::GetOfsX | ( | ) | const |
Definition at line 150 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by GetBoundRect(), and TypeSerializer::writeGradient().
sal_uInt16 Gradient::GetOfsY | ( | ) | const |
Definition at line 160 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by GetBoundRect(), and TypeSerializer::writeGradient().
const Color & Gradient::GetStartColor | ( | ) | const |
Definition at line 110 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), Printer::DrawGradientEx(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), OutputDevice::DrawTransparent(), GDIMetaFile::ImplExchangeColors(), MakeGrayscale(), vcl::PDFWriterImpl::playMetafile(), TypeSerializer::writeGradient(), and vcl::PDFWriterImpl::writeGradientFunction().
sal_uInt16 Gradient::GetStartIntensity | ( | ) | const |
Definition at line 170 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), Printer::DrawGradientEx(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), and TypeSerializer::writeGradient().
sal_uInt16 Gradient::GetSteps | ( | ) | const |
Definition at line 190 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by AddGradientActions(), OutputDevice::DrawGradient(), Printer::DrawGradientEx(), OutputDevice::GetGradientSteps(), GetMetafileSteps(), lcl_canUsePDFAxialShading(), and TypeSerializer::writeGradient().
css::awt::GradientStyle Gradient::GetStyle | ( | ) | const |
Definition at line 100 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by AddGradientActions(), OutputDevice::DrawComplexGradient(), DrawComplexGradientToMetafile(), OutputDevice::DrawGradient(), OutputDevice::DrawLinearGradient(), DrawLinearGradientToMetafile(), GetBoundRect(), OutputDevice::GetGradientSteps(), GetMetafileSteps(), lcl_canUsePDFAxialShading(), TypeSerializer::writeGradient(), and vcl::PDFWriterImpl::writeGradientFunction().
void Gradient::MakeGrayscale | ( | ) |
Definition at line 278 of file gdi/gradient.cxx.
References GetEndColor(), Color::GetLuminance(), GetStartColor(), SetEndColor(), and SetStartColor().
Referenced by OutputDevice::DrawGradient(), and OutputDevice::DrawGradientToMetafile().
|
inline |
Definition at line 88 of file gradient.hxx.
References operator==().
bool Gradient::operator== | ( | const Gradient & | rGradient | ) | const |
Definition at line 296 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by operator!=().
void Gradient::SetAngle | ( | Degree10 | nAngle | ) |
Definition at line 135 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by SVMConverter::ImplConvertFromSVM1(), ToolBox::ImplDrawGradientBackground(), Wallpaper::ImplGetApplicationGradient(), and TypeSerializer::readGradient().
void Gradient::SetBorder | ( | sal_uInt16 | nBorder | ) |
Definition at line 145 of file gdi/gradient.cxx.
References mpImplGradient, and nBorder.
Referenced by SVMConverter::ImplConvertFromSVM1(), and TypeSerializer::readGradient().
void Gradient::SetEndColor | ( | const Color & | rColor | ) |
Definition at line 125 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by ToolBox::ImplDrawGradientBackground(), GDIMetaFile::ImplExchangeColors(), Wallpaper::ImplGetApplicationGradient(), MakeGrayscale(), and TypeSerializer::readGradient().
void Gradient::SetEndIntensity | ( | sal_uInt16 | nIntens | ) |
Definition at line 185 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by SVMConverter::ImplConvertFromSVM1(), and TypeSerializer::readGradient().
void Gradient::SetOfsX | ( | sal_uInt16 | nOfsX | ) |
Definition at line 155 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by SVMConverter::ImplConvertFromSVM1(), and TypeSerializer::readGradient().
void Gradient::SetOfsY | ( | sal_uInt16 | nOfsY | ) |
Definition at line 165 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by SVMConverter::ImplConvertFromSVM1(), and TypeSerializer::readGradient().
void Gradient::SetStartColor | ( | const Color & | rColor | ) |
Definition at line 115 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by ToolBox::ImplDrawGradientBackground(), GDIMetaFile::ImplExchangeColors(), Wallpaper::ImplGetApplicationGradient(), MakeGrayscale(), and TypeSerializer::readGradient().
void Gradient::SetStartIntensity | ( | sal_uInt16 | nIntens | ) |
Definition at line 175 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by SVMConverter::ImplConvertFromSVM1(), and TypeSerializer::readGradient().
void Gradient::SetSteps | ( | sal_uInt16 | nSteps | ) |
Definition at line 195 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by AddGradientActions(), OutputDevice::DrawGradient(), Printer::DrawGradientEx(), and TypeSerializer::readGradient().
void Gradient::SetStyle | ( | css::awt::GradientStyle | eStyle | ) |
Definition at line 105 of file gdi/gradient.cxx.
References mpImplGradient.
Referenced by ToolBox::ImplDrawGradientBackground(), Wallpaper::ImplGetApplicationGradient(), and TypeSerializer::readGradient().
|
private |
Definition at line 43 of file gradient.hxx.
Referenced by GetAngle(), GetBorder(), GetEndColor(), GetEndIntensity(), GetOfsX(), GetOfsY(), GetStartColor(), GetStartIntensity(), GetSteps(), GetStyle(), Gradient(), operator==(), SetAngle(), SetBorder(), SetEndColor(), SetEndIntensity(), SetOfsX(), SetOfsY(), SetStartColor(), SetStartIntensity(), SetSteps(), and SetStyle().