ThinkGeo.com    |     Documentation    |     Premium Support

Different line styles either side of centre line

Hi,

I was wondering how to achieve drawing differently either side of a line’s centre line - or in other words non-symmetrical lines. Currently there is a centre line, an inner line and an outer line style. I would like a centre line, a first-side line and other-side line style. For example if the line made a curve then have the inside of the curve thick red and the outer thin black.

Regards,
Jonathan

Hi Jonathan,

Our developer tried some ways but failed to implement the effect like like your requirement.

After that we research the GDI API and also hadn’t found any possible to implement that.

As below is the workaround we tried and you can see it cannot works well.

If you have any thinking about that please let us know.

Regards,

Ethan

Ethan,

Thanks for having a look.You managed an interesting effect if not quite what we were aiming at. I haven’t tried anything yet myself but the only thing I thought of was to draw a parallel line offset by 1/2 the desired thickness, draw that full thickness then draw the centre line thin.

Regards,
Jonathan

Hi Jonathan,

I think draw the parallel line is the only solution, but you need put it in the other layer, and set different style to the two layers.

We don’t have existing algorithm to calculate the parallel line, that’s why I hadn’t mentioned about this way.

Regards,

Ethan

OK, something to investigate in my own time a bit later I think.
Thanks,
Jonathan

Hi Jonathan,

Any question please let us know.

Regards,

Ethan