Initial steps for icon buttons.
This commit is contained in:
parent
8130308f7f
commit
f2ab532005
17 changed files with 66 additions and 2 deletions
|
@ -34,6 +34,8 @@ list(APPEND visual_elements_LIB_INCLUDES
|
|||
svg/elements/SvgShapeElements.cpp
|
||||
nodes/MaterialNode.h
|
||||
nodes/MaterialNode.cpp
|
||||
nodes/ImageNode.h
|
||||
nodes/ImageNode.cpp
|
||||
nodes/MeshNode.h
|
||||
nodes/MeshNode.cpp
|
||||
nodes/TextNode.h
|
||||
|
|
0
src/rendering/visual_elements/nodes/ImageNode.cpp
Normal file
0
src/rendering/visual_elements/nodes/ImageNode.cpp
Normal file
0
src/rendering/visual_elements/nodes/ImageNode.h
Normal file
0
src/rendering/visual_elements/nodes/ImageNode.h
Normal file
|
@ -130,7 +130,13 @@ void SvgShapeElement::setStrokeWidth(double width)
|
|||
{
|
||||
auto attr = std::make_unique<XmlAttribute>("stroke-width");
|
||||
attr->setValue(std::to_string(width));
|
||||
addAttribute(std::move(attr));
|
||||
}
|
||||
|
||||
void SvgShapeElement::setFillOpacity(float opacity)
|
||||
{
|
||||
auto attr = std::make_unique<XmlAttribute>("fill-opacity");
|
||||
attr->setValue(std::to_string(opacity));
|
||||
addAttribute(std::move(attr));
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ public:
|
|||
|
||||
void setNoFill();
|
||||
|
||||
void setFillOpacity(float opacity);
|
||||
|
||||
void setStrokeWidth(double width);
|
||||
|
||||
void setStrokeColor(const Color& stroke);
|
||||
|
|
|
@ -10,6 +10,13 @@ SvgTextElement::SvgTextElement()
|
|||
|
||||
}
|
||||
|
||||
void SvgTextElement::setFillOpacity(float opacity)
|
||||
{
|
||||
auto attr = std::make_unique<XmlAttribute>("fill-opacity");
|
||||
attr->setValue(std::to_string(opacity));
|
||||
addAttribute(std::move(attr));
|
||||
}
|
||||
|
||||
void SvgTextElement::setLocation(const Point& loc)
|
||||
{
|
||||
auto x = std::make_unique<XmlAttribute>("x");
|
||||
|
|
|
@ -15,6 +15,8 @@ public:
|
|||
|
||||
void setFill(const Color& fill);
|
||||
|
||||
void setFillOpacity(float opacity);
|
||||
|
||||
void setFontFamily(const std::string& family);
|
||||
|
||||
void setFontSize(float size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue