- sclgraf.shq [c+]
[..] La fonction [shq] drawSectorshq
Code
int drawsector_shq_xpl(){
double length=1;
double cx=length, cy=length;
double ea=length, eb=length/3, startAngle=0, endAngle=-45;
scltracefa(§, ƒ, ∅);
scltracefc("scl-%s (%s) : %s\n\n", sclver(), sclsec(), temps_char(0));
shq::beginDrawing(PRM_BEGINDRAWING_SHQ); // <Initializes the
local "connection"
shq::newFigure("drawsector_shq"); // <Creates a new
figure;
shq::Params prms;
prms["FaceColor"]="~"; prms["EdgeColor"]="darkGreen"; prms["LineStyle"]="--";
shq::drawEllipse(cx, cy, ea, eb, 0, prms);
shq::drawSector(cx, cy, ea, eb, startAngle, endAngle,
/*"[vert]darkGreen"*/"[#00CC0026]darkGreen"); //vert transparence 15%
cx=-length; cy= length; endAngle-=90;
prms["EdgeColor"]="darkYellow";
shq::drawEllipse(cx, cy, ea, eb, 0, prms);
shq::drawSector(cx, cy, ea, eb, startAngle, endAngle,
/*"darkYellow[carotte]"*/"darkYellow[#FFC00026]"); //carotte transparence 15%
cx=-length; cy=-length; endAngle-=90;
prms["EdgeColor"]="darkBlue";
shq::drawEllipse(cx, cy, ea, eb, 0, prms);
shq::drawSector(cx, cy, ea, eb, startAngle, endAngle,
/*"[bleu]darkBlue"*/"[#0066FF26]darkBlue"); //bleu transparence 15%
cx= length; cy=-length; endAngle-=90;
prms["EdgeColor"]="darkRed";
shq::drawEllipse(cx, cy, ea, eb, 0, prms);
shq::drawSector(cx, cy, ea, eb, startAngle, endAngle,
/*"darkRed[chaire]"*/"darkRed[#C0000026]"); //chaire transparence 15%
shq::axisAuto();
shq::axisEqual("drawsector_shq");
shq::saveImage("./srt/drawsector_shq.svg");
shq::endDrawing(); // <Closes the
"connection"
scltracefe(§, ƒ, ∅);
return 0;
}
/* ƒ décorée par
le 08-06-2025 12:50:31 */
Sortie
[>..\xpl\src\sclgraf.shq.xpl.cpp.drawsector_shq_xpl]
scl-25.06 (gwin64) : 08-06-2025 12:50:31
[<..\xpl\src\sclgraf.shq.xpl.cpp.drawsector_shq_xpl]