Skip to content

Commit

Permalink
Traktor: Fixed optional arguments to "rotate" operator in SVG rasteri…
Browse files Browse the repository at this point in the history
…zer. Improved some GraphControl graphics.
  • Loading branch information
apistol78 committed Apr 28, 2024
1 parent eb1a3d9 commit 15ef4ad
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 248 deletions.
11 changes: 8 additions & 3 deletions code/Svg/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,15 @@ Matrix33 Parser::parseTransform(const xml::Element* elm, const std::wstring& att
}
else if (fnc == L"rotate")
{
StaticVector< float, 1 > argv;
Split< std::wstring, float >::any(args, L",", argv, false, 1);
StaticVector< float, 3 > argv;
Split< std::wstring, float >::any(args, L",", argv, false, 3);

if (argv.size() >= 1)
if (argv.size() >= 3)
{
const Matrix33 Mt = translate(argv[1], argv[2]);
transform = transform * (Mt * rotate(deg2rad(argv[0])) * Mt.inverse());
}
else if (argv.size() >= 1)
transform = transform * rotate(deg2rad(argv[0]));
}
else if (fnc == L"scale")
Expand Down
2 changes: 1 addition & 1 deletion code/Ui/X11/CanvasX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ bool CanvasX11::realizeFont() const
);
cairo_set_font_size(
m_cr,
(m_font.getSize().get() * m_dpi) / 96
(m_font.getSize().get() * m_dpi) / 96.0f
);

m_fontDirty = false;
Expand Down
127 changes: 57 additions & 70 deletions resources/runtime/themes/Dark/New/UI/Graph/External.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 51 additions & 68 deletions resources/runtime/themes/Dark/New/UI/Graph/Node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 15ef4ad

Please sign in to comment.