OriginElastic (クラス)
public abstract sealed OriginElastic {inherits Elastic}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.UTIL.ELASTIC.

2 つの端点間の距離の設定、ならびにこれら 2 つの端点間の起点の位置の設定を表す Elastic の抽象サブクラス。

説明

OriginElastic は、起点となるエラスティックのさまざまな具象表現の基本クラスとして使用されます。

OriginElastic を直接作成するには、make-origin-elastic プロシージャを使用します。ただし、多くの場合は Elastic を明示的に作成する必要はありません。代わりに、必要な OriginElastic の値に対応する Dimension を指定すると、それが変換されます。変換規則については、「次元から OriginElastics への変換」を参照してください。

注意事項

OriginElastic からは、次の 3 つの異なるサイズ設定に関する情報を抽出することができます。



OriginElastic 操作の 1 つにより生成される OriginElastic には通常、first サイズと last サイズの合計 (Elastic.add により計算) がその全体サイズであるプロパティがあります。

Elastic の場合、OriginElastic メソッドのほとんどはオプションの dest パラメータを受け取り、これで結果の保存先の場所を指定します。この機能およびサポートされているプログラミング用語の詳細については、Elastic の説明を参照してください。

プロパティ
first:OriginElastic の最初のコンポーネントを取得します。
アクセサ public OriginElastic.first:Elastic
last:OriginElastic の最後のコンポーネントを取得します。
アクセサ public OriginElastic.last:Elastic
origin-elastic?:ElasticOriginElastic でもあるかどうかを判別します。
アクセサ public OriginElastic.origin-elastic?:bool
プロパティ 継承 Elastic: mutable?, preferred-size

