FilledCurve[{segment1,segment2,…}]
represents a filled curve consisting of segment1 followed by segment2 etc.
FilledCurve[{component1,component2,…}]
represents a list of separate filled component curves component1, component2, etc.
FilledCurve
FilledCurve[{segment1,segment2,…}]
represents a filled curve consisting of segment1 followed by segment2 etc.
FilledCurve[{component1,component2,…}]
represents a list of separate filled component curves component1, component2, etc.
Details and Options
- FilledCurve can be used in Graphics (two-dimensional graphics).
- FilledCurve[segment] is equivalent to FilledCurve[{segment}].
- Possible forms of segmenti include:
-
Line[{pt1,pt2,…}] lines BezierCurve[{pt1,pt2,…},…] Bézier curve BSplineCurve[{pt1,pt2,…},…] B-spline curve - The first point on segmenti is taken to be the last point on segmenti-1. FilledCurve[{pr1[{p1,…,pi}],pr2[{q1,…,qj}],…}] is equivalent to FilledCurve[{pr1[{p1,…,pi}],pr2[{pi,q1,…,qj}],…}].
- Filled curves can be non-convex and intersect themselves. Self-intersecting curves are filled according to an even-odd rule that alternates between filling and not at each crossing.
- FilledCurve[{component1,component2,…}] treats each component curve as a separate closed curve, but the filling behavior is determined as if they were part of the same curve.
- The coordinates can be specified using:
-
{x,y} ordinary coordinates Scaled[{x,y}] scaled coordinates ImageScaled[{x,y}] image scaled coordinates Offset[{dx,dy},{x,y}] absolute offset coordinates - Individual coordinates and lists of coordinates in segments can be Dynamic objects.
- FaceForm and EdgeForm can be used to specify how the interiors and boundaries should be rendered.
- Edge thickness can be specified using Thickness or AbsoluteThickness, as well as Thick, Thin, etc. in EdgeForm.
- Edge dashing can be specified using Dashing or AbsoluteDashing, as well as Dashed, Dotted, etc. in EdgeForm; for FilledCurve the dashing will be computed across all segments for each component curve.
- Edge coloring and transparency can be specified using CMYKColor, GrayLevel, Hue, Opacity, or RGBColor in EdgeForm.
- Joining of curve segments can be specified using JoinForm.
- Face coloring and transparency can be specified using CMYKColor, GrayLevel, Hue, Opacity, or RGBColor in FaceForm.
- A texture can be applied using Texture and will be mapped to the curve using the VertexTextureCoordinates option specified for the curve.
- VertexColors and VertexNormals options to Line will have no effect within a FilledCurve construct.
Examples
open all close allBasic Examples (4)
Filled curve from a Bézier segment:
a = {{-1, 0}, {0, 1}, {1, 0}};Graphics[FilledCurve[{BezierCurve[a]}]]Filled curve with mixed curve segments:
a = {{-1, 0}, {0, 1}, {1, 0}};b = {{0, -(2/3)}, {-1, 0}};Graphics[FilledCurve[{BezierCurve[a], Line[b]}]]pts = {{0, 1}, {-1, -(1/2)}, {1, -(1/2)}};Graphics[FilledCurve[{{Line[2pts]}, {Line[pts]}}]]Self-intersecting filled curve:
Graphics[FilledCurve[{{Line[pts]}, {Line[TranslationTransform[{1, (1/2)}][pts]]}}]]Differently styled filled curves:
a = {{-1, 0}, {0, 1}, {1, 0}};b = {{0, -(2/3)}, {-1, 0}};curve = FilledCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}}];{Graphics[{Pink, curve}], Graphics[{EdgeForm[Thick], Pink, curve}], Graphics[{EdgeForm[Directive[Thick, Dashed, Blue]], Pink, curve}]}Graphics[{Texture[ExampleData[{"TestImage", "House"}]], FilledCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}}, VertexTextureCoordinates -> {{{0, (1/2)}, {(1/2), 1}, {1, (1/2)}, {(1/2), (1/12)}, {0, (1/2)}}, {{(1/4), (1/2)}, {(1/2), (3/4)}, {(3/4), (1/2)}, {(1/2), (7/24)}, {(1/4), (1/2)}}}]}]Scope (15)
Graphics (9)
Specification (3)
Filled curve with a single line segment:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[Line[{{-1, 0}, {-1, 1}, {0, 2}, {1, 1}, {1, 0}}]]}]Filled curve with a single Bézier curve segment:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[BezierCurve[{{-1, 0}, {-1, 2}, {1, 2}, {1, 0}}]]}]Filled curve with a single B-spline curve segment:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[BSplineCurve[{{-1, 0}, {-1, 1}, {0, 0}, {1, 1}, {1, 0}}]]}]Filled curve with mixed curve segments:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[{BSplineCurve[{{-2, 0}, {-1, 1}, {0, -1}, {1, 1}, {2, 0}}], Line[{{2, -1}, {-2, -1}}]}]}]Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{Line[{{-2, 0}, {-2, 2}, {0, 4}, {2, 2}, {2, 0}}]}, {Line[{{-1, 1}, {-1, 2}, {0, 3}, {1, 2}, {1, 1}}]}}]}]Filled curve with multiple holes:
pts = {{0, 1}, {-(Sqrt[3]/2), -(1/2)}, {(Sqrt[3]/2), -(1/2)}};Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{Line[4pts]}, {Line[TranslationTransform[{-1, 0}][pts]]}, {Line[TranslationTransform[{1, 0}][pts]]}}]}]Filled curve with multiple components:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{Line[3pts]}, {Line[2pts]}, {Line[pts]}}]}]Filled curve with self-intersections:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{Line[pts]},
{Line[TranslationTransform[{(Sqrt[3]/2), (1/2)}][pts]]}, {Line[TranslationTransform[{Sqrt[3], 1}][pts]]}}]}]Styling (3)
Color directives specify the face colors of filled curves:
Table[Graphics[{c, FilledCurve[{{BSplineCurve[{{-2, 0}, {-2, 2}, {0, 4}, {2, 2}, {2, 0}}]}, {BSplineCurve[{{-1, 1}, {-1, 2}, {0, 3}, {1, 2}, {1, 1}}]}}]}], {c, {Red, Green, Blue, Yellow}}]FaceForm and EdgeForm can be used to specify the styles of the interiors and boundaries:
Graphics[{FaceForm[Pink], EdgeForm[Directive[Dashed, Thick, Blue]], FilledCurve[{{BSplineCurve[{{-2, 0}, {-2, 2}, {0, 4}, {2, 2}, {2, 0}}]}, {BSplineCurve[{{-1, 1}, {-1, 2}, {0, 3}, {1, 2}, {1, 1}}]}}]}]JoinForm can be used to specify the type of joins of boundaries:
a = {{-2, 0}, {0, 2}, {2, 0}, {0, -2}};curve = FilledCurve[{{Line[2a]}, {Line[a]}}];{Graphics[{EdgeForm[{JoinForm["Bevel"], Thickness[0.05]}], Pink, curve}, PlotRange -> 5], Graphics[{EdgeForm[{JoinForm["Meter"], Thickness[0.05]}], Pink, curve}, PlotRange -> 5]Graphics[{EdgeForm[{JoinForm["Round"], Thickness[0.05]}], Pink, curve}, PlotRange -> 5]}Coordinates (3)
Use Scaled coordinates:
Graphics[FilledCurve[BezierCurve[{Scaled[{0, 0}], Scaled[{.5, 1}], Scaled[{1, 0}]}]], Frame -> True]Use ImageScaled coordinates:
Graphics[FilledCurve[BezierCurve[{ImageScaled[{0, 0}], ImageScaled[{.5, 1}], ImageScaled[{1, 0}]}]], Frame -> True]Use Offset coordinates:
Graphics[FilledCurve[BezierCurve[{Offset[{10, 10}, {0, 0}], Offset[{0, 50}, {.5, 1}], Offset[{-10, 10}, {1, 0}]}]], Frame -> True]Regions (6)
RegionEmbeddingDimension[FilledCurve[{BSplineCurve[{{Subscript[c, 1], Subscript[c, 2]}, {Subscript[c, 3], Subscript[c, 4]}, {Subscript[c, 5], Subscript[c, 6]}}]}]]RegionDimension[FilledCurve[{BSplineCurve[{{Subscript[c, 1], Subscript[c, 2]}, {Subscript[c, 3], Subscript[c, 4]}, {Subscript[c, 5], Subscript[c, 6]}}]}]]{RegionMember[FilledCurve[{BSplineCurve[{{0, 0}, {1, 1}, {2, -1}}]}], {0, 0}], RegionMember[FilledCurve[{BSplineCurve[{{0, 0}, {1, 1}, {2, -1}}]}], {1, 2}]}ℛ = FilledCurve[{BSplineCurve[{{0, 0}, {1, 1}, {2, -1}}]}];{ArcLength[ℛ], RegionMeasure[ℛ]}c = RegionCentroid[ℛ]Graphics[{{Yellow, ℛ}, {Red, Point[c]}}]ℛ = FilledCurve[{BSplineCurve[{{0, 0}, {1, 1}, {2, -1}}]}];{RegionDistance[ℛ, {1, 1}], RegionDistance[ℛ, {0, 0}]}The distance to the nearest point for the filled curve:
{Plot3D[Evaluate@RegionDistance[ℛ, {x, y}], {x, -2, 2}, {y, -2, 2}, MeshFunctions -> {#3&}, Mesh -> 5, Exclusions -> Norm[{x, y}] == 1], ContourPlot[Evaluate@RegionDistance[ℛ, {x, y}], {x, -3, 4}, {y, -3, 3}, Contours -> {{0.5, Red}, {1, Green}, {1.5, Blue}}]}ℛ = FilledCurve[{BSplineCurve[{{0, 0}, {1, 1}, {2, -1}}]}];{SignedRegionDistance[ℛ, {1, 1}], SignedRegionDistance[ℛ, {0, 0}]}Signed distance to the filled curve:
Plot3D[SignedRegionDistance[ℛ, {x, y}], {x, -2, 2}, {y, -2, 2}, Exclusions -> Norm[{x, y}] == 1, Mesh -> None]ℛ = FilledCurve[{BSplineCurve[{{0, 0}, {1, 1}, {2, -1}}]}];BoundedRegionQ[ℛ]rr = RegionBounds[ℛ]Graphics[{{EdgeForm[Directive[Dashed, Red]], Opacity[0.1], Yellow, Rectangle@@Transpose[rr]}, ℛ}]Generalizations & Extensions (2)
Each curve segment can have its own options for fine control:
pts = {{0., -0.5}, {0.5, -0.5}, {0.5, 0.5}, {0., 0.5}, {-0.5, 0.5}, {-0.5, -0.5}, {0., -0.5}};
w = {1, .5, .5, 1, .5, .5, 1};
k = {0, 0, 0, 1 / 4, 1 / 2, 1 / 2, 3 / 4, 1, 1, 1};Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{BSplineCurve[2pts, SplineDegree -> 2, SplineKnots -> k, SplineWeights -> w]}, {BSplineCurve[pts, SplineDegree -> 2, SplineKnots -> k, SplineWeights -> w]}}]}]By default, a Bézier segment will be attached without considering the tangent at the joining:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{Line[{{0, 0}, {2, 2}}], BezierCurve[{{4, 2}, {5, 1}, {6, 0}}]}}]}]Automatic can be used in the first coordinate of a Bézier segment to create a smooth joint:
Graphics[{Pink, EdgeForm[Blue], FilledCurve[{{Line[{{0, 0}, {2, 2}}], BezierCurve[{Automatic, {5, 1}, {6, 0}}]}}]}]Options (2)
VertexTextureCoordinates (2)
Texture mapping with a filled Bézier curve:
Graphics[{Texture[ExampleData[{"TestImage", "House"}]], FilledCurve[{BezierCurve[{{-1, 0}, {0, 1}, {1, 0}}]}, VertexTextureCoordinates -> {{0, 0}, {1 / 2, 1}, {1, 0}}]}]Texture mapping mapped to multiple component curves:
a = {{-1, 0}, {0, 1}, {1, 0}};b = {{0, -(2/3)}, {-1, 0}};Graphics[{Texture[ExampleData[{"TestImage", "House"}]], FilledCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}}, VertexTextureCoordinates -> {{{0, (1/2)}, {(1/2), 1}, {1, (1/2)}, {(1/2), (1/12)}, {0, (1/2)}}, {{(1/4), (1/2)}, {(1/2), (3/4)}, {(3/4), (1/2)}, {(1/2), (7/24)}, {(1/4), (1/2)}}}]}]Applications (5)
Graphics, Glyphs, etc. (2)
Define a letter with a filled curve:
a = FilledCurve[{{Line[{{2, 3}, {0.8125, 0.625}}],
BezierCurve[{{0.6875, 0.375}, {0.375, 0.25}, {1.125, 0.25}}, SplineDegree -> 2], BezierCurve[{{0.8125, 0.375}, {0.9375, 0.625}}],
Line[{{1.3125, 1.375}, {2.4375, 1.375}, {2.8125, 0.625}}],
BezierCurve[{{2.9375, 0.375}, {2.625, 0.25}, {3.625, 0.25}}, SplineDegree -> 2], BezierCurve[{{3.3125, 0.375}, {3.1875, 0.625}}]},
{Line[{{1.875, 2.5}, {1.375, 1.5}, {2.375, 1.5}}]}}];Graphics[a]Graphics[{EdgeForm[Blue], LightGray, a}]Extract a filled curve from a graphic:
g = First[[image]];Head[g]Rotate the glyph around the origin:
Graphics[{EdgeForm[Gray],
Table[{Hue[(t/2 π)], Rotate[g, t, {0, 0}]}, {t, 0, 2 π, (π/6)}]}]Text Effects (1)
Import text as a filled curve in graphics, using PDF as an intermediate format:
text = First[First[ImportString[ExportString[Style["Wolfram", Italic, FontSize -> 24, FontFamily -> "Times"], "PDF"], {"PDF", "PageGraphics"}, "TextMode" -> "Outlines"]]];Outline fonts using different edge and face forms:
Graphics[{EdgeForm[Black], ColorData["Crayola", "Sunglow"], text}]Cast the shadow by translation:
Graphics[{Gray, Translate[text, {1, -1}], Red, text}]Graphics[{EdgeForm[Opacity[0.5]], Table[{ColorData["TemperatureMap"][t], Translate[text, 4{-t, t}]}, {t, 0, 1, (1/10)}]}, ImageSize -> Medium]Text Banner (1)
Import text as a filled curve:
text = First[First[ImportString[ExportString[Style["MATHEMATICA", FontSize -> 72, FontFamily -> "Geogia"], "PDF"], {"PDF", "PageGraphics"}, "TextMode" -> "Outlines"]]];Graphics[text, Frame -> True]Create envelope functions of banners using BSplineFunction:
top = BSplineFunction[{60, 200, 160}];
middle = BSplineFunction[{45, 150, -30, 45}];bottom = BSplineFunction[{-90, -100, 30}];Plot[{top[t], middle[t], bottom[t]}, {t, 0, 1}]Define a function to rescale
coordinates according to
coordinates and envelope functions:
stretch[x_, t_, f_, g_] := Rescale[x, {10, 60}, {f[t], g[t]}]Deform the filled curves by replacing coordinates:
banner1 = text /. {x_Real, y_Real} :> {x, stretch[y, (x/430), bottom, middle]};
banner2 = text /. {x_Real, y_Real} :> {430 - x, stretch[y, 1 - (x/430), middle, top]};Graphics[{EdgeForm[Black], Blue, banner1, Red, banner2}]Tessellation (1)
Create a curved edge of a tile:
e1 = {{-(Sqrt[3]/2), -(1/2)}, {-(Sqrt[3]/6), 0}, {(Sqrt[3]/6), -1}, {(Sqrt[3]/2), -(1/2)}};Graphics[BezierCurve[{e1}], Axes -> True]Rotate it by 120° to get additional edges:
e2 = Map[RotationTransform[120Degree], e1];
e3 = Map[RotationTransform[120Degree], e2];Make a single tile with Bézier curve edges using a filled curve:
tile = FilledCurve[{BezierCurve[e1], BezierCurve[Rest[e2]], BezierCurve[Rest[e3]]}];Graphics[{EdgeForm[Gray], FaceForm[Opacity[(1/2), Blue]], tile}, Axes -> True, Frame -> True, PlotRange -> 1]Tile the plane by rotating and translating it:
Graphics[{EdgeForm[Opacity[(1/4), White]], FaceForm[Red], Table[With[{p = OddQ[i]⊻OddQ[j]} , {If[p, ColorData["HTML", "Crimson"], ColorData["HTML", "DarkBlue"]], Translate[Rotate[tile, (π/3) Boole[p], {0, 0}], {(Sqrt[3] i/2), (3 j/2) + (1/2) Boole[p]}]}], {i, 10}, {j, 4}]}]% /. BezierCurve[a_] :> Line[a]Properties & Relations (1)
By default, each component of a filled curve closes itself by adding a line segment at the end:
a = {{-1, 0}, {0, 1}, {1, 0}};b = {{0, -(2/3)}};Graphics[{EdgeForm[Blue], Pink, FilledCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}}]}]On the contrary, JoinedCurve does not close the component by default:
Graphics[JoinedCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}}]]Use the CurveClosed option to close the components in a curve:
Graphics[JoinedCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}}, CurveClosed -> True]]Possible Issues (1)
VertexColors options specified within segments are ignored:
Graphics[{EdgeForm[Thick], Pink, FilledCurve[Line[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexColors -> {Red, Green, Blue, Yellow}]]}]Neat Examples (2)
Module[{a = FilledCurve[{{Line[{{2, 3}, {0.8125, 0.625}}],
BezierCurve[{{0.6875, 0.375}, {0.375, 0.25}, {1.125, 0.25}}, SplineDegree -> 2], BezierCurve[{{0.8125, 0.375}, {0.9375, 0.625}}],
Line[{{1.3125, 1.375}, {2.4375, 1.375}, {2.8125, 0.625}}],
BezierCurve[{{2.9375, 0.375}, {2.625, 0.25}, {3.625, 0.25}}, SplineDegree -> 2], BezierCurve[{{3.3125, 0.375}, {3.1875, 0.625}}]},
{Line[{{1.875, 2.5}, {1.375, 1.5}, {2.375, 1.5}}]}}]}, Graphics[Table[{EdgeForm[Black], Hue[RandomReal[]], Translate[Rotate[Scale[a, RandomReal[5]], RandomReal[2Pi]], RandomReal[20, {2}]]}, {30}]]]Module[{l = Cases[First[First[ImportString[ExportString[Style["Mathematica", Bold, FontFamily -> "Helvetica", FontSize -> 12], "PDF"], {"PDF", "PageGraphics"}, "TextOutlines" -> True]]], FilledCurve[a__] :> {EdgeForm[Black], Yellow, FilledCurve[a]}, Infinity]}, Animate[Graphics[{l /. {x_Real, y_Real} :> {x, y + 6 Sin[(x/12) + t]}}], {t, 0, 8 π}, AnimationRunning -> False, SaveDefinitions -> True]]See Also
Related Guides
Text
Wolfram Research (2010), FilledCurve, Wolfram Language function, https://reference.wolfram.com/language/ref/FilledCurve.html (updated 2018).
CMS
Wolfram Language. 2010. "FilledCurve." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/FilledCurve.html.
APA
Wolfram Language. (2010). FilledCurve. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FilledCurve.html
BibTeX
@misc{reference.wolfram_2026_filledcurve, author="Wolfram Research", title="{FilledCurve}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/FilledCurve.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_filledcurve, organization={Wolfram Research}, title={FilledCurve}, year={2018}, url={https://reference.wolfram.com/language/ref/FilledCurve.html}, note=[Accessed: 13-June-2026]}