
// 6. Track Background
const float radiusSquare = boundSquare.getWidth() * 0.5f;
const float thicknessTrack = radiusSquare * 0.1f;
const float radiusTrack = radiusSquare - thicknessTrack * 0.5f;
// path's geometry
path.clear();
path.addCentredArc(boundSquare.getCentreX(), boundSquare.getCentreY(),
radiusTrack, radiusTrack, 0.0f,
rotaryStartAngle, rotaryEndAngle,
true);
// path's design
juce::PathStrokeType stroketype (thicknessTrack,
juce::PathStrokeType::JointStyle::curved,
juce::PathStrokeType::EndCapStyle::rounded);
g.setColour(MyColors::RotaryKnob::trackBackground);
g.strokePath(path, stroketype);

// 7. Dial
const float anglePos = rotaryStartAngle + sliderPosProportional * (rotaryEndAngle - rotaryStartAngle);
const float RboundInner = boundInner.getWidth() * 0.5f;
const float Rstart = RboundInner * 0.5f;
const float Rend = RboundInner * 0.85f;
// Adjustment of Coordinate System
const float theta = anglePos - juce::MathConstants<float>::halfPi;
// Trigonometry
const juce::Point<float> startPoint (boundInner.getCentreX() + Rstart * cos(theta),
boundInner.getCentreY() + Rstart * sin(theta));
const juce::Point<float> endPoint (boundInner.getCentreX() + Rend * cos(theta),
boundInner.getCentreY() + Rend * sin(theta));
path.clear();
path.startNewSubPath(startPoint);
path.lineTo(endPoint);
g.setColour(MyColors::RotaryKnob::dial);
g.strokePath(path, stroketype);

Some parameters can have negative values, so the starting point might not always be the start angle. Therefore, the value of anglePos should be handled differently depending on the case.
class MyRotaryKnob : public juce::Slider
{
public:
MyRotaryKnob(juce::AudioProcessorValueTreeState& inApvts,
const juce::String& inParamId,
const bool inStartMiddle = false)
{
getProperties().set("StartMiddle", inStartMiddle);
}
}
mKnobAmount(mAudioprocessor.getmApvts(),MyParamId::FeedBack::Amount.getParamID(),true)
mKnobGain(mAudioprocessor.getmApvts(), MyParamId::Output::Gain.getParamID(),true)
// 8. track value
const bool flagStartMiddle = inSlider.getProperties()["StartMiddle"];
const float startAngle = flagStartMiddle ?
(rotaryStartAngle + sliderPosProportional * (rotaryEndAngle - rotaryStartAngle)) :
rotaryStartAngle;
path.clear();
path.addCentredArc(boundInner.getCentreX(), boundInner.getCentreY(),
radiusTrack, radiusTrack, 0.0f, startAngle, anglePos, true);
g.setColour(MyColors::RotaryKnob::trackActive);
g.strokePath(path, stroketype);

After getting rid of the all lines, this is final rotary knob's design.