メソッド
add-both:OriginElastic の最初と最後のコンポーネントの両方に Dimension を追加します。
public {OriginElastic.add-both
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
add-components:2 つの OriginElastic のコンポーネント上の合計を計算します。
public {OriginElastic.add-components}:OriginElastic
add-first:DimensionOriginElastic の最初のコンポーネントに追加します。
public {OriginElastic.add-first
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
add-last:DimensionOriginElastic の最後のコンポーネントに追加します。
public {OriginElastic.add-last
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
clear:OriginElastic をクリアして、first、last、および全体のサイズが、それぞれ "伸長不可能" な zero-length 値になるようにします。
public {OriginElastic.clear}:Elastic
component-to-elastic:
protected {OriginElastic.component-to-elastic
component:#Elastic
}:Elastic
copy-unless-null:
protected {OriginElastic.copy-unless-null
e:#Elastic,
dest:#Elastic = null
}:#Elastic
distribute-stretch-to-components:
protected {OriginElastic.distribute-stretch-to-components
acoeff:double,
aorder:int,
bcoeff:double,
border:int,
tcoeff:double,
torder:int
}:(acoeff:double, aorder:int, bcoeff:double, border:int)
distribute-stretch-to-first:
protected {OriginElastic.distribute-stretch-to-first
acoeff:double,
aorder:int,
bcoeff:double,
border:int,
tcoeff:double,
torder:int
}:(acoeff:double, aorder:int, bcoeff:double, border:int)
distribute-total-internal:
protected {OriginElastic.distribute-total-internal
first:#Elastic,
last:#Elastic,
tmin:Distance,
tpref:Distance,
tcompress:double,
torderc:int,
tstretch:double,
torders:int
}:(first:Elastic, last:Elastic)
distribute-total-to-components:OriginElastic (self に等しいとは限らない) のコンポーネント エラスティックを調整し、相互の比率を維持しながら、それらの合計が指定された合計に等しくなるようにします。
protected {OriginElastic.distribute-total-to-components
first:#Elastic,
last:#Elastic,
total:#Elastic
}:(first:#Elastic, last:#Elastic, total:#Elastic)
equal-at-dual-size?:2 つの OriginElastic を比較し、これらが指定したサイズで同じ力を出しているかどうかを確認します。
public {OriginElastic.equal-at-dual-size?
g:Dimension,
before:Distance,
after:Distance
}:bool
equal-at-single-size?-components:
protected {OriginElastic.equal-at-single-size?-components}:bool
equal?:2 つの OriginElastic が、同等であるかどうかを比較します。
public {OriginElastic.equal? g:Dimension}:bool
equal?-components:
protected {OriginElastic.equal?-components a:#Elastic, b:#Elastic}:bool
max:OriginElastic の max 演算を実行します。
public {OriginElastic.max g:Dimension, dest:#Elastic = null}:Elastic
max-components:
protected {OriginElastic.max-components
a:#Elastic,
b:#Elastic,
dest:#Elastic
}:#Elastic
max-first:Dimension および OriginElastic の最初のコンポーネントで Elastic.max 演算を実行します。
public {OriginElastic.max-first
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
max-last:Dimension および OriginElastic の最後のコンポーネントで Elastic.max 演算を実行します。
public {OriginElastic.max-last
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
max-totals:
protected {OriginElastic.max-totals}:Elastic
maybe-realign-origin:OriginElastic.realign-origin 演算を条件付きで実行します。
public {OriginElastic.maybe-realign-origin
realign?:bool,
align:double,
dest:#OriginElastic = null
}:OriginElastic
new-stretchy-elastic:
protected {OriginElastic.new-stretchy-elastic
min-size:Distance,
pref-size:Distance,
compressibility:double,
compress-order:int,
stretchiness:double,
stretch-order:int,
dest:#Elastic
}:Elastic
new-triple-elastic:
protected {OriginElastic.new-triple-elastic
first:#Elastic,
last:#Elastic,
total:#Elastic
}:OriginElastic
pack-triple-elastic-into-dest:
protected {OriginElastic.pack-triple-elastic-into-dest
first:#Elastic,
last:#Elastic,
total:#Elastic,
dest:#OriginElastic
}:OriginElastic
pack-triple-elastic-into-self:
protected abstract {OriginElastic.pack-triple-elastic-into-self
first:#Elastic,
last:#Elastic,
total:#Elastic
}:bool
place-origin:エラスティックの全体サイズに制約が与えられた場合、OriginElastic の起点の位置を計算します。
public {OriginElastic.place-origin total:Distance}:Distance
preferred-ratio:
protected {OriginElastic.preferred-ratio}:double
realign-origin:OriginElastic の最初と最後のコンポーネントを再計算し、指定されたスケール比率に基づいて、エラスティックの全体サイズのスケールを変更したコピーになるようにします。
public {OriginElastic.realign-origin
align:double,
dest:#OriginElastic = null
}:OriginElastic
realign-using-components:
protected {OriginElastic.realign-using-components
align:double,
first:#Elastic,
last:#Elastic,
total:#Elastic,
in-place?:bool = false
}:(first:#Elastic, last:#Elastic, total:#Elastic)
rigid-add-both:OriginElastic の最初および最後のコンポーネントの両方に対して、固定の長さを加算または減算します。
public {OriginElastic.rigid-add-both
g:Distance,
dest:#OriginElastic = null
}:OriginElastic
rigid-add-first:OriginElastic の最初のコンポーネントに対して、固定した長さを加算または減算します。
public {OriginElastic.rigid-add-first
g:Distance,
dest:#OriginElastic = null
}:OriginElastic
rigid-add-last:OriginElastic の最後のコンポーネントに対して、固定した長さを加算または減算します。
public {OriginElastic.rigid-add-last
g:Distance,
dest:#OriginElastic = null
}:OriginElastic
set:DimensionOriginElastic にコピーします。
public {OriginElastic.set g:Dimension}:OriginElastic
set-both:OriginElastic の最初と最後のコンポーネントを、Dimension で指定された値に設定します。
public {OriginElastic.set-both
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
set-first:OriginElastic の最初のコンポ-ネントを、Dimension で指定された値に設定します。
public {OriginElastic.set-first
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
set-last:OriginElastic の最後のコンポーネントを、Dimension により指定される値に設定します。
public {OriginElastic.set-last
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic
set-total:OriginElastic の全体サイズを、Dimension で指定された値に設定します。
public {OriginElastic.set-total g:Dimension}:OriginElastic
unpack-as-triple-elastic:
protected abstract {OriginElastic.unpack-as-triple-elastic
}:(first:#Elastic, last:#Elastic, total:#Elastic)
unpack-dimension-as-triple-elastic:
protected {OriginElastic.unpack-dimension-as-triple-elastic}:(first:#Elastic, last:#Elastic, total:#Elastic)
unpack-triple-with-dest:
protected {OriginElastic.unpack-triple-with-dest}:(first:#Elastic, last:#Elastic, total:#Elastic, fdest:#Elastic, ldest:#Elastic, tdest:#Elastic)
メソッド 継承 Elastic: add, add-stretchy-elastic-components, compressed-size, copy, divide, equal-at-single-size?, equal?-as-single-elastic, max-as-single-elastic, max-stretchy-elastic-components, pack-stretchy-elastic-into-dest, pack-stretchy-elastic-into-self, rigid-add, scale, set-as-single-elastic, set-elastic-parameters, set-preferred-size, unpack-as-stretchy-elastic, unpack-dimension-as-stretchy-elastic
メソッド 継承 InitRestArgParser: keyword-init-arg, non-keyword-init-arg, process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize




プロパティ詳細
first (アクセサ)
アクセサ public OriginElastic.first:Elastic

OriginElastic の最初のコンポーネントを取得します。

戻り値

Elastic としての最初のコンポーネント。


last (アクセサ)
アクセサ public OriginElastic.last:Elastic

OriginElastic の最後のコンポーネントを取得します。

戻り値

Elastic としての最後のコンポーネント。


origin-elastic? (アクセサ)
アクセサ public OriginElastic.origin-elastic?:bool

ElasticOriginElastic でもあるかどうかを判別します。

戻り値

selfOriginElastic である場合は true。





メソッド詳細
add-both (メソッド)
public {OriginElastic.add-both
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最初と最後のコンポーネントの両方に Dimension を追加します。

g: Dimension
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初のコンポーネントが、self の最初のコンポーネントと g の合計により置き換えられ、最後のコンポーネントが self の最後のコンポーネントと g の合計により置き換えられているエラスティック。結果の全体サイズは、最初と最後のコンポーネントの Elastic の合計となります。

注意事項

{e.add-both g} により返される結果は、{{e.add-first g}.add-last g} が返す結果と同じですが、add-both 呼び出しの方が簡単に記述でき、dest パラメータの使用により不必要なオブジェクトの割り当てを回避することができます。


add-components (メソッド)
public {OriginElastic.add-components}:OriginElastic

2 つの OriginElastic のコンポーネント上の合計を計算します。

g: 演算の 2 番目の OriginElastic オペランド。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初のコンポーネントが selfg の最初のコンポーネントの合計により置き換えられ、最後のコンポーネントが selfg の最後のコンポーネントにより置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.add-components g} により返される結果は、{{e.add-first g.first}.add-last g.last} が返す結果と同じですが、add-both 呼び出しの方が簡単に記述でき、dest パラメータの使用により不必要なオブジェクトの割り当てを回避することができます。


add-first (メソッド)
public {OriginElastic.add-first
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

DimensionOriginElastic の最初のコンポーネントに追加します。

g: Dimension
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最後のコンポーネントが self の最後のコンポーネントと同じで、最初のコンポーネントが self の最初のコンポーネントと g の合計により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.add-first g} により返される結果は、{e.set-first {e.first.add g}} が返す結果と同じですが、add-first 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


add-last (メソッド)
public {OriginElastic.add-last
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

DimensionOriginElastic の最後のコンポーネントに追加します。

g: Dimension
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初のコンポーネントが self の最初のコンポーネントと同じで、最後のコンポーネントが self の最後のコンポーネントと g の合計により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.add-last g} により返される結果は、{e.set-last {e.last.add g}} により返される結果と同じですが、add-last 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


clear (メソッド)
public {OriginElastic.clear}:Elastic

OriginElastic をクリアして、first、last、および全体のサイズが、それぞれ "伸長不可能" な zero-length 値になるようにします。

戻り値

結果のエラスティック値。これは、self の具象タイプがこの値を保存できる場合にのみ self と保存先を共有します。

注意事項

次のメソッドの呼び出しは、

{e.clear}

次と同義です。

{e.set unstretchable-zero-length-origin-elastic}


component-to-elastic (メソッド)
protected {OriginElastic.component-to-elastic
component:#Elastic
}:Elastic
この項目はサポートされていません。内部使用限定となっています。


copy-unless-null (メソッド)
protected {OriginElastic.copy-unless-null
e:#Elastic,
dest:#Elastic = null
}:#Elastic
この項目はサポートされていません。内部使用限定となっています。


distribute-stretch-to-components (メソッド)
protected {OriginElastic.distribute-stretch-to-components
acoeff:double,
aorder:int,
bcoeff:double,
border:int,
tcoeff:double,
torder:int
}:(acoeff:double, aorder:int, bcoeff:double, border:int)
この項目はサポートされていません。内部使用限定となっています。


distribute-stretch-to-first (メソッド)
protected {OriginElastic.distribute-stretch-to-first
acoeff:double,
aorder:int,
bcoeff:double,
border:int,
tcoeff:double,
torder:int
}:(acoeff:double, aorder:int, bcoeff:double, border:int)
この項目はサポートされていません。内部使用限定となっています。


distribute-total-internal (メソッド)
protected {OriginElastic.distribute-total-internal
first:#Elastic,
last:#Elastic,
tmin:Distance,
tpref:Distance,
tcompress:double,
torderc:int,
tstretch:double,
torders:int
}:(first:Elastic, last:Elastic)
この項目はサポートされていません。内部使用限定となっています。


distribute-total-to-components (メソッド)
protected {OriginElastic.distribute-total-to-components
first:#Elastic,
last:#Elastic,
total:#Elastic
}:(first:#Elastic, last:#Elastic, total:#Elastic)

OriginElastic (self に等しいとは限らない) のコンポーネント エラスティックを調整し、相互の比率を維持しながら、それらの合計が指定された合計に等しくなるようにします。

first, last: OriginElastic の最初と最後のコンポーネントです。
total: 最初と最後のコンポーネントの合計です。

戻り値

結果の OriginElastic の最初、最後、合計のコンポーネントです。これは、可能な場合は firstlasttotal に割り当てられたストレージを再使用することにより作成されます。


equal-at-dual-size? (メソッド)
public {OriginElastic.equal-at-dual-size?
g:Dimension,
before:Distance,
after:Distance
}:bool

2 つの OriginElastic を比較し、これらが指定したサイズで同じ力を出しているかどうかを確認します。

g: 比較演算の 2 番目のオペランド。
before: この比較のために必要な、最初の端点と起点の間の距離。
after: この比較のために必要な、起点と最後の端点間の距離。

戻り値

2 つのオペランドが beforeafter で指定されたサイズで同じ力を出す場合にのみ true。

プログラミング注意事項

このメソッドをレイアウト ネゴシエーションの際に使用して、オブジェクトに対して新しく計算されたエラスティックを以前に計算されたエラスティックと比較し、新しく計算されたエラスティックが、オブジェクトに対して異なるサイズを割り当てているかどうかを確認します。この概念に関する詳細は、Elastic.equal-at-single-size? の使用上の注意を参照してください。


equal-at-single-size?-components (メソッド)
protected {OriginElastic.equal-at-single-size?-components}:bool
この項目はサポートされていません。内部使用限定となっています。


equal? (メソッド)
public {OriginElastic.equal? g:Dimension}:bool

2 つの OriginElastic が、同等であるかどうかを比較します。

g: self と比較されるオペランド。

戻り値

2 つのオペランドが同等の OriginElastic である場合、つまり、最初、最後、全体のコンポーネントが Elastic.equal? の観点からすべて同等である場合にのみ true。


equal?-components (メソッド)
protected {OriginElastic.equal?-components a:#Elastic, b:#Elastic}:bool
この項目はサポートされていません。内部使用限定となっています。


max (メソッド)
public {OriginElastic.max g:Dimension, dest:#Elastic = null}:Elastic

OriginElastic の max 演算を実行します。

g: self と組み合わせるオペランド。g がまだ OriginElastic でない場合は、OriginElastic.set で使用されるメカニズムを使用して変換されます。
dest: dest の具象タイプが結果に適合する場合に、結果の格納先となる OriginElastic です。dest が指定されていない場合、または null の場合、新しく割り当てられたエラスティックが返されます。

戻り値

max 演算の結果。

注意事項

この演算は、オペランド エラスティックの最初、最後、全体のコンポーネントの最大値を算出します。


max-components (メソッド)
protected {OriginElastic.max-components
a:#Elastic,
b:#Elastic,
dest:#Elastic
}:#Elastic
この項目はサポートされていません。内部使用限定となっています。


max-first (メソッド)
public {OriginElastic.max-first
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

Dimension および OriginElastic の最初のコンポーネントで Elastic.max 演算を実行します。

g: Dimension
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最後のコンポーネントが self の最後のコンポーネントと同じで、最初のコンポーネントが self の最初のコンポーネントと g の最大値により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.max-first g} により返される結果は、{e.set-first {e.first.max g}} により返される結果と同じですが、max-first 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


max-last (メソッド)
public {OriginElastic.max-last
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

Dimension および OriginElastic の最後のコンポーネントで Elastic.max 演算を実行します。

g: Dimension
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初のコンポーネントが self の最初のコンポーネントと同じで、最後のコンポーネントが self の最後のコンポーネントと g の最大値により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.max-last g} により返される結果は、{e.set-last {e.last.max g}} により返される結果と同じですが、max-last 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


max-totals (メソッド)
protected {OriginElastic.max-totals}:Elastic
この項目はサポートされていません。内部使用限定となっています。


maybe-realign-origin (メソッド)
public {OriginElastic.maybe-realign-origin
realign?:bool,
align:double,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic.realign-origin 演算を条件付きで実行します。

realign?: 再配置を実行するかどうかを制御する bool
align: 比率の指定。0 から 1 (それぞれを含む) の範囲で指定します。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

演算の結果。realign? が false の場合は self と同じになり、それ以外の場合は、selfOriginElastic.realign-origin 演算を実行して得られた結果と同じになります。


new-stretchy-elastic (メソッド)
protected {OriginElastic.new-stretchy-elastic
min-size:Distance,
pref-size:Distance,
compressibility:double,
compress-order:int,
stretchiness:double,
stretch-order:int,
dest:#Elastic
}:Elastic
この項目はサポートされていません。内部使用限定となっています。


new-triple-elastic (メソッド)
protected {OriginElastic.new-triple-elastic
first:#Elastic,
last:#Elastic,
total:#Elastic
}:OriginElastic
この項目はサポートされていません。内部使用限定となっています。


pack-triple-elastic-into-dest (メソッド)
protected {OriginElastic.pack-triple-elastic-into-dest
first:#Elastic,
last:#Elastic,
total:#Elastic,
dest:#OriginElastic
}:OriginElastic
この項目はサポートされていません。内部使用限定となっています。


pack-triple-elastic-into-self (メソッド)
protected abstract {OriginElastic.pack-triple-elastic-into-self
first:#Elastic,
last:#Elastic,
total:#Elastic
}:bool
この項目はサポートされていません。内部使用限定となっています。


place-origin (メソッド)
public {OriginElastic.place-origin total:Distance}:Distance

エラスティックの全体サイズに制約が与えられた場合、OriginElastic の起点の位置を計算します。

total: 全体サイズの制約 (ポイント単位)。

戻り値

エラスティックの最初の端点と起点の間の距離 (ポイント単位)。

注意事項

{e.place-origin total} により返される結果は、{e.first.divide e.last, total} が返す結果と同じです。


preferred-ratio (メソッド)
protected {OriginElastic.preferred-ratio}:double
この項目はサポートされていません。内部使用限定となっています。


realign-origin (メソッド)
public {OriginElastic.realign-origin
align:double,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最初と最後のコンポーネントを再計算し、指定されたスケール比率に基づいて、エラスティックの全体サイズのスケールを変更したコピーになるようにします。

align: 比率の指定。0 から 1 (それぞれを含む) の範囲で指定します。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

再計算されたエラスティック。この結果における overall-size コンポーネントは、self オペランドの overall-size コンポーネントに等しい Elastic です。結果の最初のコンポーネントは、align により全体サイズのスケールを変更した場合の結果と同じです。また、結果の最後のコンポーネントは、(1-align) により全体サイズのスケールを変更した場合の結果と同じです。

プログラミング注意事項

この演算は、Graphic オブジェクトで horigin および vorigin プロパティが 指定されたときに必要となる再配置を実行するのに使用されます。

注意事項

ratio が 0 または 1 の場合、0 の係数により全体サイズのスケールを変更した結果に設定されるようなコンポーネントに対しては unstretchable-zero-length-elastic が使用されます。


realign-using-components (メソッド)
protected {OriginElastic.realign-using-components
align:double,
first:#Elastic,
last:#Elastic,
total:#Elastic,
in-place?:bool = false
}:(first:#Elastic, last:#Elastic, total:#Elastic)
この項目はサポートされていません。内部使用限定となっています。


rigid-add-both (メソッド)
public {OriginElastic.rigid-add-both
g:Distance,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最初および最後のコンポーネントの両方に対して、固定の長さを加算または減算します。

g: ポイント単位の、加算する長さ (負の値の場合は減算)。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初のコンポーネントが、self の最初のコンポーネントと g の合計により置き換えられ、最後のコンポーネントが、self の最後のコンポーネントと g の合計により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.rigid-add-both g} により返される結果は、{{e.rigid-add-first g}.rigid-add-last g} により返される結果と同じですが、rigid-add-both 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


rigid-add-first (メソッド)
public {OriginElastic.rigid-add-first
g:Distance,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最初のコンポーネントに対して、固定した長さを加算または減算します。

g: ポイント単位の、加算する長さ (負の値の場合は減算)。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最後のコンポーネントが self の最後のコンポーネントと同じで、最初のコンポーネントが self の最初のコンポーネントと g の合計により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.rigid-add-first g} により返される結果は、{e.set-first {e.first.rigid-add g}} により返される結果と同じですが、rigid-add-first 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


rigid-add-last (メソッド)
public {OriginElastic.rigid-add-last
g:Distance,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最後のコンポーネントに対して、固定した長さを加算または減算します。

g: ポイント単位の、加算する長さ (負の値の場合は減算)。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初のコンポーネントが self の最初のコンポーネントと同じで、最後のコンポーネントが self の最後のコンポーネントと g の合計により置き換えられているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.rigid-add-last g} により返される結果は、{e.set-last {e.last.rigid-add g}} により返される結果と同じですが、rigid-add-last 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


set (メソッド)
public {OriginElastic.set g:Dimension}:OriginElastic

DimensionOriginElastic にコピーします。

g: Dimension です。まだ OriginElastic でない場合は強制変換されます。変換規則については、「次元から OriginElastics への変換」を参照してください。

戻り値

演算の結果。self の具象タイプが結果を保存できる場合、self と保存先を共有します。それ以外の場合、戻り値は新しく割り当てられたオブジェクトになります。

注意事項

gOriginElastic の場合、self にコピーされます。それ以外の場合、self はその全体サイズが g の指定どおりに設定され、self の最初と最後のコンポーネントは、その合計が全体サイズと等しくなるように必要に応じて調整されます。


set-both (メソッド)
public {OriginElastic.set-both
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最初と最後のコンポーネントを、Dimension で指定された値に設定します。

g: DimensionElastic でない場合は、Elastic.set で使用される変換方法が呼び出され強制変換されます。
dest: OriginElastic.set-first で説明されているように、結果の保存先となる OriginElastic

戻り値

最初と最後のコンポーネントが両方とも g に設定されているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

注意事項

{e.set-both g} により返される結果は、{{e.set-first g}.set-last g} により返される結果と同じですが、set-both 呼び出しの方が簡単に記述でき、dest パラメータを使用して不必要なオブジェクトの割り当てを回避することができます。


set-first (メソッド)
public {OriginElastic.set-first
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最初のコンポ-ネントを、Dimension で指定された値に設定します。

g: DimensionElastic でない場合は、変換規則に基づいて強制変換されます (「次元からエラスティックへの変換」を参照してください)。
dest: dest の具象タイプが結果に適合する場合に、結果の格納先となる OriginElastic です。dest が指定されていない場合、または null の場合、新しく割り当てられたエラスティックが返されます。

戻り値

最後のコンポーネントが self の最後のコンポーネントと同じで、最初のコンポーネントが g に設定されているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

プログラミング注意事項

このメソッドは注意して使用してください。一般的に、変数 v にバインドされている OriginElastic が存在し、ここで最後のコンポーネントは変更せず、最初のコンポーネントを置き換えようとします。このためには、次のコード パターンを使用してください。

set v = {v.set-first g, dest=v}

このタイプのコード パターンの詳細については、Elastic の注意を参照してください。


set-last (メソッド)
public {OriginElastic.set-last
g:Dimension,
dest:#OriginElastic = null
}:OriginElastic

OriginElastic の最後のコンポーネントを、Dimension により指定される値に設定します。

g: DimensionElastic でない場合は、Elastic.set で使用される変換方法を呼び出して強制変換されます。
dest: dest の具象タイプが結果に適合する場合に、結果の格納先となる OriginElastic です。dest が指定されていない場合、または null の場合、新しく割り当てられたエラスティックが返されます。

戻り値

最初のコンポーネントが self の最初のコンポーネントと同じで、最後のコンポーネントが g に設定されているエラスティック。全体のサイズは、最初と最後のコンポーネントの Elastic の合計になります。

プログラミング注意事項

このメソッドの一般的な使用パターンについては、OriginElastic.set-first の使用上の注意を参照してください。


set-total (メソッド)
public {OriginElastic.set-total g:Dimension}:OriginElastic

OriginElastic の全体サイズを、Dimension で指定された値に設定します。

g: DimensionElastic でない場合は、Elastic.set で使用される変換方法が呼び出され強制変換されます。

戻り値

全体サイズが g に設定されているエラスティック。self の最初と最後のコンポーネントは、その合計が全体サイズに等しくなるように必要に応じて調整されます。self が演算の結果を保持できる場合、self は結果を保持するように変更されてから返されます。それ以外の場合、戻り値は新たに作成されて結果を保存する OriginElastic になります。


unpack-as-triple-elastic (メソッド)
protected abstract {OriginElastic.unpack-as-triple-elastic
}:(first:#Elastic, last:#Elastic, total:#Elastic)
この項目はサポートされていません。内部使用限定となっています。


unpack-dimension-as-triple-elastic (メソッド)
protected {OriginElastic.unpack-dimension-as-triple-elastic}:(first:#Elastic, last:#Elastic, total:#Elastic)
この項目はサポートされていません。内部使用限定となっています。


unpack-triple-with-dest (メソッド)
protected {OriginElastic.unpack-triple-with-dest}:(first:#Elastic, last:#Elastic, total:#Elastic, fdest:#Elastic, ldest:#Elastic, tdest:#Elastic)
この項目はサポートされていません。内部使用限定となっています。