public abstract class Shape extends Node
Shape
クラスは、なんらかの形式の幾何学的な形状を表すオブジェクトの共通プロパティの定義を提供します。次のようなプロパティがあります。
Paint
(setFill
を参照)。
Paint
(setStroke
を参照)。
StrokeType
を参照)。
一方、これらの同じ図形にストロークを適用すると、多くの場合、輪郭が不鮮明になります。これは、デフォルトのストローク属性では、デフォルトのストローク幅が1.0座標(多くの場合正確に1デバイス・ピクセルにマップされる)に指定され、かつ、ストロークが図形のボーダーをまたぎ、ボーダーの両側に半分ずつ分割されるように指定されるためです。多くの一般的な図形のボーダーは整数座標上に配置される傾向があり、これらの整数座標は、通常、正確に整数のデバイス位置にマップされるため、ピクセル行や列が、図形のボーダーのいずれかの側で、ボーダーの100%ではなく50%をカバーする結果となります。したがって、一般的に塗りつぶしは鮮明になりますが、ストロークは多くの場合不鮮明になります。
このように輪郭が不鮮明になることを回避する一般的な解決策は2つあり、1つはより多くのピクセルを完全にカバーする幅広のストロークを使用すること(スケール変換が有効でない場合、通常は幅2.0で実現可能)、もう1つはStrokeType.INSIDE
またはStrokeType.OUTSIDE
のストローク・スタイルを指定することによって、デフォルトの1単位ストロークが、図形のボーダーのすぐ内側または外側の、いずれかの行または列のピクセル全体に偏るようにすることです。
Type | プロパティと説明 |
---|---|
ObjectProperty<Paint> |
fill
Paint コンテキストの設定を使用してShape の内部を塗りつぶすパラメータを定義します。 |
BooleanProperty |
smooth
この
Shape にアンチエイリアシング・ヒントを使用するかどうかを定義します。 |
DoubleProperty |
strokeDashOffset
破線パターン内でのオフセットを表すユーザー空間で指定された距離を定義します。
|
ObjectProperty<StrokeLineCap> |
strokeLineCap
使用可能なエンド・キャップ・スタイルを定義する次の値のいずれかを使用するこの
Shape のエンド・キャップ・スタイル: StrokeLineCap.BUTT 、StrokeLineCap.ROUND およびStrokeLineCap.SQUARE 。 |
ObjectProperty<StrokeLineJoin> |
strokeLineJoin
輪郭線セグメントの接合部の装飾を定義します。
|
DoubleProperty |
strokeMiterLimit
StrokeLineJoin.MITER 線結合スタイルに対する制限を定義します。 |
ObjectProperty<Paint> |
stroke
指定された
Paint の設定を使用して、Shape のアウトラインに描画されるストロークのパラメータを定義します。 |
ObjectProperty<StrokeType> |
strokeType
strokeWidthが図形の境界に適用される方向(内側、中央、外側)を定義します。
|
DoubleProperty |
strokeWidth
四角いペンの線の幅を定義します。
|
accessibleHelp、accessibleRoleDescription、accessibleRole、accessibleText、blendMode、boundsInLocal、boundsInParent、cacheHint、cache、clip、cursor、depthTest、disabled、disable、effectiveNodeOrientation、effect、eventDispatcher、focused、focusTraversable、hover、id、inputMethodRequests、layoutBounds、layoutX、layoutY、localToParentTransform、localToSceneTransform、managed、mouseTransparent、nodeOrientation、onContextMenuRequested、onDragDetected、onDragDone、onDragDropped、onDragEntered、onDragExited、onDragOver、onInputMethodTextChanged、onKeyPressed、onKeyReleased、onKeyTyped、onMouseClicked、onMouseDragEntered、onMouseDragExited、onMouseDragged、onMouseDragOver、onMouseDragReleased、onMouseEntered、onMouseExited、onMouseMoved、onMousePressed、onMouseReleased、onRotate、onRotationFinished、onRotationStarted、onScrollFinished、onScroll、onScrollStarted、onSwipeDown、onSwipeLeft、onSwipeRight、onSwipeUp、onTouchMoved、onTouchPressed、onTouchReleased、onTouchStationary、onZoomFinished、onZoom、onZoomStarted、opacity、parent、pickOnBounds、pressed、rotate、rotationAxis、scaleX、scaleY、scaleZ、scene、style、translateX、translateY、translateZ、visible
BASELINE_OFFSET_SAME_AS_HEIGHT
コンストラクタと説明 |
---|
Shape() |
修飾子と型 | メソッドと説明 |
---|---|
ObjectProperty<Paint> |
fillProperty()
Paint コンテキストの設定を使用してShape の内部を塗りつぶすパラメータを定義します。 |
static List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
NodeのCssMetaDataがリフレクションなしでアクセス可能になるように、このメソッドは
Node.getClassCssMetaData() に委任する必要があります。 |
Paint |
getFill()
プロパティfillの値を取得します。
|
Paint |
getStroke()
プロパティstrokeの値を取得します。
|
ObservableList<Double> |
getStrokeDashArray()
破線セグメントの長さを表す配列を定義します。
|
double |
getStrokeDashOffset()
プロパティstrokeDashOffsetの値を取得します。
|
StrokeLineCap |
getStrokeLineCap()
プロパティstrokeLineCapの値を取得します。
|
StrokeLineJoin |
getStrokeLineJoin()
プロパティstrokeLineJoinの値を取得します。
|
double |
getStrokeMiterLimit()
プロパティstrokeMiterLimitの値を取得します。
|
StrokeType |
getStrokeType()
プロパティstrokeTypeの値を取得します。
|
double |
getStrokeWidth()
プロパティstrokeWidthの値を取得します。
|
static Shape |
intersect(Shape shape1, Shape shape2)
指定された入力図形の共通部分として作成された新しい
Shape を返します。 |
boolean |
isSmooth()
プロパティsmoothの値を取得します。
|
void |
setFill(Paint value)
プロパティfillの値を設定します。
|
void |
setSmooth(boolean value)
プロパティsmoothの値を設定します。
|
void |
setStroke(Paint value)
プロパティstrokeの値を設定します。
|
void |
setStrokeDashOffset(double value)
プロパティstrokeDashOffsetの値を設定します。
|
void |
setStrokeLineCap(StrokeLineCap value)
プロパティstrokeLineCapの値を設定します。
|
void |
setStrokeLineJoin(StrokeLineJoin value)
プロパティstrokeLineJoinの値を設定します。
|
void |
setStrokeMiterLimit(double value)
プロパティstrokeMiterLimitの値を設定します。
|
void |
setStrokeType(StrokeType value)
プロパティstrokeTypeの値を設定します。
|
void |
setStrokeWidth(double value)
プロパティstrokeWidthの値を設定します。
|
BooleanProperty |
smoothProperty()
この
Shape にアンチエイリアシング・ヒントを使用するかどうかを定義します。 |
DoubleProperty |
strokeDashOffsetProperty()
破線パターン内でのオフセットを表すユーザー空間で指定された距離を定義します。
|
ObjectProperty<StrokeLineCap> |
strokeLineCapProperty()
使用可能なエンド・キャップ・スタイルを定義する次の値のいずれかを使用するこの
Shape のエンド・キャップ・スタイル: StrokeLineCap.BUTT 、StrokeLineCap.ROUND およびStrokeLineCap.SQUARE 。 |
ObjectProperty<StrokeLineJoin> |
strokeLineJoinProperty()
輪郭線セグメントの接合部の装飾を定義します。
|
DoubleProperty |
strokeMiterLimitProperty()
StrokeLineJoin.MITER 線結合スタイルに対する制限を定義します。 |
ObjectProperty<Paint> |
strokeProperty()
指定された
Paint の設定を使用して、Shape のアウトラインに描画されるストロークのパラメータを定義します。 |
ObjectProperty<StrokeType> |
strokeTypeProperty()
strokeWidthが図形の境界に適用される方向(内側、中央、外側)を定義します。
|
DoubleProperty |
strokeWidthProperty()
四角いペンの線の幅を定義します。
|
static Shape |
subtract(Shape shape1, Shape shape2)
最初の形状から指定された2番目の図形を引いて作成された新しい
Shape を返します。 |
static Shape |
union(Shape shape1, Shape shape2)
指定された入力図形の集合和として作成された新しい
Shape を返します。 |
accessibleHelpProperty、accessibleRoleDescriptionProperty、accessibleRoleProperty、accessibleTextProperty、addEventFilter、addEventHandler、applyCss、autosize、blendModeProperty、boundsInLocalProperty、boundsInParentProperty、buildEventDispatchChain、cacheHintProperty、cacheProperty、clipProperty、computeAreaInScreen、contains、contains、cursorProperty、depthTestProperty、disabledProperty、disableProperty、effectiveNodeOrientationProperty、effectProperty、eventDispatcherProperty、executeAccessibleAction、fireEvent、focusedProperty、focusTraversableProperty、getAccessibleHelp、getAccessibleRole、getAccessibleRoleDescription、getAccessibleText、getBaselineOffset、getBlendMode、getBoundsInLocal、getBoundsInParent、getCacheHint、getClip、getContentBias、getCursor、getDepthTest、getEffect、getEffectiveNodeOrientation、getEventDispatcher、getId、getInputMethodRequests、getLayoutBounds、getLayoutX、getLayoutY、getLocalToParentTransform、getLocalToSceneTransform、getNodeOrientation、getOnContextMenuRequested、getOnDragDetected、getOnDragDone、getOnDragDropped、getOnDragEntered、getOnDragExited、getOnDragOver、getOnInputMethodTextChanged、getOnKeyPressed、getOnKeyReleased、getOnKeyTyped、getOnMouseClicked、getOnMouseDragEntered、getOnMouseDragExited、getOnMouseDragged、getOnMouseDragOver、getOnMouseDragReleased、getOnMouseEntered、getOnMouseExited、getOnMouseMoved、getOnMousePressed、getOnMouseReleased、getOnRotate、getOnRotationFinished、getOnRotationStarted、getOnScroll、getOnScrollFinished、getOnScrollStarted、getOnSwipeDown、getOnSwipeLeft、getOnSwipeRight、getOnSwipeUp、getOnTouchMoved、getOnTouchPressed、getOnTouchReleased、getOnTouchStationary、getOnZoom、getOnZoomFinished、getOnZoomStarted、getOpacity、getParent、getProperties、getPseudoClassStates、getRotate、getRotationAxis、getScaleX、getScaleY、getScaleZ、getScene、getStyle、getStyleableParent、getStyleClass、getTransforms、getTranslateX、getTranslateY、getTranslateZ、getTypeSelector、getUserData、hasProperties、hoverProperty、idProperty、inputMethodRequestsProperty、intersects、intersects、isCache、isDisable、isDisabled、isFocused、isFocusTraversable、isHover、isManaged、isMouseTransparent、isPickOnBounds、isPressed、isResizable、isVisible、layoutBoundsProperty、layoutXProperty、layoutYProperty、localToParent、localToParent、localToParent、localToParent、localToParent、localToParentTransformProperty、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToScene、localToSceneTransformProperty、localToScreen、localToScreen、localToScreen、localToScreen、localToScreen、lookup、lookupAll、managedProperty、maxHeight、maxWidth、minHeight、minWidth、mouseTransparentProperty、nodeOrientationProperty、notifyAccessibleAttributeChanged、onContextMenuRequestedProperty、onDragDetectedProperty、onDragDoneProperty、onDragDroppedProperty、onDragEnteredProperty、onDragExitedProperty、onDragOverProperty、onInputMethodTextChangedProperty、onKeyPressedProperty、onKeyReleasedProperty、onKeyTypedProperty、onMouseClickedProperty、onMouseDragEnteredProperty、onMouseDragExitedProperty、onMouseDraggedProperty、onMouseDragOverProperty、onMouseDragReleasedProperty、onMouseEnteredProperty、onMouseExitedProperty、onMouseMovedProperty、onMousePressedProperty、onMouseReleasedProperty、onRotateProperty、onRotationFinishedProperty、onRotationStartedProperty、onScrollFinishedProperty、onScrollProperty、onScrollStartedProperty、onSwipeDownProperty、onSwipeLeftProperty、onSwipeRightProperty、onSwipeUpProperty、onTouchMovedProperty、onTouchPressedProperty、onTouchReleasedProperty、onTouchStationaryProperty、onZoomFinishedProperty、onZoomProperty、onZoomStartedProperty、opacityProperty、parentProperty、parentToLocal、parentToLocal、parentToLocal、parentToLocal、parentToLocal、pickOnBoundsProperty、prefHeight、prefWidth、pressedProperty、pseudoClassStateChanged、queryAccessibleAttribute、relocate、removeEventFilter、removeEventHandler、requestFocus、resize、resizeRelocate、rotateProperty、rotationAxisProperty、scaleXProperty、scaleYProperty、scaleZProperty、sceneProperty、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、sceneToLocal、screenToLocal、screenToLocal、screenToLocal、setAccessibleHelp、setAccessibleRole、setAccessibleRoleDescription、setAccessibleText、setBlendMode、setCache、setCacheHint、setClip、setCursor、setDepthTest、setDisable、setDisabled、setEffect、setEventDispatcher、setEventHandler、setFocused、setFocusTraversable、setHover、setId、setInputMethodRequests、setLayoutX、setLayoutY、setManaged、setMouseTransparent、setNodeOrientation、setOnContextMenuRequested、setOnDragDetected、setOnDragDone、setOnDragDropped、setOnDragEntered、setOnDragExited、setOnDragOver、setOnInputMethodTextChanged、setOnKeyPressed、setOnKeyReleased、setOnKeyTyped、setOnMouseClicked、setOnMouseDragEntered、setOnMouseDragExited、setOnMouseDragged、setOnMouseDragOver、setOnMouseDragReleased、setOnMouseEntered、setOnMouseExited、setOnMouseMoved、setOnMousePressed、setOnMouseReleased、setOnRotate、setOnRotationFinished、setOnRotationStarted、setOnScroll、setOnScrollFinished、setOnScrollStarted、setOnSwipeDown、setOnSwipeLeft、setOnSwipeRight、setOnSwipeUp、setOnTouchMoved、setOnTouchPressed、setOnTouchReleased、setOnTouchStationary、setOnZoom、setOnZoomFinished、setOnZoomStarted、setOpacity、setPickOnBounds、setPressed、setRotate、setRotationAxis、setScaleX、setScaleY、setScaleZ、setStyle、setTranslateX、setTranslateY、setTranslateZ、setUserData、setVisible、snapshot、snapshot、startDragAndDrop、startFullDrag、styleProperty、toBack、toFront、toString、translateXProperty、translateYProperty、translateZProperty、usesMirroring、visibleProperty
public final ObjectProperty<StrokeType> strokeTypeProperty
この図は、ストロークなしの図形と、太いストロークが、内側、中央および外側に適用された図形を示しています。
getStrokeType()
、setStrokeType(StrokeType)
public final DoubleProperty strokeWidthProperty
getStrokeWidth()
、setStrokeWidth(double)
public final ObjectProperty<StrokeLineJoin> strokeLineJoinProperty
StrokeLineJoin.MITER
、StrokeLineJoin.BEVEL
およびStrokeLineJoin.ROUND
のいずれかである必要があります。この図は、この順序で値を使用した図形を示しています。
getStrokeLineJoin()
、setStrokeLineJoin(StrokeLineJoin)
public final ObjectProperty<StrokeLineCap> strokeLineCapProperty
Shape
のエンド・キャップ・スタイル: StrokeLineCap.BUTT
、StrokeLineCap.ROUND
およびStrokeLineCap.SQUARE
。この図は、この順序で値を使用した線を示しています。
getStrokeLineCap()
、setStrokeLineCap(StrokeLineCap)
public final DoubleProperty strokeMiterLimitProperty
StrokeLineJoin.MITER
線結合スタイルに対する制限を定義します。1.0未満の値は1.0として扱われます。
図は、その動作を示しています。接合の長さ(A
)は、接合部の最も内側の点から最も外側の点までの距離として計算され、ストロークの幅が単位として使用されます。接合の長さが指定された接合制限値より大きい場合、接合は図形の端(B
)で切り取られます。この図の状況では、4.65
未満の制限値に従い、B
で接合が切り取られることを意味します。
getStrokeMiterLimit()
、setStrokeMiterLimit(double)
public final DoubleProperty strokeDashOffsetProperty
この図は、破線配列[25, 20, 5, 20]
のストローク、および同じパターンでオフセットが45
であるストロークを示し、ここでは、最初の破線セグメントと後続スペースの長さだけパターンがシフトされています。
getStrokeDashOffset()
、setStrokeDashOffset(double)
public final ObjectProperty<Paint> fillProperty
Paint
コンテキストの設定を使用してShape
の内部を塗りつぶすパラメータを定義します。すべての図形のデフォルト値はColor.BLACK
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はnull
です。getFill()
、setFill(Paint)
public final ObjectProperty<Paint> strokeProperty
Paint
の設定を使用して、Shape
のアウトラインに描画されるストロークのパラメータを定義します。すべての図形のデフォルト値はnull
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はColor.BLACK
です。getStroke()
、setStroke(Paint)
public final BooleanProperty smoothProperty
Shape
にアンチエイリアシング・ヒントを使用するかどうかを定義します。値がtrueの場合、レンダリング・ヒントが適用されます。isSmooth()
、setSmooth(boolean)
public final void setStrokeType(StrokeType value)
この図は、ストロークなしの図形と、太いストロークが、内側、中央および外側に適用された図形を示しています。
public final StrokeType getStrokeType()
この図は、ストロークなしの図形と、太いストロークが、内側、中央および外側に適用された図形を示しています。
public final ObjectProperty<StrokeType> strokeTypeProperty()
この図は、ストロークなしの図形と、太いストロークが、内側、中央および外側に適用された図形を示しています。
getStrokeType()
、setStrokeType(StrokeType)
public final void setStrokeWidth(double value)
public final double getStrokeWidth()
public final DoubleProperty strokeWidthProperty()
getStrokeWidth()
、setStrokeWidth(double)
public final void setStrokeLineJoin(StrokeLineJoin value)
StrokeLineJoin.MITER
、StrokeLineJoin.BEVEL
およびStrokeLineJoin.ROUND
のいずれかである必要があります。この図は、この順序で値を使用した図形を示しています。
public final StrokeLineJoin getStrokeLineJoin()
StrokeLineJoin.MITER
、StrokeLineJoin.BEVEL
およびStrokeLineJoin.ROUND
のいずれかである必要があります。この図は、この順序で値を使用した図形を示しています。
public final ObjectProperty<StrokeLineJoin> strokeLineJoinProperty()
StrokeLineJoin.MITER
、StrokeLineJoin.BEVEL
およびStrokeLineJoin.ROUND
のいずれかである必要があります。この図は、この順序で値を使用した図形を示しています。
getStrokeLineJoin()
、setStrokeLineJoin(StrokeLineJoin)
public final void setStrokeLineCap(StrokeLineCap value)
Shape
のエンド・キャップ・スタイル: StrokeLineCap.BUTT
、StrokeLineCap.ROUND
およびStrokeLineCap.SQUARE
。この図は、この順序で値を使用した線を示しています。
public final StrokeLineCap getStrokeLineCap()
Shape
のエンド・キャップ・スタイル: StrokeLineCap.BUTT
、StrokeLineCap.ROUND
およびStrokeLineCap.SQUARE
。この図は、この順序で値を使用した線を示しています。
public final ObjectProperty<StrokeLineCap> strokeLineCapProperty()
Shape
のエンド・キャップ・スタイル: StrokeLineCap.BUTT
、StrokeLineCap.ROUND
およびStrokeLineCap.SQUARE
。この図は、この順序で値を使用した線を示しています。
getStrokeLineCap()
、setStrokeLineCap(StrokeLineCap)
public final void setStrokeMiterLimit(double value)
StrokeLineJoin.MITER
線結合スタイルに対する制限を定義します。1.0未満の値は1.0として扱われます。
図は、その動作を示しています。接合の長さ(A
)は、接合部の最も内側の点から最も外側の点までの距離として計算され、ストロークの幅が単位として使用されます。接合の長さが指定された接合制限値より大きい場合、接合は図形の端(B
)で切り取られます。この図の状況では、4.65
未満の制限値に従い、B
で接合が切り取られることを意味します。
public final double getStrokeMiterLimit()
StrokeLineJoin.MITER
線結合スタイルに対する制限を定義します。1.0未満の値は1.0として扱われます。
図は、その動作を示しています。接合の長さ(A
)は、接合部の最も内側の点から最も外側の点までの距離として計算され、ストロークの幅が単位として使用されます。接合の長さが指定された接合制限値より大きい場合、接合は図形の端(B
)で切り取られます。この図の状況では、4.65
未満の制限値に従い、B
で接合が切り取られることを意味します。
public final DoubleProperty strokeMiterLimitProperty()
StrokeLineJoin.MITER
線結合スタイルに対する制限を定義します。1.0未満の値は1.0として扱われます。
図は、その動作を示しています。接合の長さ(A
)は、接合部の最も内側の点から最も外側の点までの距離として計算され、ストロークの幅が単位として使用されます。接合の長さが指定された接合制限値より大きい場合、接合は図形の端(B
)で切り取られます。この図の状況では、4.65
未満の制限値に従い、B
で接合が切り取られることを意味します。
getStrokeMiterLimit()
、setStrokeMiterLimit(double)
public final void setStrokeDashOffset(double value)
この図は、破線配列[25, 20, 5, 20]
のストローク、および同じパターンでオフセットが45
であるストロークを示し、ここでは、最初の破線セグメントと後続スペースの長さだけパターンがシフトされています。
public final double getStrokeDashOffset()
この図は、破線配列[25, 20, 5, 20]
のストローク、および同じパターンでオフセットが45
であるストロークを示し、ここでは、最初の破線セグメントと後続スペースの長さだけパターンがシフトされています。
public final DoubleProperty strokeDashOffsetProperty()
この図は、破線配列[25, 20, 5, 20]
のストローク、および同じパターンでオフセットが45
であるストロークを示し、ここでは、最初の破線セグメントと後続スペースの長さだけパターンがシフトされています。
getStrokeDashOffset()
、setStrokeDashOffset(double)
public final ObservableList<Double> getStrokeDashArray()
Shape
の輪郭に沿ってペンが移動するにつれて、ペンが移動するユーザー空間の距離が累積されます。距離の値は、破線配列のインデックスに使用されます。現在の累積距離が破線配列の偶数番目(0
からカウント)の要素にマッピングされる場合、ペンは不透明になり、奇数番目の要素にマッピングされる場合は透明になります。
空のstrokeDashArrayはスペースがない実線を示します。奇数長のstrokeDashArrayは、示された奇数長配列を暗黙的に2回連続して繰り返すことによって構成された偶数長配列と同じように動作します([20, 5, 15]
は、[20, 5, 15, 20, 5, 15]
であるかのように動作します)。
各破線セグメントは、現在のストローク線の終端処理で指定されている装飾で終端処理されます。
この図は、ストローク破線配列[25, 20, 5, 20]
の、3つの異なるストローク線終端処理StrokeLineCap.BUTT
、StrokeLineCap.SQUARE
(デフォルト)およびStrokeLineCap.ROUND
の図形を示しています。
public final void setFill(Paint value)
Paint
コンテキストの設定を使用してShape
の内部を塗りつぶすパラメータを定義します。すべての図形のデフォルト値はColor.BLACK
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はnull
です。public final Paint getFill()
Paint
コンテキストの設定を使用してShape
の内部を塗りつぶすパラメータを定義します。すべての図形のデフォルト値はColor.BLACK
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はnull
です。public final ObjectProperty<Paint> fillProperty()
Paint
コンテキストの設定を使用してShape
の内部を塗りつぶすパラメータを定義します。すべての図形のデフォルト値はColor.BLACK
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はnull
です。getFill()
、setFill(Paint)
public final void setStroke(Paint value)
Paint
の設定を使用して、Shape
のアウトラインに描画されるストロークのパラメータを定義します。すべての図形のデフォルト値はnull
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はColor.BLACK
です。public final Paint getStroke()
Paint
の設定を使用して、Shape
のアウトラインに描画されるストロークのパラメータを定義します。すべての図形のデフォルト値はnull
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はColor.BLACK
です。public final ObjectProperty<Paint> strokeProperty()
Paint
の設定を使用して、Shape
のアウトラインに描画されるストロークのパラメータを定義します。すべての図形のデフォルト値はnull
ですが、Line、PolylineおよびPathは除きます。これらの図形のデフォルト値はColor.BLACK
です。getStroke()
、setStroke(Paint)
public final void setSmooth(boolean value)
Shape
にアンチエイリアシング・ヒントを使用するかどうかを定義します。値がtrueの場合、レンダリング・ヒントが適用されます。public final boolean isSmooth()
Shape
にアンチエイリアシング・ヒントを使用するかどうかを定義します。値がtrueの場合、レンダリング・ヒントが適用されます。public final BooleanProperty smoothProperty()
Shape
にアンチエイリアシング・ヒントを使用するかどうかを定義します。値がtrueの場合、レンダリング・ヒントが適用されます。isSmooth()
、setSmooth(boolean)
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
に委任する必要があります。getCssMetaData
、インタフェース: Styleable
getCssMetaData
、クラス: Node
public static Shape union(Shape shape1, Shape shape2)
Shape
を返します。
演算は、入力図形が占める幾何学的領域を使用して行われます。単一のShape
の場合、このような領域には塗りつぶしにより占められた領域(図形にnull以外の塗りつぶしがある場合)およびストロークにより占められた領域(図形にnull以外のストロークがある場合)が含まれます。したがって、ストロークがnull
で塗りつぶしがnull
の図形の場合、この領域は空です。演算によって考慮される入力図形の領域は、塗りつぶしまたはストロークに使用されるペイントのタイプおよび構成には依存しません。最終的な演算の前に、入力図形の領域はそれぞれの最上位親ノードの親座標空間に変換されます。
結果の図形には、入力図形に含まれるすべての領域が含まれます。
shape1 + shape2 = result +----------------+ +----------------+ +----------------+ |################| |################| |################| |############## | | ##############| |################| |############ | | ############| |################| |########## | | ##########| |################| |######## | | ########| |################| |###### | | ######| |###### ######| |#### | | ####| |#### ####| |## | | ##| |## ##| +----------------+ +----------------+ +----------------+
shape1
- 最初の図形shape2
- 2番目の図形Shape
public static Shape subtract(Shape shape1, Shape shape2)
Shape
を返します。
演算は、入力図形が占める幾何学的領域を使用して行われます。単一のShape
の場合、このような領域には塗りつぶしにより占められた領域(図形にnull以外の塗りつぶしがある場合)およびストロークにより占められた領域(図形にnull以外のストロークがある場合)が含まれます。したがって、ストロークがnull
で塗りつぶしがnull
の図形の場合、この領域は空です。演算によって考慮される入力図形の領域は、塗りつぶしまたはストロークに使用されるペイントのタイプおよび構成には依存しません。最終的な演算の前に、入力図形の領域はそれぞれの最上位親ノードの親座標空間に変換されます。
結果の図形には、最初の図形に含まれ、2番目の図形には含まれない領域のみが含まれます。
shape1 - shape2 = result +----------------+ +----------------+ +----------------+ |################| |################| | | |############## | | ##############| |## | |############ | | ############| |#### | |########## | | ##########| |###### | |######## | | ########| |######## | |###### | | ######| |###### | |#### | | ####| |#### | |## | | ##| |## | +----------------+ +----------------+ +----------------+
shape1
- 最初の図形shape2
- 2番目の図形Shape
public static Shape intersect(Shape shape1, Shape shape2)
Shape
を返します。
演算は、入力図形が占める幾何学的領域を使用して行われます。単一のShape
の場合、このような領域には塗りつぶしにより占められた領域(図形にnull以外の塗りつぶしがある場合)およびストロークにより占められた領域(図形にnull以外のストロークがある場合)が含まれます。したがって、ストロークがnull
で塗りつぶしがnull
の図形の場合、この領域は空です。演算によって考慮される入力図形の領域は、塗りつぶしまたはストロークに使用されるペイントのタイプおよび構成には依存しません。最終的な演算の前に、入力図形の領域はそれぞれの最上位親ノードの親座標空間に変換されます。
結果の図形には、両方の入力図形に含まれる領域のみが含まれます。
shape1 + shape2 = result +----------------+ +----------------+ +----------------+ |################| |################| |################| |############## | | ##############| | ############ | |############ | | ############| | ######## | |########## | | ##########| | #### | |######## | | ########| | | |###### | | ######| | | |#### | | ####| | | |## | | ##| | | +----------------+ +----------------+ +----------------+
shape1
- 最初の図形shape2
- 2番目の図形Shape
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.