Reference » Window classes » MWindow » setDrawSettings

Elgrint::MWindow::setDrawSettings(MColor,double,MLineStyle) method

Declaration (see MWindow.h):

void setDrawSettings(const MColor& lineColor = SameColor, double lineThickness = Same, MLineStyle ls = lsCOUNT);


Configures parameters for drawing lines and curves.


Name Type Def value Description
lineColor MColor SameColor

Color of the lines and curves to be drawn.

Details: If lineColor is invalid (e.g. SameColor), the existing color is preserved. Otherwise, lineColor replaces the existing value, and all subsequent drawing operations use this color to draw lines and curves. The initial color is determined by the ForeColor property.

lineThickness double Same

Thickness of the lines and curves in pixels (1 to 1024).

Details: If lineThickness is invalid (e.g. Same), the existing thickness is preserved. Otherwise, lineThickness is scaled according to the current transformation (set by the last setDrawTransform), and adjusted to the [1..1024] range (see ToRange). The resulting value replaces the existing one, and all subsequent drawing operations use the new value to draw lines and curves. The initial thickness is 1.0.


  • Line thickness is not necessarily integral

ls MLineStyle lsCOUNT

Line drawing style (solid, dashed, dotted, etc.)

Details: If ls is invalid (lsCOUNT or greater), the existing value is preserved. Otherwise, ls replaces the existing value and is used for all subsequent line and curve drawing. The initial value is lsSolid.


Specifies the drawing parameters for drawRect, drawArc, and drawPoly.


Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.