MCPcopy Create free account
hub / github.com/christophhart/HISE / drawRoundedRectangle

Method drawRoundedRectangle

hi_scripting/scripting/api/ScriptingGraphics.cpp:1904–1934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1902}
1903
1904void ScriptingObjects::GraphicsObject::drawRoundedRectangle(var area, var cornerData, float borderSize)
1905{
1906 auto bs = SANITIZED(borderSize);
1907 auto ar = getRectangleFromVar(area);
1908
1909 if (cornerData.isObject())
1910 {
1911 auto cs = (float)cornerData["CornerSize"];
1912 cs = SANITIZED(cs);
1913
1914 auto newAction = new ScriptedDrawActions::drawRoundedRectangle(getRectangleFromVar(area), borderSize, cs);
1915 auto ra = cornerData["Rounded"];
1916
1917 if (ra.isArray())
1918 {
1919 newAction->allRounded = false;
1920 newAction->rounded[0] = ra[0];
1921 newAction->rounded[1] = ra[1];
1922 newAction->rounded[2] = ra[2];
1923 newAction->rounded[3] = ra[3];
1924 }
1925
1926 drawActionHandler.addDrawAction(newAction);
1927 }
1928 else
1929 {
1930 auto cs = (float)cornerData;
1931 cs = SANITIZED(cs);
1932 drawActionHandler.addDrawAction(new ScriptedDrawActions::drawRoundedRectangle(ar, bs, cs));
1933 }
1934}
1935
1936void ScriptingObjects::GraphicsObject::drawHorizontalLine(int y, float x1, float x2)
1937{

Callers 15

paintItemMethod · 0.45
paintMethod · 0.45
drawNumberTagMethod · 0.45
drawButtonBackgroundMethod · 0.45
drawColumnBackgroundMethod · 0.45
drawTagMethod · 0.45
drawSearchBarMethod · 0.45
paintOverChildrenMethod · 0.45
paintMethod · 0.45
paintMethod · 0.45
paintMethod · 0.45

Calls 3

addDrawActionMethod · 0.80
isObjectMethod · 0.45
isArrayMethod · 0.45

Tested by

no test coverage detected