-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[graphics] Add FillType & DropShadow
- Loading branch information
1 parent
4d20d1b
commit e9268a9
Showing
7 changed files
with
152 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
namespace lua_juce { | ||
|
||
auto juce_FillType(sol::table& state) -> void | ||
{ | ||
auto fill = state.new_usertype<juce::FillType>( // | ||
"FillType", // | ||
sol::constructors< // | ||
juce::FillType(), // | ||
juce::FillType(juce::Colour), // | ||
juce::FillType(juce::ColourGradient const&), // | ||
juce::FillType(juce::Image const&, juce::AffineTransform const&) // | ||
>() // | ||
); | ||
|
||
// member functions | ||
fill["isColour"] = LUA_JUCE_C_CALL(&juce::FillType::isColour); | ||
fill["isGradient"] = LUA_JUCE_C_CALL(&juce::FillType::isGradient); | ||
fill["isTiledImage"] = LUA_JUCE_C_CALL(&juce::FillType::isTiledImage); | ||
fill["setColour"] = LUA_JUCE_C_CALL(&juce::FillType::setColour); | ||
fill["setGradient"] = LUA_JUCE_C_CALL(&juce::FillType::setGradient); | ||
fill["setTiledImage"] = LUA_JUCE_C_CALL(&juce::FillType::setTiledImage); | ||
fill["setOpacity"] = LUA_JUCE_C_CALL(&juce::FillType::setOpacity); | ||
fill["getOpacity"] = LUA_JUCE_C_CALL(&juce::FillType::getOpacity); | ||
fill["isInvisible"] = LUA_JUCE_C_CALL(&juce::FillType::isInvisible); | ||
fill["transformed"] = LUA_JUCE_C_CALL(&juce::FillType::transformed); | ||
|
||
// member vars | ||
fill["colour"] = &juce::FillType::colour; | ||
fill["image"] = &juce::FillType::image; | ||
fill["transform"] = &juce::FillType::transform; | ||
|
||
// TODO(tobi): unique_ptr crashes on gcc 13.2. Other platforms not tested | ||
// fill["gradient"] = &juce::FillType::gradient; | ||
} | ||
|
||
} // namespace lua_juce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace lua_juce { | ||
|
||
auto juce_DropShadow(sol::table& state) -> void | ||
{ | ||
auto fill = state.new_usertype<juce::DropShadow>( // | ||
"DropShadow", // | ||
sol::constructors< // | ||
juce::DropShadow(), // | ||
juce::DropShadow(juce::Colour, int, juce::Point<int>) // | ||
>() // | ||
); | ||
|
||
// member functions | ||
fill["drawForImage"] = LUA_JUCE_C_CALL(&juce::DropShadow::drawForImage); | ||
fill["drawForPath"] = LUA_JUCE_C_CALL(&juce::DropShadow::drawForPath); | ||
fill["drawForRectangle"] = LUA_JUCE_C_CALL(&juce::DropShadow::drawForRectangle); | ||
|
||
// member vars | ||
fill["colour"] = &juce::DropShadow::colour; | ||
fill["radius"] = &juce::DropShadow::radius; | ||
fill["offset"] = &juce::DropShadow::offset; | ||
} | ||
|
||
} // namespace lua_juce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
#include <lua_juce_graphics/lua_juce_graphics.hpp> | ||
|
||
#include "colour/Colour.cpp" | ||
#include "colour/ColourGradient.cpp" | ||
#include "colour/Colours.cpp" | ||
#include "contexts/Graphics.cpp" | ||
#include "font/Font.cpp" | ||
#include "geometry/AffineTransform.cpp" | ||
#include "geometry/Line.cpp" | ||
#include "geometry/Path.cpp" | ||
#include "geometry/Point.cpp" | ||
#include "geometry/Rectangle.cpp" | ||
#include "images/Image.cpp" | ||
#include "images/ImageCache.cpp" | ||
#include "placement/Justification.cpp" | ||
#include "colour/Colour.cpp" // NOLINT | ||
#include "colour/ColourGradient.cpp" // NOLINT | ||
#include "colour/Colours.cpp" // NOLINT | ||
#include "colour/FillType.cpp" // NOLINT | ||
#include "contexts/Graphics.cpp" // NOLINT | ||
#include "effects/DropShadow.cpp" // NOLINT | ||
#include "font/Font.cpp" // NOLINT | ||
#include "geometry/AffineTransform.cpp" // NOLINT | ||
#include "geometry/Line.cpp" // NOLINT | ||
#include "geometry/Path.cpp" // NOLINT | ||
#include "geometry/Point.cpp" // NOLINT | ||
#include "geometry/Rectangle.cpp" // NOLINT | ||
#include "images/Image.cpp" // NOLINT | ||
#include "images/ImageCache.cpp" // NOLINT | ||
#include "placement/Justification.cpp" // NOLINT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters