20{
22 const int mLength = context.
mLength;
23
24 const int mLeft = context.
mLeft;
25 const int mTop = context.
mTop;
26 const int mBottom = context.
mBottom;
27 const int mRight = context.
mRight;
29
32 const int spacing = (mOrientation == wxHORIZONTAL) ? 6 : 2;
33 const bool mFlip = context.
mFlip;
34
35
36 if ((mDbMirrorValue > 1.0) && (-d > mDbMirrorValue))
37 d = -2 * mDbMirrorValue - d;
38
39
40
41 if (outputs.labels.size() >= mLength)
42 return false;
43
44 Label lab;
45 lab.value = d;
46 lab.pos = pos;
48 lab.units = mUnits;
49
51 lab,
52 dc, font,
53 outputs.bits,
54 mLeft, mTop, spacing, mFonts.
lead,
55 mFlip,
56 mOrientation);
57
58 auto& rect = result.first;
59 outputs.box.Union(rect);
60 outputs.labels.emplace_back(result.second);
61 return !rect.IsEmpty();
62}
static std::pair< wxRect, Label > MakeTick(RulerUpdater::Label lab, wxDC &dc, wxFont font, std::vector< bool > &bits, int left, int top, int spacing, int lead, bool flip, int orientation)
Holds a msgid for the translation catalog; may also bind format arguments.
std::unique_ptr< Fonts > mpFonts
TranslatableString mUnits
const RulerFormat * mpRulerFormat