How to fill between two spline curves with two different colors in C#
-
Hi, I want to fill between two spline curves with two different colors (Above one of the curves (Red), and below it (yellow)). And also i want the end user to be able fill the mentioned area with a selected pattern. how can i do that? i have used from ValueToPixelPosition but it is not a proper way or i can not do it inpecable. thanks in advance.
-
Hi, I want to fill between two spline curves with two different colors (Above one of the curves (Red), and below it (yellow)). And also i want the end user to be able fill the mentioned area with a selected pattern. how can i do that? i have used from ValueToPixelPosition but it is not a proper way or i can not do it inpecable. thanks in advance.
How do you "fill a curve"? There are "strokes" and stroke thickness and color. There are "shapes" one can "fill". There are "brushes" that can paint a pattern (WPF). You need to identify some primitives to work with. A "pixel", in this case, is a little too primitive.
"(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal
-
Hi, I want to fill between two spline curves with two different colors (Above one of the curves (Red), and below it (yellow)). And also i want the end user to be able fill the mentioned area with a selected pattern. how can i do that? i have used from ValueToPixelPosition but it is not a proper way or i can not do it inpecable. thanks in advance.
You must collect information sufficient to define the spline. You must determine the intersection points if any. From here I will proceed with the assumption that there are two and only two intersecting points. You must then determine the 'area' represented by the intersection. The user can then point to an area Determine if the area is in the is within the intersection. The points and the curves define this. Then allow the user to pick a pattern and color. Then use the last two steps to fill in the area. You start at one end and color to the other. You will need to figure out how to chop the pattern when you reach the edge.
-
Hi, I want to fill between two spline curves with two different colors (Above one of the curves (Red), and below it (yellow)). And also i want the end user to be able fill the mentioned area with a selected pattern. how can i do that? i have used from ValueToPixelPosition but it is not a proper way or i can not do it inpecable. thanks in advance.
You should make polygons, closed curves, paths, or some other graphic object to represent the areas that you want to fill. Then you can use the Graphics object's FillXxx methods to fill the areas with whatever brushes you like. Exactly how you define the closed areas will depend on exactly what you want. If you post a sketch, that would help.