c# - Building an "inner stroke" effect from a Polygon -


I am portraying a whole bunch on a canvas, most of which share shafts with at least one other polygon I want to point out that by setting a polygon "special", the stroke on a polygon is partially pulled by another polygon due to the overlapping edges, which helps to reduce stroke from place to place is. In addition, on the basis of draw order, around a polygon it can be almost completely covered with a stroke. Extraction of polygon is not a very attractive option, because the visible difference between polygon is much less than this "thin stroke" problem.

I believe that the effect I see can be achieved by generating it as a pair of polygon instead of each polygon, such that a polygon is completely contained within the other And the stroke of this small polygon (not multilayer) runs to the stroke of the outer polygon, the inner polygon is filled with a transparent all the time, and a non-transparent stroke occurs when I point it out Ahta that pair now polygons is "special".

My question boils down; How can I get such an inner polygon from outer exterior, or can it fail, how can I get this effect?

In the question of polygon can be constrained if needed, and strokes are simple I like to be able to adjust the thickness of the stroke at some point, without fancy amator or similar thickness solid lines, But nothing is from it.

I think there are some ways of actually what you want to achieve.

First of all, with its original idea of ​​pulling a small, small polygon in the original polygon; This is not a bad idea to answer your basic question as a way to generate small polygon: You can find the center of each polygon, and to get the polygon, to get that center point of the polygon Can offset each head by the percentage of. It should give a pleasant effect.

Another method you can go to is to use z-order, and offset the "thick" polygon from slightly negative z-distance.

To take another route yet, take advantage of the draw order; Finalize your dense polygons, which will prevent them from becoming overdue to the surrounding polygons.

Yet another idea that can work on the basis of your needs, can not attract the polygon at all, but the lines should be just a few lines thick.

There are many options for you; Hope you find the job that works well!


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -