Skip to content

Commit

Permalink
use "dotted" for kLineOnOffDash
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Mar 22, 2024
1 parent 535c982 commit f0266f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vstgui/standalone/examples/standalone/resource/test.uidesc
Expand Up @@ -1047,7 +1047,7 @@
"mouse-enabled": "true",
"opacity": "1",
"origin": "10, 350",
"script": "view.draw = function (context, rect) {\n\tvar polygon = [];\n\tpolygon[0] = {x: 10, y: 0};\n\tpolygon[1] = {x: 0, y: 10};\n\tpolygon[2] = {x: 10, y: 20};\n\tpolygon[3] = {x: 20, y: 10};\n\tpolygon[4] = {x: 10, y: 0};\n\tcontext.setFrameColor (\"red\");\n\tcontext.setFillColor (\"green\");\n\tcontext.drawPolygon (polygon, \"filledAndStroked\");\n\n\tcontext.setFont (\"JSTest\");\n\tcontext.setFontColor (\"black\");\n\tcontext.drawString (\"Hello JavaScript\", view.getBounds (), \"center\");\n\n\tvar clipRect = {left: 5, top: 5, right: 15, bottom: 15};\n\tcontext.setClipRect (clipRect);\n\tcontext.setFillColor (\"cyan\");\n\tcontext.drawRect (view.getBounds (), \"filled\");\n};\n",
"script": "view.draw = function (context, rect) {\n\tvar viewBounds = view.getBounds ();\n\tcontext.saveGlobalState ();\n\tcontext.setLineStyle (\"dotted\");\n\tcontext.setFrameColor (\"navy\");\n\tcontext.setLineWidth (2);\n\tcontext.drawLine ({x: viewBounds.left, y:viewBounds.top}, {x: viewBounds.right, y:viewBounds.bottom});\n\tcontext.restoreGlobalState ();\n\n\tvar polygon = [];\n\tpolygon[0] = {x: 10, y: 0};\n\tpolygon[1] = {x: 0, y: 10};\n\tpolygon[2] = {x: 10, y: 20};\n\tpolygon[3] = {x: 20, y: 10};\n\tpolygon[4] = {x: 10, y: 0};\n\tcontext.setFrameColor (\"red\");\n\tcontext.setFillColor (\"green\");\n\tcontext.drawPolygon (polygon, \"filledAndStroked\");\n\n\tcontext.setFont (\"JSTest\");\n\tcontext.setFontColor (\"black\");\n\tcontext.drawString (\"Hello JavaScript\", viewBounds, \"center\");\n\n\tvar clipRect = {left: 5, top: 5, right: 15, bottom: 15};\n\tcontext.setClipRect (clipRect);\n\tcontext.setFillColor (\"cyan\");\n\tcontext.drawRect (view.getBounds (), \"filled\");\n};\n",
"size": "110, 25",
"transparent": "false",
"wants-focus": "false"
Expand Down
Expand Up @@ -259,7 +259,7 @@ struct DrawContextObject::Impl
{
lineStyle = std::make_unique<CLineStyle> (kLineSolid);
}
else if (styleOrLineCap == "onOff"sv)
else if (styleOrLineCap == "dotted"sv)
{
lineStyle = std::make_unique<CLineStyle> (kLineOnOffDash);
}
Expand Down

0 comments on commit f0266f0

Please sign in to comment.