7 const Slider::SliderStyle , Slider& )
10 const Colour trackBackgroundColour(0x1AFFFFFF);
11 const Colour trackColour(0x66FFFFFF);
12 const Colour thumbColour(0xFFFFFFFF);
13 const Colour centreMarkerColour(0xFF000000);
16 const int trackHeight(6);
17 const float trackY = ((float)y + (float)height * 0.5f);
18 Point<float> startPoint((
float)x, trackY);
19 Point<float> endPoint((
float)(width + x), trackY);
21 backgroundTrack.startNewSubPath(startPoint);
22 backgroundTrack.lineTo(endPoint);
23 g.setColour(trackBackgroundColour);
24 g.strokePath(backgroundTrack, {trackHeight, PathStrokeType::curved, PathStrokeType::rounded});
27 Point<float> maxPoint, negativeMaxPoint;
28 maxPoint = {sliderPos, trackY};
30 valueTrack.startNewSubPath(maxPoint);
31 g.setColour(trackColour);
32 valueTrack.lineTo(width + (x * 2.0f) - sliderPos, trackY);
33 g.strokePath(valueTrack, {trackHeight, PathStrokeType::curved, PathStrokeType::rounded});
36 const float middleMarkerWidth(2.0);
37 const float middleX((
float)x + (
float)width * 0.5f);
38 g.setColour(centreMarkerColour);
39 const float lineHeight((
float)trackHeight * 2.0f);
40 g.fillRect( middleX - (middleMarkerWidth * 0.5f) + 0.5f, 6.0f, middleMarkerWidth, lineHeight);
44 const int thumbWidth(8);
45 g.setColour(thumbColour);
47 Rectangle<float>(
static_cast<float>(thumbWidth),
static_cast<float>(thumbWidth)).withCentre(maxPoint));
void drawLinearSlider(Graphics &, int x, int y, int width, int height, float sliderPos, float minSliderPos, float maxSliderPos, const Slider::SliderStyle, Slider &) override
Definition BipolarSliderLAF.cpp:5