@@ -312,17 +312,6 @@ ColorGradient Graphics::getStrokeColorGradient() const
312312 return currentRenderOptions ().strokeGradient ;
313313}
314314
315- // ==============================================================================
316- void Graphics::setStrokeWidth (float strokeWidth)
317- {
318- currentRenderOptions ().strokeWidth = jmax (0 .0f , strokeWidth);
319- }
320-
321- float Graphics::getStrokeWidth () const
322- {
323- return currentRenderOptions ().strokeWidth ;
324- }
325-
326315// ==============================================================================
327316void Graphics::setFeather (float feather)
328317{
@@ -346,6 +335,33 @@ float Graphics::getOpacity() const
346335}
347336
348337// ==============================================================================
338+ void Graphics::setStrokeType (StrokeType strokeType)
339+ {
340+ auto & options = currentRenderOptions ();
341+
342+ options.strokeWidth = strokeType.getWidth ();
343+ options.join = strokeType.getJoin ();
344+ options.cap = strokeType.getCap ();
345+ }
346+
347+ StrokeType Graphics::getStrokeType () const
348+ {
349+ auto & options = currentRenderOptions ();
350+
351+ return StrokeType (options.strokeWidth , options.join , options.cap );
352+ }
353+
354+ void Graphics::setStrokeWidth (float strokeWidth)
355+ {
356+ currentRenderOptions ().strokeWidth = jmax (0 .0f , strokeWidth);
357+ }
358+
359+ float Graphics::getStrokeWidth () const
360+ {
361+ return currentRenderOptions ().strokeWidth ;
362+ }
363+
364+
349365void Graphics::setStrokeJoin (StrokeJoin join)
350366{
351367 currentRenderOptions ().join = join;
@@ -356,7 +372,6 @@ StrokeJoin Graphics::getStrokeJoin() const
356372 return currentRenderOptions ().join ;
357373}
358374
359- // ==============================================================================
360375void Graphics::setStrokeCap (StrokeCap cap)
361376{
362377 currentRenderOptions ().cap = cap;
0 commit comments