35 pxpm = Sci::make_unique<XPM>(*other.
pxpm);
39 image = Sci::make_unique<RGBAImage>(*other.
image);
54 pxpm = Sci::make_unique<XPM>(*other.
pxpm);
58 image = Sci::make_unique<RGBAImage>(*other.
image);
67 pxpm = Sci::make_unique<XPM>(textForm);
72 pxpm = Sci::make_unique<XPM>(linesForm);
77 image = Sci::make_unique<RGBAImage>(
static_cast<int>(sizeRGBAImage.
x),
static_cast<int>(sizeRGBAImage.
y), scale, pixelsRGBAImage);
85 centreX + armSize + 1,
86 centreY + armSize + 1);
94 centreX + armSize + 1,
95 centreY + armSize + 1);
96 surface->
Ellipse(rcCircle, back, fore);
113 customDraw(surface, rcWhole, fontForCharacter,
static_cast<int>(part), marginStyle,
this);
141 pxpm->Draw(surface, rcWhole);
159 const int minDim = std::min(ircWhole.
Width(), ircWhole.
Height() - 2) - 1;
160 int centreX = (ircWhole.
right + ircWhole.
left) / 2;
161 const int centreY = (ircWhole.
bottom + ircWhole.
top) / 2;
162 const int dimOn2 = minDim / 2;
163 const int dimOn4 = minDim / 4;
164 const int blobSize = dimOn2 - 1;
165 const int armSize = dimOn2 - 2;
168 centreX = ircWhole.
left + dimOn2 + 1;
267 surface->
LineTo(centreX, centreY);
274 surface->
MoveTo(centreX, centreY);
279 surface->
LineTo(centreX, centreY + 1);
289 surface->
LineTo(centreX, centreY - 3);
290 surface->
LineTo(centreX + 3, centreY);
297 surface->
MoveTo(centreX, centreY - 3);
298 surface->
LineTo(centreX + 3, centreY);
303 surface->
LineTo(centreX, centreY - 2);
311 DrawBox(surface, centreX, centreY, blobSize,
fore, colourHead);
312 DrawPlus(surface, centreX, centreY, blobSize, colourTail);
321 surface->
MoveTo(centreX, centreY + blobSize);
326 surface->
LineTo(centreX, centreY - blobSize);
328 DrawBox(surface, centreX, centreY, blobSize,
fore, colourHead);
329 DrawPlus(surface, centreX, centreY, blobSize, colourTail);
333 surface->
MoveTo(centreX + 1, centreY + blobSize);
334 surface->
LineTo(centreX + blobSize + 1, centreY + blobSize);
336 surface->
MoveTo(centreX + blobSize, centreY + blobSize);
337 surface->
LineTo(centreX + blobSize, centreY - blobSize);
339 surface->
MoveTo(centreX + 1, centreY - blobSize);
340 surface->
LineTo(centreX + blobSize + 1, centreY - blobSize);
346 DrawBox(surface, centreX, centreY, blobSize,
fore, colourHead);
347 DrawMinus(surface, centreX, centreY, blobSize, colourTail);
350 surface->
MoveTo(centreX, centreY + blobSize);
356 DrawBox(surface, centreX, centreY, blobSize,
fore, colourHead);
357 DrawMinus(surface, centreX, centreY, blobSize, colourTail);
360 surface->
MoveTo(centreX, centreY + blobSize);
365 surface->
LineTo(centreX, centreY - blobSize);
369 surface->
MoveTo(centreX + 1, centreY + blobSize);
370 surface->
LineTo(centreX + blobSize + 1, centreY + blobSize);
372 surface->
MoveTo(centreX + blobSize, centreY + blobSize);
373 surface->
LineTo(centreX + blobSize, centreY - blobSize);
375 surface->
MoveTo(centreX + 1, centreY - blobSize);
376 surface->
LineTo(centreX + blobSize + 1, centreY - blobSize);
382 DrawCircle(surface, centreX, centreY, blobSize,
fore, colourHead);
383 DrawPlus(surface, centreX, centreY, blobSize, colourTail);
392 surface->
MoveTo(centreX, centreY + blobSize);
397 surface->
LineTo(centreX, centreY - blobSize);
399 DrawCircle(surface, centreX, centreY, blobSize,
fore, colourHead);
400 DrawPlus(surface, centreX, centreY, blobSize, colourTail);
406 surface->
MoveTo(centreX, centreY + blobSize);
409 DrawCircle(surface, centreX, centreY, blobSize,
fore, colourHead);
410 DrawMinus(surface, centreX, centreY, blobSize, colourTail);
416 surface->
MoveTo(centreX, centreY + blobSize);
421 surface->
LineTo(centreX, centreY - blobSize);
423 DrawCircle(surface, centreX, centreY, blobSize,
fore, colourHead);
424 DrawMinus(surface, centreX, centreY, blobSize, colourTail);
430 for (
int b = 0; b < 3; b++) {
440 int right = centreX - 2;
441 const int armLength = dimOn2 - 1;
442 for (
int b = 0; b < 3; b++) {
443 surface->
MoveTo(right, centreY);
444 surface->
LineTo(right - armLength, centreY - armLength);
445 surface->
MoveTo(right, centreY);
446 surface->
LineTo(right - armLength, centreY + armLength);
479 const int halfHeight = minDim / 3;
492 const int halfWidth = minDim / 3;
A rectangle with integer coordinates.
static void DrawBox(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore, ColourDesired back)
static void DrawPlus(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore)
static void DrawCircle(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore, ColourDesired back)
static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore)
Defines the look of a line marker in the margin .
Interface to the edit control.
#define SC_MARK_UNDERLINE
#define SC_MARK_SMALLRECT
#define SC_MARK_RGBAIMAGE
#define SC_MARK_TCORNERCURVE
#define SC_MARK_CIRCLEMINUS
#define SC_MARK_ARROWDOWN
#define SC_MARK_CIRCLEMINUSCONNECTED
#define SC_MARK_AVAILABLE
#define SC_MARK_VERTICALBOOKMARK
#define SC_MARK_DOTDOTDOT
#define SC_MARK_SHORTARROW
#define SC_MARK_BOXPLUSCONNECTED
#define SC_MARK_BACKGROUND
#define SC_MARK_ROUNDRECT
#define SC_MARK_CIRCLEPLUSCONNECTED
#define SC_MARK_LCORNERCURVE
#define SC_MARK_CIRCLEPLUS
#define SC_MARK_BOXMINUSCONNECTED
#define SC_MARK_CHARACTER
Define a classes to hold image data in the X Pixmap (XPM) and RGBA formats.
DrawLineMarkerFn customDraw
Some platforms, notably PLAT_CURSES, do not support Scintilla's native Draw function for drawing line...
std::unique_ptr< XPM > pxpm
LineMarker & operator=(const LineMarker &other)
ColourDesired backSelected
void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage)
std::unique_ptr< RGBAImage > image
void SetXPM(const char *textForm)
void Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, FoldPart part, int marginStyle) const
A geometric rectangle class.
static constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept
constexpr XYPOSITION Width() const noexcept
static constexpr Point FromInts(int x_, int y_) noexcept
A surface abstracts a place to draw.
virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0
virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0
virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage)=0
virtual void PenColour(ColourDesired fore)=0
virtual void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back)=0
virtual void Polygon(Point *pts, size_t npts, ColourDesired fore, ColourDesired back)=0
virtual void MoveTo(int x_, int y_)=0
virtual void LineTo(int x_, int y_)=0
virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0
virtual void FillRectangle(PRectangle rc, ColourDesired back)=0
virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0
Styling buffer using one element for each run rather than using a filled buffer.
int Width() const noexcept
int Height() const noexcept