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, visibleBASELINE_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, visiblePropertypublic 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、インタフェースStyleablegetCssMetaData、クラスNodepublic static Shape union(Shape shape1, Shape shape2)
Shapeを返します。
演算は、入力図形が占める幾何学的領域を使用して行われます。 単一のShapeの場合、このような領域には塗りつぶしにより占められた領域(図形にnull以外の塗りつぶしがある場合)およびストロークにより占められた領域(図形にnull以外のストロークがある場合)が含まれます。 したがって、ストロークがnullで塗りつぶしがnullの図形の場合、この領域は空です。 演算によって考慮される入力図形の領域は、塗りつぶしまたはストロークに使用されるペイントのタイプおよび構成には依存しません。 最終的な演算の前に、入力図形の領域はそれぞれの最上位親ノードの親座標空間に変換されます。
結果の図形には、入力図形に含まれるすべての領域が含まれます。
shape1 + shape2 = result
+----------------+ +----------------+ +----------------+
|################| |################| |################|
|############## | | ##############| |################|
|############ | | ############| |################|
|########## | | ##########| |################|
|######## | | ########| |################|
|###### | | ######| |###### ######|
|#### | | ####| |#### ####|
|## | | ##| |## ##|
+----------------+ +----------------+ +----------------+
shape1 - 最初の図形shape2 - 2番目の図形Shapepublic static Shape subtract(Shape shape1, Shape shape2)
Shapeを返します。
演算は、入力図形が占める幾何学的領域を使用して行われます。 単一のShapeの場合、このような領域には塗りつぶしにより占められた領域(図形にnull以外の塗りつぶしがある場合)およびストロークにより占められた領域(図形にnull以外のストロークがある場合)が含まれます。 したがって、ストロークがnullで塗りつぶしがnullの図形の場合、この領域は空です。 演算によって考慮される入力図形の領域は、塗りつぶしまたはストロークに使用されるペイントのタイプおよび構成には依存しません。 最終的な演算の前に、入力図形の領域はそれぞれの最上位親ノードの親座標空間に変換されます。
結果の図形には、最初の図形に含まれ、2番目の図形には含まれない領域のみが含まれます。
shape1 - shape2 = result
+----------------+ +----------------+ +----------------+
|################| |################| | |
|############## | | ##############| |## |
|############ | | ############| |#### |
|########## | | ##########| |###### |
|######## | | ########| |######## |
|###### | | ######| |###### |
|#### | | ####| |#### |
|## | | ##| |## |
+----------------+ +----------------+ +----------------+
shape1 - 最初の図形shape2 - 2番目の図形Shapepublic static Shape intersect(Shape shape1, Shape shape2)
Shapeを返します。
演算は、入力図形が占める幾何学的領域を使用して行われます。 単一のShapeの場合、このような領域には塗りつぶしにより占められた領域(図形にnull以外の塗りつぶしがある場合)およびストロークにより占められた領域(図形にnull以外のストロークがある場合)が含まれます。 したがって、ストロークがnullで塗りつぶしがnullの図形の場合、この領域は空です。 演算によって考慮される入力図形の領域は、塗りつぶしまたはストロークに使用されるペイントのタイプおよび構成には依存しません。 最終的な演算の前に、入力図形の領域はそれぞれの最上位親ノードの親座標空間に変換されます。
結果の図形には、両方の入力図形に含まれる領域のみが含まれます。
shape1 + shape2 = result
+----------------+ +----------------+ +----------------+
|################| |################| |################|
|############## | | ##############| | ############ |
|############ | | ############| | ######## |
|########## | | ##########| | #### |
|######## | | ########| | |
|###### | | ######| | |
|#### | | ####| | |
|## | | ##| | |
+----------------+ +----------------+ +----------------+
shape1 - 最初の図形shape2 - 2番目の図形ShapeCopyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.