
- JavaFX Tutorial
- JavaFX - Home
- JavaFX - Overview
- JavaFX - Environment
- JavaFX - Architecture
- JavaFX - Application
- JavaFX - 2D Shapes
- JavaFX - Text
- JavaFX - Effects
- JavaFX - Transformations
- JavaFX - Animations
- JavaFX - Colors
- JavaFX - Images
- JavaFX - 3D Shapes
- JavaFX - Event Handling
- JavaFX - UI Controls
- JavaFX - Charts
- JavaFX - Layout Panes
- JavaFX - CSS
- JavaFX Useful Resources
- JavaFX - Quick Guide
- JavaFX - Useful Resources
- JavaFX - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
2D Shapes(Objects) Properties - Stroke Type
This property is of the type StrokeType. It represents the position of the boundary line applied to the shape. You can set the type of the stroke using the method setStrokeType() as follows −
Path.setStrokeType(StrokeType.CENTERED);
The stroke type of a shape can be −
Inside − The boundary line will be drawn inside the edge (outline) of the shape (StrokeType.INSIDE).
Outside − The boundary line will be drawn outside the edge (outline) of the shape (StrokeType.OUTSIDE).
Centered − The boundary line will be drawn in such a way that the edge (outline) of the shape passes exactly thorough the center of the line (StrokeType.CENTERED).
By default, the stroke type of a shape is centered. Following is the diagram of a triangle with different Stroke Types −

javafx_2d_shapes.htm
Advertisements