Discussion:
[Wxart2d-users_dev] Fill- and Strokecolour in a2dDrawPolylineLTool
klaas.holwerda
2015-07-08 09:46:20 UTC
Permalink
Hi,

SetContourWidth is not for setting the stroke witdh. It is for making donut shapes from a circle and
for other shapes simular effects,
Better leave it to zero.
If you have it set to zero, and the stroke width is m_stroke_width, do the colors work then for the
Polyline?
Also be aware that stroke width can be in pixels or in world size.

Let me know if this solves anything,
Via the mailinglist please ;-)

Regards,

Klaas
Hello Klaas,
the fillcolour and strokecolour doesn't work with a2dDrawPolylineLTool.
a2dDrawPolylineLTool *winkel = new a2dDrawPolylineLTool (m_toolctrl);
winkel->SetEvtHandler( new a2dStToolFixedToolStyleEvtHandler( m_toolctrl ) );
a2dFill fill = a2dFill (m_tool_fill_color, a2dFILL_SOLID);
winkel->SetFill (fill);
winkel->SetContourWidth (m_contour_width);
a2dStroke stroke = a2dStroke (m_stroke_color, m_stroke_width, a2dSTROKE_SOLID);
winkel->SetStroke (stroke);
m_toolctrl->PushTool (winkel);
Colour for a2dDrawLineTool works fine
a2dDrawLineTool *line = new a2dDrawLineTool (m_toolctrl);
line->SetEvtHandler( new a2dStToolFixedToolStyleEvtHandler( m_toolctrl ) );
a2dFill fill = a2dFill (m_tool_fill_color, a2dFILL_SOLID);
line->SetFill (fill);
line->SetContourWidth (m_contour_width);
a2dStroke stroke = a2dStroke (m_stroke_color, m_stroke_width, a2dSTROKE_SOLID);
line->SetStroke (stroke);
m_toolctrl->PushTool (line);
Polyline and Line
Regards
Demir
Süleyman Demir
2015-07-09 12:17:40 UTC
Permalink
Hello,

I need the ContourWidth to outline the shapes with the stroke (colour
black) and fill it with another colour (e.g. red),
like a2dSLine in the image in the attachment. That worked for PolyLine
too, till i updated after 3 years :-) to the latest wxart2d.

In the image the width are:
ContourWidth: double 6.0
StrokeWidth: double 2.0

Stroke is black, fill is red


Another issue:
You have to delete dcclient.h from SVN in
wxArt2D\packages\wxart2d\include\wx.
I think it should be not there, because of gtk errors while compiling
under windows.

Regards,
Demir
Post by klaas.holwerda
Hi,
SetContourWidth is not for setting the stroke witdh. It is for making
donut shapes from a circle and for other shapes simular effects,
Better leave it to zero.
If you have it set to zero, and the stroke width is m_stroke_width, do
the colors work then for the Polyline?
Also be aware that stroke width can be in pixels or in world size.
Let me know if this solves anything,
Via the mailinglist please ;-)
Regards,
Klaas
Hello Klaas,
the fillcolour and strokecolour doesn't work with a2dDrawPolylineLTool.
a2dDrawPolylineLTool *winkel = new a2dDrawPolylineLTool (m_toolctrl);
winkel->SetEvtHandler( new a2dStToolFixedToolStyleEvtHandler(
m_toolctrl ) );
a2dFill fill = a2dFill (m_tool_fill_color, a2dFILL_SOLID);
winkel->SetFill (fill);
winkel->SetContourWidth (m_contour_width);
a2dStroke stroke = a2dStroke (m_stroke_color, m_stroke_width,
a2dSTROKE_SOLID);
winkel->SetStroke (stroke);
m_toolctrl->PushTool (winkel);
Colour for a2dDrawLineTool works fine
a2dDrawLineTool *line = new a2dDrawLineTool (m_toolctrl);
line->SetEvtHandler( new a2dStToolFixedToolStyleEvtHandler(
m_toolctrl ) );
a2dFill fill = a2dFill (m_tool_fill_color, a2dFILL_SOLID);
line->SetFill (fill);
line->SetContourWidth (m_contour_width);
a2dStroke stroke = a2dStroke (m_stroke_color, m_stroke_width,
a2dSTROKE_SOLID);
line->SetStroke (stroke);
m_toolctrl->PushTool (line);
Polyline and Line
Regards
Demir
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Wxart2d-users_dev mailing list
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
klaas.holwerda
2015-07-14 00:57:20 UTC
Permalink
Hi,

Think it is solved now.

A flag was added to prevent setting fill when Getfilled() flag was not set.
But when setting contour width it is needed.

Regards,

Klaas
Post by Süleyman Demir
Hello,
I need the ContourWidth to outline the shapes with the stroke (colour black) and fill it with
another colour (e.g. red),
like a2dSLine in the image in the attachment. That worked for PolyLine too, till i updated after 3
years :-) to the latest wxart2d.
ContourWidth: double 6.0
StrokeWidth: double 2.0
Stroke is black, fill is red
You have to delete dcclient.h from SVN in wxArt2D\packages\wxart2d\include\wx.
I think it should be not there, because of gtk errors while compiling under windows.
Süleyman Demir
2015-07-15 14:10:33 UTC
Permalink
Hi,

it works!

Thank you.

Regards,
Demir
Post by klaas.holwerda
Hi,
Think it is solved now.
A flag was added to prevent setting fill when Getfilled() flag was not set.
But when setting contour width it is needed.
Regards,
Klaas
Post by Süleyman Demir
Hello,
I need the ContourWidth to outline the shapes with the stroke (colour
black) and fill it with another colour (e.g. red),
like a2dSLine in the image in the attachment. That worked for
PolyLine too, till i updated after 3 years :-) to the latest wxart2d.
ContourWidth: double 6.0
StrokeWidth: double 2.0
Stroke is black, fill is red
You have to delete dcclient.h from SVN in
wxArt2D\packages\wxart2d\include\wx.
I think it should be not there, because of gtk errors while compiling under windows.
Loading...