目次詳細目次前章次章要素属性プロパティ

4 基本データ型と基本インタフェース

目次

4.1 記法

EBNF 記法は XML 仕様 で利用されているものと同様のものとするが、加えて 文字の大小を区別しないリテラル を表す ~ (チルダ)も用いられる:この場合、 ASCII の範囲(のみ)の文字は文字の大小が区別されない。 例えば、 ~"Hello" は (H|h)(e|e)(l|L)(l|L)(o|O) に合致する。 これにより生成規則も大幅に読み易くなる。 The EBNF grammar is as used in the XML specification, with the addition of ~, a case-insensitive literal: characters in the ASCII range (only) are declared to be case-insensitive. For example, ~"Hello" will match (H|h)(e|e)(l|L)(l|L)(o|O). This makes the productions much easier to read.

?省略可能, 0 個または 1 個
+1 個以上
*0 個以上
|いずれか
"string"リテラル
~"string"文字の大小を区別しないリテラル
[]一定範囲の文字
[^]一定範囲以外の文字
()グループ化

4.2 基本データ型

この節では SVG のプロパティと属性の定義に共通して用いられるデータ型を定める。 複数のプロパティ/属性に共用されない一部のデータ型については、後続の章にて,その場で定める。 This section defines a number of common data types used in the definitions of SVG properties and attributes. Some data types that are not referenced by multiple properties and attributes are defined inline in subsequent chapters.

以下でも記されるように,一部の型の記述仕様は、スタイルシート( style 属性, style 要素, 外部スタイルシート)における CSS プロパティ値と, ( 呈示属性 も含めた) XML 属性値とでは,異なることに注意。 これは CSS の構文の制約に由来する。 例えば科学的記数法は、呈示属性も含めた属性では許容される一方,スタイルシートでは許容されない。 Note that, as noted below, the specification of some types is different for CSS property values in style sheets (in the ‘style’ attribute, ‘style’ element or an external style sheet) than it is for for XML attribute values (including presentation attributes). This is due to restrictions in the CSS grammar. For example, scientific notation is allowed in attributes, including presentation attributes, but not in style sheets.

<angle>

角度は CSS プロパティ呈示属性 のいずれの構文の中で用いられるかに依存して,2通りの方法で指定される: Angles are specified in one of two ways depending upon whether they are used in CSS property syntax or SVG presentation attribute syntax:

SVG DOM においては、 <angle> 値は SVGAngle または SVGAnimatedAngle オブジェクトを用いて表現される。 In the SVG DOM, <angle> values are represented using SVGAngle or SVGAnimatedAngle objects.

<anything>

基本型 <anything> は 0 個以上の文字を表す: The basic type <anything> is a sequence of zero or more characters. Specifically:

anything ::= Char*

ここで Char は XML 1.0 ([XML10], 2.2 節) が定める文字生成規則とする。 where Char is the production for a character, as defined in XML 1.0 ([XML10], section 2.2).

<color>

(色):基本型 <color> の記述仕様は、 sRGB 色空間 [SRGB] については, CSS2 と互換である。 <color> は SVG の color プロパティとして利用される。 また、以下のプロパティ: fill, stroke, stop-color, flood-color, lighting-color の定義における部品となる。 これらのプロパティにおける <color> では、 ICC ベースの色指定も選択できる。 The basic type <color> is a CSS2 compatible specification for a color in the sRGB color space [SRGB]. <color> applies to SVG's use of the ‘color’ property and is a component of the definitions of properties ‘fill’, ‘stroke’, ‘stop-color’, ‘flood-color’ and ‘lighting-color’, which also offer optional ICC-based color specifications.

SVG では、 <color> に対し CSS2 の構文と基本データ型 ([CSS2], 4.3.6 節) で定められたすべての色指定構文がサポートされており、加えて, SVG による拡張の 識別され得る色キーワード名 もサポートされる。 SVG supports all of the syntax alternatives for <color> defined in CSS2 syntax and basic data types ([CSS2], section 4.3.6), with the exception that SVG allows an expanded list of recognized color keywords names.

<color> は、キーワード( 識別され得る色キーワード名 )または RGB 数値指定のいずれかである。 A <color> is either a keyword (see Recognized color keyword names) or a numerical RGB specification.

これらの色キーワードに加え、利用者は利用者環境においてオブジェクトに用いられている色に対応するキーワードも指定できる。 これらキーワードの正式な定義は 利用者指定の色 ([CSS2], 18.2 節) で見られる。 In addition to these color keywords, users may specify keywords that correspond to the colors used by objects in the user's environment. The normative definition of these keywords is found in User preferences for colors ([CSS2], section 18.2).

16 進表記による RGB の数値は、 "#" に続く3桁ないし6桁の 16 進数で記される。 3桁の RGB 表記( #rgb )は、(各桁にゼロを付加するのでなく)各桁を複写して6桁の形式( #rrggbb )に変換した値とみなされる。 例えば #fb0#ffbb00 に展開される。 これにより、白色( #ffffff )は短い表記法( #fff )で指定でき,ディスプレイの色深度にも依存しないようになる。 関数表記による RGB 値は、 RGB 関数開始子に続けてコンマ区切りの3個の数値(3個の整数値または3個の百分率値)を置き, ')' で閉じて記される。 RGB 関数開始子は文字の大小を区別しない文字列 "rgb(" であり、例えば "RGB(" や "rGb(" も許容されるが、互換性のためには小文字のみの "rgb(" が望ましい。 整数値の 255 が 100% あるいは 16 進表記の F または FF に対応する: rgb(255,255,255) = rgb(100%,100%,100%) = #FFF 。 空白文字が数値の前後にあってもよい。 すべての RGB 色は sRGB 色空間 [SRGB] に含まれる。 sRGB の利用により,曖昧性のない客観的に計測可能な色の定義が与えられ、国際標準に関連付けられるようになる( [COLORIMETRY] を見よ)。 The format of an RGB value in hexadecimal notation is a "#" immediately followed by either three or six hexadecimal characters. The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display. The format of an RGB value in the functional notation is an RGB start-function followed by a comma-separated list of three numerical values (either three integer values or three percentage values) followed by ")". An RGB start-function is the case-insensitive string "rgb(", for example "RGB(" or "rGb(". For compatibility, the all-lowercase form "rgb(" is preferred. The integer value 255 corresponds to 100%, and to F or FF in the hexadecimal notation: rgb(255,255,255) = rgb(100%,100%,100%) = #FFF. White space characters are allowed around the numerical values. All RGB colors are specified in the sRGB color space [SRGB]. Using sRGB provides an unambiguous and objectively measurable definition of the color, which can be related to international standards (see [COLORIMETRY]).

color    ::= "#" hexdigit hexdigit hexdigit (hexdigit hexdigit hexdigit)?
             | "rgb(" wsp* integer comma integer comma integer wsp* ")"
             | "rgb(" wsp* integer "%" comma integer "%" comma integer "%" wsp* ")"
             | color-keyword
hexdigit ::= [0-9A-Fa-f]
comma    ::= wsp* "," wsp*
    

ここで color-keyword は、下の 識別され得る色キーワード名 の一覧の色キーワード, もしくは 利用者指定の色 ([CSS2], 18.2 節) のシステム色キーワードのいずれかに(文字の大小を区別せずに)合致するものとする。 where color-keyword matches (case insensitively) one of the color keywords listed in Recognized color keyword names below, or one of the system color keywords listed in User preferences for colors ([CSS2], section 18.2).

<color> に対応する SVG DOM インタフェースは 文書オブジェクトモデル CSS で定められる。 特に RGBColor ([DOM2STYLE], 2.2 節) を参照のこと。 SVG による色の拡張には ICC ベースの色も含まれ、 DOM インタフェース SVGColor を用いて表現される。 The corresponding SVG DOM interface definitions for <color> are defined in Document Object Model CSS; in particular, see RGBColor ([DOM2STYLE], section 2.2). SVG's extension to color, including the ability to specify ICC-based colors, are represented using DOM interface SVGColor.

<coordinate>

(座標成分): <coordinate> は利用座標系 における( X 座標の場合は X 軸方向, Y 座標の場合は Y 軸方向に沿う)原点からの(正負も含めた)距離を表す。 構文は <length> と同じである。 【単数の "coordinate" は「座標成分」と訳す。 単に「座標」と記すと (x, y) 座標の組と混同され易いので。】 A <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for <length>.

coordinate ::= length

SVG DOM においては、 <coordinate> は SVGLength または SVGAnimatedLength により表現される。 Within the SVG DOM, a <coordinate> is represented as an SVGLength or an SVGAnimatedLength.

<frequency>

周波数値は聴覚( aural )プロパティと伴用される。 CSS2 で定められているように、周波数値は <number> と直後に続く周波数単位識別子からなる。 周波数単位識別子は次のいずれかである: Frequency values are used with aural properties. As defined in CSS2, a frequency value is a <number> immediately followed by a frequency unit identifier. The frequency unit identifiers are:

周波数は負であってはならない。 Frequency values may not be negative.

SVG DOM においては、 <frequency> 値は 文書オブジェクトモデル CSS ([DOM2STYLE], 2.2 節) で定められた CSSPrimitiveValue インタフェースを用いて表現される。 In the SVG DOM, <frequency> values are represented using the CSSPrimitiveValue interface defined in Document Object Model CSS ([DOM2STYLE], section 2.2).

<FuncIRI>

IRI の関数表記: "url(" <IRI> ")" 。 Functional notation for an IRI: "url(" <IRI> ")".

<icccolor>

<icccolor> は ICC 色指定を表す。 SVG 1.1 においては、 ICC 色指定は color-profile 要素を参照する名前と 1 個以上の色成分値で与えられる。 書式は次のようになる: An <icccolor> is an ICC color specification. In SVG 1.1, an ICC color specification is given by a name, which references a ‘color-profile’ element, and one or more color component values. The grammar is as follows:

icccolor ::= "icc-color(" name (comma-wsp number)+ ")"
name  ::= [^,()#x20#x9#xD#xA] /* ",", "(", ")", wsp 以外の任意の文字 */

<icccolor> に対応する SVG DOM インタフェースは SVGICCColor である。 The corresponding SVG DOM interface for <icccolor> is SVGICCColor.

<integer>

(整数):<integer> は省略可能な正負を表す符号( "+" または "-" )に続く一桁以上の '0' から '9' までの数字により指定される: An <integer> is specified as an optional sign character ("+" or "-") followed by one or more digits "0" to "9":

integer ::= [+-]? [0-9]+

符号が省略された場合は非負数とみなされる。 If the sign character is not present, the number is non-negative.

特定の属性または プロパティ のために特に範囲が指定されている場合を除き、 <integer> は(少なくとも) -2147483648 から 2147483647 までの範囲の値をとれる。 Unless stated otherwise for a particular attribute or property, the range for an <integer> encompasses (at a minimum) -2147483648 to 2147483647.

SVG DOM においては、 <integer> は long または SVGAnimatedInteger として表現される。 Within the SVG DOM, an <integer> is represented as a long or an SVGAnimatedInteger.

<IRI>

国際化リソース識別子( IRI を見よ)。 SVG における IRI 参照の仕様については IRI 参照 を見よ。 An Internationalized Resource Identifier (see IRI). For the specification of IRI references in SVG, see IRI references.

<length>

長さとは、距離を測ったものであり、省略可能な単位を持つ数値として与えられる。 長さは、 CSS プロパティ呈示属性 のいずれの構文の中で用いられるかに依存して,2通りの方法で指定される: A length is a distance measurement, given as a number along with a unit which may be optional. Lengths are specified in one of two ways depending upon whether they are used in CSS property syntax or SVG presentation attribute syntax:

SVG DOM においては、 <length> 値は SVGLength または SVGAnimatedLength オブジェクトを用いて表現される。 In the SVG DOM, <length> values are represented using SVGLength or SVGAnimatedLength objects.

<list-of-family-names>

<list-of-family-names> は、 <generic-family> および inherit 値を除き, font-family プロパティと同じ構文の,フォントファミリ名のリストである。 A <list-of-family-names> is a list of font family names using the same syntax as the ‘font-family’ property, excluding the <generic-family> and 'inherit' values.

<list-of-strings>

<list-of-strings> は区切られた <string> の並びからなる。 文字列のリストは空白で区切られる。 空白とは、次に挙げる文字の1個以上の並びとして定義される: "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D) 。 A <list-of-strings> consists of a separated sequence of <string>s. String lists are white space-separated, where white space is defined as one or more of the following consecutive characters: "space" (U+0020), "tab" (U+0009), "line feed" (U+000A) and "carriage return" (U+000D).

<list-of-strings> 構文を記述する EBNF 文法は次で与えられる: The following is an EBNF grammar describing the <list-of-strings> syntax:

list-of-strings ::= string
                    | string wsp list-of-strings
string          ::= [^#x9#xA#xD#x20]*
wsp             ::= [#x9#xA#xD#x20]+
<list-of-Ts>

T は <string> と <family-name> 以外の何らかの型とする)一連の値のリスト。 特に指定されない限り、 SVG の XML 属性として与えるリストはコンマもしくは空白のどちらで区切ってもよい(コンマ区切りの場合はコンマの前後に空白を入れてもよい)。 (Where T is a type other than <string> and <family-name>.) A list consists of a separated sequence of values. Unless explicitly described differently, lists within SVG's XML attributes can be either comma-separated, with optional white space before or after the comma, or white space-separated.

リストにおける空白とは次に挙げる文字の1個以上の並びとして定義される:"space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D), "form-feed" (U+000C) 。 White space in lists is defined as one or more of the following consecutive characters: "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D) and "form-feed" (U+000C).

次は <list-of-Ts> の構文を記述する EBNF 記法のひな形になる: The following is a template for an EBNF grammar describing the <list-of-Ts> syntax:

list-of-Ts ::= T
               | T comma-wsp list-of-Ts
comma-wsp  ::= (wsp+ ","? wsp*) | ("," wsp*)
wsp        ::= (#x20 | #x9 | #xD | #xA)

SVG DOM においては、 <list-of-Ts> の値は特定の型 T に対するインタフェース固有の表現になる。 例えば、 <list-of-lengths> は SVG DOM においては SVGLengthList または SVGAnimatedLengthList オブジェクトを用いて表現される。 Within the SVG DOM, values of a <list-of-Ts> type are represented by an interface specific for the particular type T. For example, a <list-of-lengths> is represented in the SVG DOM using an SVGLengthList or SVGAnimatedLengthList object.

<name>

構文上特殊な一部の文字は許容されない文字列。 A name, which is a string where a few characters of syntactic significance are disallowed.

name  ::= [^,()#x20#x9#xD#xA] /* ",", "(", ")", wsp 以外の任意の文字 */
<number>

実数の指定には2通りの方法がある。 スタイルシートにおける <number> の書式は次で定義される: Real numbers are specified in one of two ways. When used in a style sheet, a <number> is defined as follows:

number ::= integer
           | [+-]? [0-9]* "." [0-9]+

この構文は ([CSS2], 4.3.1 節) が定めるものと同じである。 This syntax is the same as the definition in CSS ([CSS2], section 4.3.1).

SVG 属性においては、大きい数値をより簡潔に指定できるようにするため、 <number> の書式は異なる形で定義されている: When used in an SVG attribute, a <number> is defined differently, to allow numbers with large magnitudes to be specified more concisely:

number ::= integer ([Ee] integer)?
           | [+-]? [0-9]* "." [0-9]+ ([Ee] integer)?

SVG DOM においては、 <number> は float, SVGNumber, SVGAnimatedNumber のいずれかで表現される。 Within the SVG DOM, a <number> is represented as a float, SVGNumber or a SVGAnimatedNumber.

<number-optional-number>

<number> のペアであるが、2つめの <number> は省略可能とする。 A pair of <number>s, where the second <number> is optional.

number-optional-number ::= number
                           | number comma-wsp number

SVG DOM においては、 <number-optional-number> は SVGAnimatedInteger または SVGAnimatedNumber オブジェクトのペアで表現される。 In the SVG DOM, a <number-optional-number> is represented using a pair of SVGAnimatedInteger or SVGAnimatedNumber objects.

<paint>

(塗り): fillstroke プロパティの値は <paint> 型であり、グラフィックス要素の内部や外形線への塗りを行うときに利用される。 <paint> に指定可能なオプションとその構文は 塗りの指定 で述べる。 The values for properties ‘fill’ and ‘stroke’ are specifications of the type of paint to use when filling or stroking a given graphics element. The available options and syntax for <paint> are described in Specifying paint.

SVG DOM においては、 <paint> 値は SVGPaint オブジェクトを用いて表現される。 Within the SVG DOM, <paint> values are represented using SVGPaint objects.

<percentage>

(百分率): 百分率は、文字 "%" が直後に置かれた number で指定される。 Percentages are specified as a number followed by a "%" character:

percentage ::= number "%"

<number> の書式は、百分率がスタイルシートで指定されるか 呈示属性 ではない属性で指定されるかに依存することに注意。 Note that the definition of <number> depends on whether the percentage is specified in a style sheet or in an attribute that is not also a presentation attribute.

百分率による値は常に他の値(例えば長さなど)に対する割合になる。 百分率値を指定可能な属性と プロパティ には、割合の基準となる距離も定義される。 Percentage values are always relative to another value, for example a length. Each attribute or property that allows percentages also defines the reference distance measurement to which the percentage refers.

SVG DOM においては、 <percentage> は SVGNumber または SVGAnimatedNumber オブジェクトを用いて表現される。 Within the SVG DOM, a <percentage> is represented using an SVGNumber or SVGAnimatedNumber object.

<time>

(時間):時間の長さは <number> と直後に置く時間単位識別子で記される。 時間単位識別子は次のいずれかである: A time value is a <number> immediately followed by a time unit identifier. The time unit identifiers are:

SVG DOM においては、 <time> 値は 文書オブジェクトモデル CSS ([DOM2STYLE], 2.2 節) で定められた CSSPrimitiveValue インタフェースを用いて表現される。 In the SVG DOM, <time> values are represented using the CSSPrimitiveValue interface defined in Document Object Model CSS ([DOM2STYLE], section 2.2).

<transform-list>

<transform-list> は座標系変換のリストの指定に用いられる。 <transform-list> についての詳細は 利用座標系の変更:transform 属性 で与えられる。 A <transform-list> is used to specify a list of coordinate system transformations. A detailed description of the possible values for a <transform-list> is given in Modifying the User Coordinate System: the transform attribute.

SVG DOM においては、 <transform-list> は SVGTransformList または SVGAnimatedTransformList オブジェクトを用いて表現される。 Within the SVG DOM, a <transform-list> value is represented using an SVGTransformList or SVGAnimatedTransformList object.

<XML-Name>

Extensible Markup Language (XML) 1.0 ([XML10], 2.3 節) の Name 生成規則が定める XML 名。 An XML name, as defined by the Name production in Extensible Markup Language (XML) 1.0 ([XML10], section 2.3).

4.3 実数の精度

特定の属性または プロパティ のために特に範囲が指定されている場合を除き、 <number> は,少なくとも単精度の浮動小数点数の容量を持ち, (少なくとも) -3.4e+38F から +3.4e+38F までの範囲の値をとれる。 Unless stated otherwise for a particular attribute or property, a <number> has the capacity for at least a single-precision floating point number and has a range (at a minimum) of -3.4e+38F to +3.4e+38F.

座標系変換などの数値演算においては、可能な限り精度を維持し,丸め誤差を避けるため、記憶域も含め,より高精度の浮動小数点数による演算が推奨される。 It is recommended that higher precision floating point storage and computation be performed on operations such as coordinate system transformations to provide the best possible precision and to prevent round-off errors.

特に、 適合高品質 SVG ビューア に対しては、計算の中間過程の相当部分の数値演算において,少なくとも倍精度の浮動小数点を用いることが要求される。 Conforming High-Quality SVG Viewers are required to use at least double-precision floating point for intermediate calculations on certain numerical operations.

4.4 識別され得る色キーワード名

<color> 型に利用できる色キーワードの一覧を次に挙げる: The following is the list of recognized color keywords that can be used as a keyword value for data type <color>:

alicebluergb(240, 248, 255)
antiquewhitergb(250, 235, 215)
aquargb( 0, 255, 255)
aquamarinergb(127, 255, 212)
azurergb(240, 255, 255)
beigergb(245, 245, 220)
bisquergb(255, 228, 196)
blackrgb( 0, 0, 0)
blanchedalmondrgb(255, 235, 205)
bluergb( 0, 0, 255)
bluevioletrgb(138, 43, 226)
brownrgb(165, 42, 42)
burlywoodrgb(222, 184, 135)
cadetbluergb( 95, 158, 160)
chartreusergb(127, 255, 0)
chocolatergb(210, 105, 30)
coralrgb(255, 127, 80)
cornflowerbluergb(100, 149, 237)
cornsilkrgb(255, 248, 220)
crimsonrgb(220, 20, 60)
cyanrgb( 0, 255, 255)
darkbluergb( 0, 0, 139)
darkcyanrgb( 0, 139, 139)
darkgoldenrodrgb(184, 134, 11)
darkgrayrgb(169, 169, 169)
darkgreenrgb( 0, 100, 0)
darkgreyrgb(169, 169, 169)
darkkhakirgb(189, 183, 107)
darkmagentargb(139, 0, 139)
darkolivegreenrgb( 85, 107, 47)
darkorangergb(255, 140, 0)
darkorchidrgb(153, 50, 204)
darkredrgb(139, 0, 0)
darksalmonrgb(233, 150, 122)
darkseagreenrgb(143, 188, 143)
darkslatebluergb( 72, 61, 139)
darkslategrayrgb( 47, 79, 79)
darkslategreyrgb( 47, 79, 79)
darkturquoisergb( 0, 206, 209)
darkvioletrgb(148, 0, 211)
deeppinkrgb(255, 20, 147)
deepskybluergb( 0, 191, 255)
dimgrayrgb(105, 105, 105)
dimgreyrgb(105, 105, 105)
dodgerbluergb( 30, 144, 255)
firebrickrgb(178, 34, 34)
floralwhitergb(255, 250, 240)
forestgreenrgb( 34, 139, 34)
fuchsiargb(255, 0, 255)
gainsbororgb(220, 220, 220)
ghostwhitergb(248, 248, 255)
goldrgb(255, 215, 0)
goldenrodrgb(218, 165, 32)
grayrgb(128, 128, 128)
greyrgb(128, 128, 128)
greenrgb( 0, 128, 0)
greenyellowrgb(173, 255, 47)
honeydewrgb(240, 255, 240)
hotpinkrgb(255, 105, 180)
indianredrgb(205, 92, 92)
indigorgb( 75, 0, 130)
ivoryrgb(255, 255, 240)
khakirgb(240, 230, 140)
lavenderrgb(230, 230, 250)
lavenderblushrgb(255, 240, 245)
lawngreenrgb(124, 252, 0)
lemonchiffonrgb(255, 250, 205)
lightbluergb(173, 216, 230)
lightcoralrgb(240, 128, 128)
lightcyanrgb(224, 255, 255)
lightgoldenrodyellowrgb(250, 250, 210)
lightgrayrgb(211, 211, 211)
lightgreenrgb(144, 238, 144)
lightgreyrgb(211, 211, 211)
    
lightpinkrgb(255, 182, 193)
lightsalmonrgb(255, 160, 122)
lightseagreenrgb( 32, 178, 170)
lightskybluergb(135, 206, 250)
lightslategrayrgb(119, 136, 153)
lightslategreyrgb(119, 136, 153)
lightsteelbluergb(176, 196, 222)
lightyellowrgb(255, 255, 224)
limergb( 0, 255, 0)
limegreenrgb( 50, 205, 50)
linenrgb(250, 240, 230)
magentargb(255, 0, 255)
maroonrgb(128, 0, 0)
mediumaquamarinergb(102, 205, 170)
mediumbluergb( 0, 0, 205)
mediumorchidrgb(186, 85, 211)
mediumpurplergb(147, 112, 219)
mediumseagreenrgb( 60, 179, 113)
mediumslatebluergb(123, 104, 238)
mediumspringgreenrgb( 0, 250, 154)
mediumturquoisergb( 72, 209, 204)
mediumvioletredrgb(199, 21, 133)
midnightbluergb( 25, 25, 112)
mintcreamrgb(245, 255, 250)
mistyrosergb(255, 228, 225)
moccasinrgb(255, 228, 181)
navajowhitergb(255, 222, 173)
navyrgb( 0, 0, 128)
oldlacergb(253, 245, 230)
olivergb(128, 128, 0)
olivedrabrgb(107, 142, 35)
orangergb(255, 165, 0)
orangeredrgb(255, 69, 0)
orchidrgb(218, 112, 214)
palegoldenrodrgb(238, 232, 170)
palegreenrgb(152, 251, 152)
paleturquoisergb(175, 238, 238)
palevioletredrgb(219, 112, 147)
papayawhiprgb(255, 239, 213)
peachpuffrgb(255, 218, 185)
perurgb(205, 133, 63)
pinkrgb(255, 192, 203)
plumrgb(221, 160, 221)
powderbluergb(176, 224, 230)
purplergb(128, 0, 128)
redrgb(255, 0, 0)
rosybrownrgb(188, 143, 143)
royalbluergb( 65, 105, 225)
saddlebrownrgb(139, 69, 19)
salmonrgb(250, 128, 114)
sandybrownrgb(244, 164, 96)
seagreenrgb( 46, 139, 87)
seashellrgb(255, 245, 238)
siennargb(160, 82, 45)
silverrgb(192, 192, 192)
skybluergb(135, 206, 235)
slatebluergb(106, 90, 205)
slategrayrgb(112, 128, 144)
slategreyrgb(112, 128, 144)
snowrgb(255, 250, 250)
springgreenrgb( 0, 255, 127)
steelbluergb( 70, 130, 180)
tanrgb(210, 180, 140)
tealrgb( 0, 128, 128)
thistlergb(216, 191, 216)
tomatorgb(255, 99, 71)
turquoisergb( 64, 224, 208)
violetrgb(238, 130, 238)
wheatrgb(245, 222, 179)
whitergb(255, 255, 255)
whitesmokergb(245, 245, 245)
yellowrgb(255, 255, 0)
yellowgreenrgb(154, 205, 50)
 

4.5 基本 DOM インタフェース

4.5.1 インタフェース SVGElement

SVG 言語の要素に直接的に対応している,すべての SVG DOM インタフェースは(例えば SVGPathElementpath に直接的に対応している)、基底クラス SVGElement から派生する。 All of the SVG DOM interfaces that correspond directly to elements in the SVG language (such as the SVGPathElement interface for the ‘path’ element) derive from the SVGElement interface.

interface SVGElement : Element {
           attribute DOMString id setraises(DOMException);
           attribute DOMString xmlbase setraises(DOMException);
  readonly attribute SVGSVGElement ownerSVGElement;
  readonly attribute SVGElement viewportElement;
};
属性
id (DOMString)

要素の id 属性の値。 id が存在しない場合は空文字列。 The value of the ‘id’ attribute on the given element, or the empty string if ‘id’ is not present.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
xmlbase (DOMString)

要素の xml:base 属性に対応する。 Corresponds to attribute ‘xml:base’ on the given element.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
ownerSVGElement (readonly SVGSVGElement)

最も近い先祖の svg 要素。 要素自身が 最も外側の svg 要素 の場合は Null 。 The nearest ancestor ‘svg’ element. Null if the given element is the outermost svg element.

viewportElement (readonly SVGElement)

現在のビューポートを確立した要素。 通常は最も近い先祖の svg 要素。 与えられた要素が 最も外側の svg 要素 の場合は Null 。 The element which established the current viewport. Often, the nearest ancestor ‘svg’ element. Null if the given element is the outermost svg element.

4.5.2 インタフェース SVGAnimatedBoolean

型 boolean のアニメート可能な属性に対し利用される。 Used for attributes of type boolean which can be animated.

interface SVGAnimatedBoolean {
           attribute boolean baseVal setraises(DOMException);
  readonly attribute boolean animVal;
};
属性
baseVal (boolean)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
animVal (readonly boolean)

与えられた属性またはプロパティがアニメートされている場合、そのアニメーション値を保持する。 アニメートされていない場合は baseVal と同じ値をとる。 If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as baseVal.

4.5.3 インタフェース SVGAnimatedString

アニメート可能な型 DOMString の属性に利用される。 Used for attributes of type DOMString which can be animated.

interface SVGAnimatedString {
           attribute DOMString baseVal setraises(DOMException);
  readonly attribute DOMString animVal;
};
属性
baseVal (DOMString)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
animVal (readonly DOMString)

与えられた属性またはプロパティがアニメートされている場合、そのアニメーション値を保持する。 アニメートされていない場合は baseVal と同じ値をとる。 If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as baseVal.

4.5.4 インタフェース SVGStringList

このインタフェースは DOMString 値のリストを定義する。 This interface defines a list of DOMString values.

SVGStringList は他の SVGxxxList インタフェースと同じ属性とメソッドを持つ。 種々の SVGxxxList インタフェースの実装にあたっては、単一の基底クラスの利用が考えられる。 SVGStringList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.

interface SVGStringList {

  readonly attribute unsigned long numberOfItems;

  void clear() raises(DOMException);
  DOMString initialize(in DOMString newItem) raises(DOMException);
  DOMString getItem(in unsigned long index) raises(DOMException);
  DOMString insertItemBefore(in DOMString newItem, in unsigned long index) raises(DOMException);
  DOMString replaceItem(in DOMString newItem, in unsigned long index) raises(DOMException);
  DOMString removeItem(in unsigned long index) raises(DOMException);
  DOMString appendItem(in DOMString newItem) raises(DOMException);
};
属性
numberOfItems (readonly unsigned long)

リスト内の項目数。 The number of items in the list.

演算
void clear()

リスト内に存在する全項目を取り除いて空にする。 Clears all existing current items from the list, with the result being an empty list.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.
DOMString initialize(in DOMString newItem)

リスト内に存在するすべての項目を取り除いて空にした後、パラメタで指定された1個の項目を持つよう初期化する。 Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.

パラメタ
  1. DOMString newItem

    リストの唯一の項目となるもの。 The item which should become the only member of the list.

返り値

リストに挿入される項目。 The item being inserted into the list.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.
DOMString getItem(in unsigned long index)

リスト内の指定された項目を返す。 Returns the specified item from the list.

パラメタ
  1. unsigned long index

    リストから返される項目を指定するインデックス。 最初の項目がインデックス 0。 The index of the item from the list which is to be returned. The first item is number 0.

返り値

指定された項目。 The selected item.

例外
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
DOMString insertItemBefore(in DOMString newItem, in unsigned long index)

リスト内の指定された位置に項目を挿入する。 最初の項目がインデックス 0 。 Inserts a new item into the list at the specified position. The first item is number 0.

パラメタ
  1. DOMString newItem

    リストに挿入される項目。 The item which is to be inserted into the list.

  2. unsigned long index

    このインデックスの項目の前に新たな項目が挿入される。 最初の項目がインデックス 0 。 インデックスが 0 ならば新たな項目はリストの先頭に挿入される。 インデックスが numberOfItems 以上ならば新たな項目はリストの末尾に挿入される。 The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.
DOMString replaceItem(in DOMString newItem, in unsigned long index)

リスト内に存在する項目を新たな項目に置き換える。 Replaces an existing item in the list with a new item.

パラメタ
  1. DOMString newItem

    リストに挿入される項目。 The item which is to be inserted into the list.

  2. unsigned long index

    置き換える項目のインデックス。 最初の項目がインデックス 0 。 The index of the item which is to be replaced. The first item is number 0.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
DOMString removeItem(in unsigned long index)

リストから項目を取り除く。 Removes an existing item from the list.

パラメタ
  1. unsigned long index

    取り除かれる項目のインデックス。 最初の項目がインデックス 0 。 The index of the item which is to be removed. The first item is number 0.

返り値

取り除かれた項目。 The removed item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
DOMString appendItem(in DOMString newItem)

リストの末尾に新たに項目を追加する。 Inserts a new item at the end of the list.

パラメタ
  1. DOMString newItem

    リストに挿入する項目。 最初の項目がインデックス 0 。 The item which is to be inserted. The first item is number 0.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.

4.5.5 インタフェース SVGAnimatedEnumeration

特定の列挙定数のみを値にとるアニメート可能な属性に対し利用される。 Used for attributes whose value must be a constant from a particular enumeration and which can be animated.

interface SVGAnimatedEnumeration {
           attribute unsigned short baseVal setraises(DOMException);
  readonly attribute unsigned short animVal;
};
属性
baseVal (unsigned short)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
animVal (readonly unsigned short)

与えられた属性またはプロパティがアニメートされている場合、そのアニメーション値を保持する。 アニメートされていない場合は baseVal と同じ値をとる。 If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as baseVal.

4.5.6 インタフェース SVGAnimatedInteger

基本型 <integer> を値にとるアニメート可能な属性に対し利用される。 Used for attributes of basic type <integer> which can be animated.

interface SVGAnimatedInteger {
           attribute long baseVal setraises(DOMException);
  readonly attribute long animVal;
};
属性
baseVal (long)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
animVal (readonly long)

与えられた属性またはプロパティがアニメートされている場合、そのアニメーション値を保持する。 アニメートされていない場合は baseVal と同じ値をとる。 If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as baseVal.

4.5.7 インタフェース SVGNumber

基本型 <number> の属性に対し利用される。 Used for attributes of basic type <number>.

interface SVGNumber {
  attribute float value setraises(DOMException);
};
属性
value (float)

与えられた属性の値。 The value of the given attribute.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.

4.5.8 インタフェース SVGAnimatedNumber

基本型 <number> を値にとるアニメート可能な属性に対し利用される。 Used for attributes of basic type <number> which can be animated.

interface SVGAnimatedNumber {
           attribute float baseVal setraises(DOMException);
  readonly attribute float animVal;
};
属性
baseVal (float)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
animVal (readonly float)

与えられた属性またはプロパティがアニメートされている場合、そのアニメーション値を保持する。 アニメートされていない場合は baseVal と同じ値をとる。 If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as baseVal.

4.5.9 インタフェース SVGNumberList

このインタフェースは SVGNumber オブジェクトのリストを定義する。 This interface defines a list of SVGNumber objects.

SVGNumberList は他の SVGxxxList インタフェースと同じ属性とメソッドを持つ。 種々の SVGxxxList インタフェースの実装にあたっては、単一の基底クラスの利用が考えられる。 SVGNumberList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.

SVGNumberList オブジェクトは読み取り専用に指定され得る。 この場合、オブジェクトに対する変更を試みた際に下に示されるような例外が生じる。 An SVGNumberList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below.

interface SVGNumberList {

  readonly attribute unsigned long numberOfItems;

  void clear() raises(DOMException);
  SVGNumber initialize(in SVGNumber newItem) raises(DOMException);
  SVGNumber getItem(in unsigned long index) raises(DOMException);
  SVGNumber insertItemBefore(in SVGNumber newItem, in unsigned long index) raises(DOMException);
  SVGNumber replaceItem(in SVGNumber newItem, in unsigned long index) raises(DOMException);
  SVGNumber removeItem(in unsigned long index) raises(DOMException);
  SVGNumber appendItem(in SVGNumber newItem) raises(DOMException);
};
属性
numberOfItems (readonly unsigned long)

リスト内の項目数。 The number of items in the list.

演算
void clear()

リスト内に存在する全項目を取り除いて空にする。 Clears all existing current items from the list, with the result being an empty list.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGNumber initialize(in SVGNumber newItem)

リスト内に存在するすべての項目を取り除いて空にした後、パラメタで指定された1個の項目を持つよう初期化する。 挿入される項目が既にリスト内に存在する場合、いったんリストから取り除かれた後に挿入される。 このとき、挿入される項目は項目それ自身であり、複製はされない。 Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. If the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.

パラメタ
  1. SVGNumber newItem

    リストの唯一の項目となるもの。 The item which should become the only member of the list.

返り値

リストに挿入される項目。 The item being inserted into the list.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGNumber getItem(in unsigned long index)

リスト内の指定された項目を返す。 返される項目は複製ではなく、項目それ自身になる。 項目に加えられる変更は即座にリストに反映される。 Returns the specified item from the list. The returned item is the item itself and not a copy. Any changes made to the item are immediately reflected in the list.

パラメタ
  1. unsigned long index

    リストから返される項目を指定するインデックス。 最初の項目がインデックス 0。 The index of the item from the list which is to be returned. The first item is number 0.

返り値

指定された項目。 The selected item.

例外
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
SVGNumber insertItemBefore(in SVGNumber newItem, in unsigned long index)

リスト内の指定された位置に項目を挿入する。 最初の項目がインデックス 0 。 newItem がすでに何らかのリスト内に存在していた場合、このリストに挿入される前にそのリストから取り除かれる。 挿入される項目は項目それ自身であり、複製はされない。 項目がすでにこのリストに存在していた場合、この項目を直前に挿入する項目のインデックスは、このリストからこの項目を取り除くのものになる事に注意。 Inserts a new item into the list at the specified position. The first item is number 0. If newItem is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to insert before is before the removal of the item.

パラメタ
  1. SVGNumber newItem

    リストに挿入される項目。 The item which is to be inserted into the list.

  2. unsigned long index

    このインデックスの項目の前に新たな項目が挿入される。 最初の項目がインデックス 0 。 インデックスが 0 ならば新たな項目はリストの先頭に挿入される。 インデックスが numberOfItems 以上ならば新たな項目はリストの末尾に挿入される。 The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGNumber replaceItem(in SVGNumber newItem, in unsigned long index)

リスト内に存在する項目を新たな項目に置き換える。 newItem がすでに何らかのリスト内に存在していた場合、このリストに挿入される前にそのリストから取り除かれる。 挿入される項目は項目それ自身であり、複製はされない。 項目がすでにこのリストに存在していた場合、置き換えられる項目のインデックスは、このリストからこの項目を取り除くのものになる事に注意。 Replaces an existing item in the list with a new item. If newItem is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to replace is before the removal of the item.

パラメタ
  1. SVGNumber newItem

    リストに挿入される項目。 The item which is to be inserted into the list.

  2. unsigned long index

    置き換える項目のインデックス。 最初の項目がインデックス 0 。 The index of the item which is to be replaced. The first item is number 0.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
SVGNumber removeItem(in unsigned long index)

リストから項目を取り除く。 Removes an existing item from the list.

パラメタ
  1. unsigned long index

    取り除かれる項目のインデックス。 最初の項目がインデックス 0 。 The index of the item which is to be removed. The first item is number 0.

返り値

取り除かれた項目。 The removed item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
SVGNumber appendItem(in SVGNumber newItem)

リストの末尾に新たに項目を追加する。 newItem がすでに何らかのリスト内に存在していた場合、このリストに挿入される前にそのリストから取り除かれる。 挿入される項目は項目それ自身であり、複製はされない。 Inserts a new item at the end of the list. If newItem is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.

パラメタ
  1. SVGNumber newItem

    リストに挿入する項目。 最初の項目がインデックス 0 。 The item which is to be inserted. The first item is number 0.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストの変更が許されていないときに投出される。 Raised when the list cannot be modified.

4.5.10 インタフェース SVGAnimatedNumberList

数値のリストを値にとるアニメート可能な属性に対し利用される。 Used for attributes which take a list of numbers and which can be animated.

interface SVGAnimatedNumberList {
  readonly attribute SVGNumberList baseVal;
  readonly attribute SVGNumberList animVal;
};
属性
baseVal (readonly SVGNumberList)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

animVal (readonly SVGNumberList)

読み取り専用の SVGNumberList は与えられた属性の現在のアニメーション値を表現する。 与えられた属性がアニメートされていない場合、 SVGNumberList の内容は baseVal と同じになる。 しかしながら、その場合においても animVal から参照されるオブジェクトは baseVal から参照されるものとは常に異なる。 A read only SVGNumberList representing the current animated value of the given attribute. If the given attribute is not currently being animated, then the SVGNumberList will have the same contents as baseVal. The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.

4.5.11 インタフェース SVGLength

SVGLength インタフェースは基本データ型 <length> に対応する。 The SVGLength interface corresponds to the <length> basic data type.

SVGLength オブジェクトは読み取り専用に指定され得る。 この場合、オブジェクトに対する変更を試みた際に下に示されるような例外が生じる。 An SVGLength object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below.

interface SVGLength {

  // Length Unit Types
  const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
  const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
  const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
  const unsigned short SVG_LENGTHTYPE_EMS = 3;
  const unsigned short SVG_LENGTHTYPE_EXS = 4;
  const unsigned short SVG_LENGTHTYPE_PX = 5;
  const unsigned short SVG_LENGTHTYPE_CM = 6;
  const unsigned short SVG_LENGTHTYPE_MM = 7;
  const unsigned short SVG_LENGTHTYPE_IN = 8;
  const unsigned short SVG_LENGTHTYPE_PT = 9;
  const unsigned short SVG_LENGTHTYPE_PC = 10;

  readonly attribute unsigned short unitType;
           attribute float value setraises(DOMException);
           attribute float valueInSpecifiedUnits setraises(DOMException);
           attribute DOMString valueAsString setraises(DOMException);

  void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException);
  void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException);
};
“Length Unit Types” グループの定数
SVG_LENGTHTYPE_UNKNOWN (unsigned short)

タイプが定義済みのものではないことを表す。 このタイプの新たな値を定義したり、既存の値をこのタイプに変更する試みは無効である。 The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

SVG_LENGTHTYPE_NUMBER (unsigned short)

単位タイプが与えられていないことを表す(すなわち単位無しの値が指定されている)。 値が利用単位によるものであることを意味する。 No unit type was provided (i.e., a unitless value was specified), which indicates a value in user units.

SVG_LENGTHTYPE_PERCENTAGE (unsigned short)

百分率による値が指定されている。 A percentage value was specified.

SVG_LENGTHTYPE_EMS (unsigned short)

値が CSS2 の単位 em で指定されている。 A value was specified using the em units defined in CSS2.

SVG_LENGTHTYPE_EXS (unsigned short)

値が CSS2 の単位 ex で指定されている。 A value was specified using the ex units defined in CSS2.

SVG_LENGTHTYPE_PX (unsigned short)

値が CSS2 の単位 px で指定されている。 A value was specified using the px units defined in CSS2.

SVG_LENGTHTYPE_CM (unsigned short)

値が CSS2 の単位 cm で指定されている。 A value was specified using the cm units defined in CSS2.

SVG_LENGTHTYPE_MM (unsigned short)

値が CSS2 の単位 mm で指定されている。 A value was specified using the mm units defined in CSS2.

SVG_LENGTHTYPE_IN (unsigned short)

値が CSS2 の単位 in で指定されている。 A value was specified using the in units defined in CSS2.

SVG_LENGTHTYPE_PT (unsigned short)

値が CSS2 の単位 pt で指定されている。 A value was specified using the pt units defined in CSS2.

SVG_LENGTHTYPE_PC (unsigned short)

値が CSS2 の単位 pc で指定されている。 A value was specified using the pc units defined in CSS2.

属性
unitType (readonly unsigned short)

このインタフェースで定義される SVG_LENGTHTYPE_* 定数のいずれかを表す、値のタイプ。 The type of the value as specified by one of the SVG_LENGTHTYPE_* constants defined on this interface.

value (float)

利用単位による浮動小数点値。 この属性が設定された場合、 valueInSpecifiedUnitsvalueAsString も自動的に更新される。 The value as a floating point value, in user units. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
長さが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the length corresponds to a read only attribute or when the object itself is read only.
valueInSpecifiedUnits (float)

unitType で表される単位による浮動小数点値。 この属性が設定された場合、 valuevalueAsString も自動的に更新される。 The value as a floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
長さが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the length corresponds to a read only attribute or when the object itself is read only.
valueAsString (DOMString)

unitType の単位により文字列として表した値。 この属性が設定された場合、 value, valueInSpecifiedUnits, unitType も自動的に更新される。 The value as a string value, in the units expressed by unitType. Setting this attribute will cause value, valueInSpecifiedUnits and unitType to be updated automatically to reflect this setting.

設定時の例外
DOMException, code SYNTAX_ERR
あてがわれた文字列が有効な <length> として構文解析できないときに投出される。 Raised if the assigned string cannot be parsed as a valid <length>.
DOMException, code NO_MODIFICATION_ALLOWED_ERR
長さが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the length corresponds to a read only attribute or when the object itself is read only.
演算
void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits)

値を unitType に結び付けて再設定する。 その結果オブジェクトのすべての属性値も置き変わる。 Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.

パラメタ
  1. unsigned short unitType

    値の単位を指示する(例えば SVG_LENGTHTYPE_MM )。 The unit type for the value (e.g., SVG_LENGTHTYPE_MM).

  2. float valueInSpecifiedUnits

    新たな値。 The new value.

例外
DOMException, code NOT_SUPPORTED_ERR
unitType が SVG_LENGTHTYPE_UNKNOWN であるか、無効な単位タイプ定数(このインタフェースで定義された SVG_LENGTHTYPE_* 定数でないもの)の場合に投出される。 Raised if unitType is SVG_LENGTHTYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_LENGTHTYPE_* constants defined on this interface).
DOMException, code NO_MODIFICATION_ALLOWED_ERR
長さが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the length corresponds to a read only attribute or when the object itself is read only.
void convertToSpecifiedUnits(in unsigned short unitType)

内部の数値は同じままに保ちつつ、単位識別子を与えられた unitType に再設定する。 オブジェクトの属性 unitType, valueInSpecifiedUnits, valueAsString はこのメソッドにより変更され得る。 例えば、元の値が "0.5cm" であったとしてミリメートルに変換するようにこのメソッドを呼び出したとすると、 unitTypeSVG_LENGTHTYPE_MM に, valueInSpecifiedUnits は数値 5 に, valueAsString は "5mm" に変更される。 Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes unitType, valueInSpecifiedUnits and valueAsString might be modified as a result of this method. For example, if the original value were "0.5cm" and the method was invoked to convert to millimeters, then the unitType would be changed to SVG_LENGTHTYPE_MM, valueInSpecifiedUnits would be changed to the numeric value 5 and valueAsString would be changed to "5mm".

パラメタ
  1. unsigned short unitType

    設定する unitType (例えば SVG_LENGTHTYPE_MM) )。 The unit type to switch to (e.g., SVG_LENGTHTYPE_MM).

例外
DOMException, code NOT_SUPPORTED_ERR
unitType が SVG_LENGTHTYPE_UNKNOWN であるか、無効な単位タイプ定数(このインタフェースで定義された SVG_LENGTHTYPE_* 定数でないもの)の場合に投出される。 Raised if unitType is SVG_LENGTHTYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_LENGTHTYPE_* constants defined on this interface).
DOMException, code NO_MODIFICATION_ALLOWED_ERR
長さが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the length corresponds to a read only attribute or when the object itself is read only.

4.5.12 インタフェース SVGAnimatedLength

基本型 <length> を値にとるアニメート可能な属性に対し利用される。 Used for attributes of basic type <length> which can be animated.

interface SVGAnimatedLength {
  readonly attribute SVGLength baseVal;
  readonly attribute SVGLength animVal;
};
属性
baseVal (readonly SVGLength)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

animVal (readonly SVGLength)

読み取り専用の SVGLength は与えられた属性の現在のアニメーション値を表現する。 与えられた属性がアニメートされていない場合、 SVGLength の内容は baseVal と同じになる。 しかしながら、その場合においても animVal から参照されるオブジェクトは baseVal から参照されるものとは常に異なる。 A read only SVGLength representing the current animated value of the given attribute. If the given attribute is not currently being animated, then the SVGLength will have the same contents as baseVal. The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.

4.5.13 インタフェース SVGLengthList

このインタフェースは SVGLength オブジェクトのリストを定義する。 This interface defines a list of SVGLength objects.

SVGLengthList は他の SVGxxxList インタフェースと同じ属性とメソッドを持つ。 種々の SVGxxxList インタフェースの実装にあたっては、単一の基底クラスの利用が考えられる。 SVGLengthList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.

SVGLengthList オブジェクトは読み取り専用に指定され得る。 この場合、オブジェクトに対する変更を試みた際に下に示されるような例外が生じる。 An SVGLengthList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below.

interface SVGLengthList {

  readonly attribute unsigned long numberOfItems;

  void clear() raises(DOMException);
  SVGLength initialize(in SVGLength newItem) raises(DOMException);
  SVGLength getItem(in unsigned long index) raises(DOMException);
  SVGLength insertItemBefore(in SVGLength newItem, in unsigned long index) raises(DOMException);
  SVGLength replaceItem(in SVGLength newItem, in unsigned long index) raises(DOMException);
  SVGLength removeItem(in unsigned long index) raises(DOMException);
  SVGLength appendItem(in SVGLength newItem) raises(DOMException);
};
属性
numberOfItems (readonly unsigned long)

リスト内の項目数。 The number of items in the list.

演算
void clear()

リスト内に存在する全項目を取り除いて空にする。 Clears all existing current items from the list, with the result being an empty list.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGLength initialize(in SVGLength newItem)

リスト内に存在するすべての項目を取り除いて空にした後、パラメタで指定された1個の項目を持つよう初期化する。 挿入される項目が既にリスト内に存在する場合、いったんリストから取り除かれた後に挿入される。 このとき、挿入される項目は項目それ自身であり、複製はされない。 Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter. If the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.

パラメタ
  1. SVGLength newItem

    リストの唯一の項目となるもの。 The item which should become the only member of the list.

返り値

リストに挿入される項目。 The item being inserted into the list.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGLength getItem(in unsigned long index)

リスト内の指定された項目を返す。 返される項目は複製ではなく、項目それ自身になる。 項目に加えられる変更は即座にリストに反映される。 Returns the specified item from the list. The returned item is the item itself and not a copy. Any changes made to the item are immediately reflected in the list.

パラメタ
  1. unsigned long index

    リストから返される項目を指定するインデックス。 最初の項目がインデックス 0。 The index of the item from the list which is to be returned. The first item is number 0.

返り値

指定された項目。 The selected item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGLength insertItemBefore(in SVGLength newItem, in unsigned long index)

リスト内の指定された位置に項目を挿入する。 最初の項目がインデックス 0 。 newItem がすでに何らかのリスト内に存在していた場合、このリストに挿入される前にそのリストから取り除かれる。 挿入される項目は項目それ自身であり、複製はされない。 項目がすでにこのリストに存在していた場合、この項目を直前に挿入する項目のインデックスは、このリストからこの項目を取り除くのものになる事に注意。 Inserts a new item into the list at the specified position. The first item is number 0. If newItem is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to insert before is before the removal of the item.

パラメタ
  1. SVGLength newItem

    リストに挿入される項目。 The item which is to be inserted into the list.

  2. unsigned long index

    このインデックスの項目の前に新たな項目が挿入される。 最初の項目がインデックス 0 。 インデックスが 0 ならば新たな項目はリストの先頭に挿入される。 インデックスが numberOfItems 以上ならば新たな項目はリストの末尾に挿入される。 The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
SVGLength replaceItem(in SVGLength newItem, in unsigned long index)

リスト内に存在する項目を新たな項目に置き換える。 newItem がすでに何らかのリスト内に存在していた場合、このリストに挿入される前にそのリストから取り除かれる。 挿入される項目は項目それ自身であり、複製はされない。 項目がすでにこのリストに存在していた場合、置き換えられる項目のインデックスは、このリストからこの項目を取り除くのものになる事に注意。 Replaces an existing item in the list with a new item. If newItem is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to replace is before the removal of the item.

パラメタ
  1. SVGLength newItem

    リストに挿入される項目。 The item which is to be inserted into the list.

  2. unsigned long index

    置き換える項目のインデックス。 最初の項目がインデックス 0 。 The index of the item which is to be replaced. The first item is number 0.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
SVGLength removeItem(in unsigned long index)

リストから項目を取り除く。 Removes an existing item from the list.

パラメタ
  1. unsigned long index

    取り除かれる項目のインデックス。 最初の項目がインデックス 0 。 The index of the item which is to be removed. The first item is number 0.

返り値

取り除かれた項目。 The removed item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.
DOMException, code INDEX_SIZE_ERR
インデックスが numberOfItems 以上のときに投出される。 Raised if the index number is greater than or equal to numberOfItems.
SVGLength appendItem(in SVGLength newItem)

リストの末尾に新たに項目を追加する。 newItem がすでに何らかのリスト内に存在していた場合、このリストに挿入される前にそのリストから取り除かれる。 挿入される項目は項目それ自身であり、複製はされない。 Inserts a new item at the end of the list. If newItem is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.

パラメタ
  1. SVGLength newItem

    リストに挿入する項目。 最初の項目がインデックス 0 。 The item which is to be inserted. The first item is number 0.

返り値

挿入された項目。 The inserted item.

例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
リストが 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the list corresponds to a read only attribute or when the object itself is read only.

4.5.14 インタフェース SVGAnimatedLengthList

SVGLengthList を値にとるアニメート可能な属性に対し利用される。 Used for attributes of type SVGLengthList which can be animated.

interface SVGAnimatedLengthList {
  readonly attribute SVGLengthList baseVal;
  readonly attribute SVGLengthList animVal;
};
属性
baseVal (readonly SVGLengthList)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

animVal (readonly SVGLengthList)

読み取り専用の SVGLengthList は与えられた属性の現在のアニメーション値を表現する。 与えられた属性がアニメートされていない場合、 SVGLengthList の内容は baseVal と同じになる。 しかしながら、その場合においても animVal から参照されるオブジェクトは baseVal から参照されるものとは常に異なる。 A read only SVGLengthList representing the current animated value of the given attribute. If the given attribute is not currently being animated, then the SVGLengthList will have the same contents as baseVal. The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.

4.5.15 インタフェース SVGAngle

SVGAngle インタフェースは基本データ型 <angle> に対応する。 The SVGAngle interface corresponds to the <angle> basic data type.

SVGAngle オブジェクトは読み取り専用に指定され得る。 この場合、オブジェクトに対する変更を試みた際に下に示されるような例外が生じる。 An SVGAngle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below.

interface SVGAngle {

  // Angle Unit Types
  const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
  const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
  const unsigned short SVG_ANGLETYPE_DEG = 2;
  const unsigned short SVG_ANGLETYPE_RAD = 3;
  const unsigned short SVG_ANGLETYPE_GRAD = 4;

  readonly attribute unsigned short unitType;
           attribute float value setraises(DOMException);
           attribute float valueInSpecifiedUnits setraises(DOMException);
           attribute DOMString valueAsString setraises(DOMException);

  void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException);
  void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException);
};
“Angle Unit Types” グループの定数
SVG_ANGLETYPE_UNKNOWN (unsigned short)

単位タイプが定義済みのものではないことを表す。 このタイプの新たな値を定義したり、既存の値をこのタイプに変更する試みは無効である。 The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

SVG_ANGLETYPE_UNSPECIFIED (unsigned short)

単位タイプが与えられていないことを表す(すなわち単位無しの値が指定されている)。 角度については単位無しの値は度を表すものと見なされる。 No unit type was provided (i.e., a unitless value was specified). For angles, a unitless value is treated the same as if degrees were specified.

SVG_ANGLETYPE_DEG (unsigned short)

値の単位タイプが明示的に度に設定されている。 The unit type was explicitly set to degrees.

SVG_ANGLETYPE_RAD (unsigned short)

値が単位ラジアンで指定されている。 The unit type is radians.

SVG_ANGLETYPE_GRAD (unsigned short)

値が単位グラードで指定されている。 The unit type is radians.

属性
unitType (readonly unsigned short)

このインタフェースで定義される SVG_ANGLETYPE_* 定数のいずれかを表す、値のタイプ。 The type of the value as specified by one of the SVG_ANGLETYPE_* constants defined on this interface.

value (float)

度による浮動小数点値の角度。 この属性が設定された場合、 valueInSpecifiedUnitsvalueAsString も自動的に更新される。 The angle value as a floating point value, in degrees. Setting this attribute will cause valueInSpecifiedUnits and valueAsString to be updated automatically to reflect this setting.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
角度が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the angle corresponds to a read only attribute or when the object itself is read only.
valueInSpecifiedUnits (float)

unitType で指示される単位による浮動小数点値の角度。 この属性が設定された場合、 valuevalueAsString も自動的に更新される。 The angle value as a floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
角度が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the angle corresponds to a read only attribute or when the object itself is read only.
valueAsString (DOMString)

角度を unitType の単位により文字列として表した値。 この属性が設定された場合、 value, valueInSpecifiedUnits, unitType も自動的に更新される。 The angle value as a string value, in the units expressed by unitType. Setting this attribute will cause value, valueInSpecifiedUnits and unitType to be updated automatically to reflect this setting.

設定時の例外
DOMException, code SYNTAX_ERR
あてがわれた文字列が有効な <angle> として構文解析できないときに投出される。 Raised if the assigned string cannot be parsed as a valid <angle>.
DOMException, code NO_MODIFICATION_ALLOWED_ERR
角度が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the angle corresponds to a read only attribute or when the object itself is read only.
演算
void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits)

値を unitType に結び付けて再設定する。 その結果オブジェクトのすべての属性値も置き変わる。 Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.

パラメタ
  1. unsigned short unitType

    値の単位を指示する(例えば SVG_ANGLETYPE_DEG )。 The unit type for the value (e.g., SVG_ANGLETYPE_DEG).

  2. float valueInSpecifiedUnits

    角度値。 The angle value.

例外
DOMException, code NOT_SUPPORTED_ERR
unitType が SVG_ANGLETYPE_UNKNOWN であるか、無効な単位タイプ定数(このインタフェースで定義された SVG_ANGLETYPE_* 定数でないもの)の場合に投出される。 Raised if unitType is SVG_ANGLETYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_ANGLETYPE_* constants defined on this interface).
DOMException, code NO_MODIFICATION_ALLOWED_ERR
角度が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the angle corresponds to a read only attribute or when the object itself is read only.
void convertToSpecifiedUnits(in unsigned short unitType)

内部の数値は同じままに保ちつつ、単位識別子を与えられた unitType に再設定する。 オブジェクトの属性 unitType, valueInSpecifiedUnits, valueAsString はこのメソッドにより変更され得る。 Preserve the same underlying stored value, but reset the stored unit identifier to the given unitType. Object attributes unitType, valueInSpecifiedUnits and valueAsString might be modified as a result of this method.

パラメタ
  1. unsigned short unitType

    設定する単位の種類( SVG_ANGLETYPE_DEG など)。 The unit type to switch to (e.g., SVG_ANGLETYPE_DEG).

例外
DOMException, code NOT_SUPPORTED_ERR
unitType が SVG_ANGLETYPE_UNKNOWN であるか、無効な単位タイプ定数(このインタフェースで定義された SVG_ANGLETYPE_* 定数でないもの)の場合に投出される。 Raised if unitType is SVG_ANGLETYPE_UNKNOWN or not a valid unit type constant (one of the other SVG_ANGLETYPE_* constants defined on this interface).
DOMException, code NO_MODIFICATION_ALLOWED_ERR
角度が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the angle corresponds to a read only attribute or when the object itself is read only.

4.5.16 インタフェース SVGAnimatedAngle

基本データ型 <angle> を値にとるアニメート可能な属性に対し利用される。 Used for attributes of basic data type <angle> that can be animated.

interface SVGAnimatedAngle {
  readonly attribute SVGAngle baseVal;
  readonly attribute SVGAngle animVal;
};
属性
baseVal (readonly SVGAngle)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

animVal (readonly SVGAngle)

読み取り専用の SVGAngle は与えられた属性の現在のアニメーション値を表現する。 与えられた属性がアニメートされていない場合、 SVGAngle の内容は baseVal と同じになる。 しかしながら、その場合においても animVal から参照されるオブジェクトは baseVal から参照されるものとは常に異なる。 A read only SVGAngle representing the current animated value of the given attribute. If the given attribute is not currently being animated, then the SVGAngle will have the same contents as baseVal. The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.

4.5.17 インタフェース SVGColor

SVGColor インタフェースは stop-color, flood-color, lighting-color プロパティにおける色値定義に対応するものであり、 SVGPaint の基底クラスである。 これは、 ICC ベースの色指定を組み込んで SVG の拡張された色の概念を統合するものである。 The SVGColor interface corresponds to color value definition for properties ‘stop-color’, ‘flood-color’ and ‘lighting-color’ and is a base class for interface SVGPaint. It incorporates SVG's extended notion of color, which incorporates ICC-based color specifications.

SVGColor インタフェースは基本データ型 <color> に対応する。 基本データ型 <color> に対し適用可能な DOM インタフェースは DOM Level 2 Style 、特に RGBColor インタフェース ([DOM2STYLE], 2.2 節) を参照のこと。 Interface SVGColor does not correspond to the <color> basic data type. For the <color> basic data type, the applicable DOM interfaces are defined in DOM Level 2 Style; in particular, see the RGBColor interface ([DOM2STYLE], section 2.2).

注記: SVGColor インタフェースは廃止予定にあり、将来版の SVG 仕様からは取り除かれる可能性がある。 Note: The SVGColor interface is deprecated, and may be dropped from future versions of the SVG specification.

interface SVGColor : CSSValue {

  // Color Types
  const unsigned short SVG_COLORTYPE_UNKNOWN = 0;
  const unsigned short SVG_COLORTYPE_RGBCOLOR = 1;
  const unsigned short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
  const unsigned short SVG_COLORTYPE_CURRENTCOLOR = 3;

  readonly attribute unsigned short colorType;
  readonly attribute RGBColor rgbColor;
  readonly attribute SVGICCColor iccColor;

  void setRGBColor(in DOMString rgbColor) raises(SVGException);
  void setRGBColorICCColor(in DOMString rgbColor, in DOMString iccColor) raises(SVGException);
  void setColor(in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor) raises(SVGException);
};
“Color Types” グループの定数
SVG_COLORTYPE_UNKNOWN (unsigned short)

色タイプが定義済みのものではないことを表す。 このタイプの新たな値を定義したり、既存の値をこのタイプに変更する試みは無効である。 The color type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

SVG_COLORTYPE_RGBCOLOR (unsigned short)

sRGB 色が代替 ICC 色指定を伴わずに指定されている。 An sRGB color has been specified without an alternative ICC color specification.

SVG_COLORTYPE_RGBCOLOR_ICCCOLOR (unsigned short)

sRGB 色が代替 ICC 色指定を伴って指定されている。 An sRGB color has been specified along with an alternative ICC color specification.

SVG_COLORTYPE_CURRENTCOLOR (unsigned short)

キーワード currentColor が指定されている状態に対応する。 Corresponds to when keyword currentColor has been specified.

属性
colorType (readonly unsigned short)

このインタフェースで定義される SVG_COLORTYPE_* 定数のいずれかを表す、値のタイプ。 The type of the value as specified by one of the SVG_COLORTYPE_* constants defined on this interface.

rgbColor (readonly RGBColor)

sRGB 色空間で指定される色。 The color specified in the sRGB color space.

iccColor (readonly SVGICCColor)

代替 ICC 色指定。 The alternate ICC color specification.

演算
void setRGBColor(in DOMString rgbColor)

色値を代替 ICC 色指定を伴わずに指定された sRGB 色に変更する。 Modifies the color value to be the specified sRGB color without an alternate ICC color specification.

パラメタ
  1. DOMString rgbColor

    新たな sRGB 色値を指定する <color> 文字列。 A string that matches <color>, which specifies the new sRGB color value.

例外
SVGException, code SVG_INVALID_VALUE_ERR
rgbColor<color> の書式に合致しないときに投出される。 Raised if rgbColor does not match <color>.
void setRGBColorICCColor(in DOMString rgbColor, in DOMString iccColor)

色値を代替 ICC 色指定も伴って指定された sRGB 色に変更する。 Modifies the color value to be the specified sRGB color with an alternate ICC color specification.

パラメタ
  1. DOMString rgbColor

    新たな sRGB 色値を指定する <color> 文字列。 A string that matches <color>, which specifies the new sRGB color value.

  2. DOMString iccColor

    代替 ICC 色指定を与える <icccolor>, 文字列。 A string that matches <icccolor>, which specifies the alternate ICC color specification.

例外
SVGException, code SVG_INVALID_VALUE_ERR
rgbColor<color> の書式に合致しないとき、あるいは iccColor<icccolor> の書式に合致しないときに投出される。 Raised if rgbColor does not match <color> or if iccColor does not match <icccolor>.
void setColor(in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor)

色値を指定された値に設定する。 colorType をパラメタで指定されたタイプに設定する。 colorTypeRGBColor を要求する場合、 rgbColor<color> に合致する文字列でなければならず、そうでない場合、 rgbColor は null でなければならない。 colorTypeSVGICCColor を要求する場合、 rgbColor<icccolor>; に合致する文字列でなければならず、そうでない場合、 rgbColor は null でなければならない。 Sets the color value as specified by the parameters. If colorType requires an RGBColor, then rgbColor must be a string that matches <color>; otherwise, rgbColor. must be null. If colorType requires an SVGICCColor, then iccColor must be a string that matches <icccolor>; otherwise, iccColor must be null.

パラメタ
  1. unsigned short colorType

    colorType で定義された定数のいずれか。 One of the defined constants for colorType.

  2. DOMString rgbColor

    sRGB 色指定または null 。 The specification of an sRGB color, or null.

  3. DOMString iccColor

    ICC 色指定または null 。 The specification of an ICC color, or null.

例外
SVGException, code SVG_INVALID_VALUE_ERR
パラメタのいずれかが無効な値のときに投出される。 Raised if one of the parameters has an invalid value.

4.5.18 インタフェース SVGICCColor

SVGICCColor インタフェースは ICC ベースの色指定を表現する。 The SVGICCColor interface expresses an ICC-based color specification.

注記: SVGICCColor インタフェースは廃止予定にあり、将来版の SVG 仕様からは取り除かれる可能性がある。 Note: The SVGICCColor interface is deprecated, and may be dropped from future versions of the SVG specification.

interface SVGICCColor {
           attribute DOMString colorProfile setraises(DOMException);
  readonly attribute SVGNumberList colors;
};
属性
colorProfile (DOMString)

ICC 色指定における最初のパラメタとなる、カラープロファイル名。 The name of the color profile, which is the first parameter of an ICC color specification.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
colors (readonly SVGNumberList)

この ICC 色を定義する色値のリスト。 各色値は任意の浮動小数点数。 The list of color values that define this ICC color. Each color value is an arbitrary floating point number.

4.5.19 インタフェース SVGRect

幾何学的な矩形を表現する。 矩形は x の最小値と y の最小値を指定する座標 (x,y) 、および通常は非負の範囲に制約される width と height から定義される。 Represents rectangular geometry. Rectangles are defined as consisting of a (x,y) coordinate pair identifying a minimum X value, a minimum Y value, and a width and height, which are usually constrained to be non-negative.

SVGRect オブジェクトは読み取り専用に指定され得る。 この場合、オブジェクトに対する変更を試みた際に下に示されるような例外が生じる。 An SVGRect object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown, as described below.

interface SVGRect {
  attribute float x setraises(DOMException);
  attribute float y setraises(DOMException);
  attribute float width setraises(DOMException);
  attribute float height setraises(DOMException);
};
属性
x (float)

利用単位で表される矩形の x 座標。 The x coordinate of the rectangle, in user units.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
矩形が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the rectangle corresponds to a read only attribute or when the object itself is read only.
y (float)

利用単位で表される矩形の y 座標。 The y coordinate of the rectangle, in user units.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
矩形が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the rectangle corresponds to a read only attribute or when the object itself is read only.
width (float)

利用単位で表される矩形の width The width coordinate of the rectangle, in user units.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
矩形が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the rectangle corresponds to a read only attribute or when the object itself is read only.
height (float)

利用単位で表される矩形の height The height coordinate of the rectangle, in user units.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
矩形が 読み取り専用の属性 に対応するものである場合、またはオブジェクト自身が 読み取り専用 の場合に投出される。 Raised when the rectangle corresponds to a read only attribute or when the object itself is read only.

4.5.20 インタフェース SVGAnimatedRect

SVGRect を値にとるアニメート可能な属性に対し利用される。 Used for attributes of type SVGRect which can be animated.

interface SVGAnimatedRect {
  readonly attribute SVGRect baseVal;
  readonly attribute SVGRect animVal;
};
属性
baseVal (readonly SVGRect)

アニメーションが適用される前の与えられた属性の基底値。 The base value of the given attribute before applying any animations.

animVal (readonly SVGRect)

読み取り専用の SVGRect は与えられた属性の現在のアニメーション値を表現する。 与えられた属性がアニメートされていない場合、 SVGRect の内容は baseVal と同じになる。 しかしながら、その場合においても animVal から参照されるオブジェクトは baseVal から参照されるものとは常に異なる。 A read only SVGRect representing the current animated value of the given attribute. If the given attribute is not currently being animated, then the SVGRect will have the same contents as baseVal. The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.

4.5.21 インタフェース SVGUnitTypes

SVGUnitTypes インタフェースは共通して利用される定数を定義し、次のインタフェース: SVGGradientElement, SVGPatternElement, SVGClipPathElement, SVGMaskElement, SVGFilterElement の基底インタフェースとなる。 The SVGUnitTypes interface defines a commonly used set of constants and is a base interface used by SVGGradientElement, SVGPatternElement, SVGClipPathElement, SVGMaskElement and SVGFilterElement.

interface SVGUnitTypes {
  // Unit Types
  const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
  const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
  const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
};
“Unit Types” グループの定数
SVG_UNIT_TYPE_UNKNOWN (unsigned short)

タイプが定義済みのものではないことを表す。 このタイプの新たな値を定義したり、既存の値をこのタイプに変更する試みは無効である。 The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

SVG_UNIT_TYPE_USERSPACEONUSE (unsigned short)

userSpaceOnUse に対応する。 Corresponds to value 'userSpaceOnUse'.

SVG_UNIT_TYPE_OBJECTBOUNDINGBOX (unsigned short)

objectBoundingBox に対応する。 Corresponds to value 'objectBoundingBox'.

4.5.22 インタフェース SVGStylable

SVGStylable インタフェースは style, class, 呈示属性 を指定可能な SVG 要素に対応するすべてのオブジェクトに実装される。 従ってこの仕様で定義されるインタフェースの多くの基底になる。 The SVGStylable interface is implemented on all objects corresponding to SVG elements that can have ‘style’, ‘class’ and presentation attributes specified on them. It is thus an ancestor interface for many of the interfaces defined in this specification.

interface SVGStylable {

  readonly attribute SVGAnimatedString className;
  readonly attribute CSSStyleDeclaration style;

  CSSValue getPresentationAttribute(in DOMString name);
};
属性
className (readonly SVGAnimatedString)

与えられた要素の class 属性に対応する。 Corresponds to attribute ‘class’ on the given element.

style (readonly CSSStyleDeclaration)

与えられた要素の style 属性に対応する。 UA が CSS によるスタイル付け をサポートしない場合、この属性の値は常に null でなければならない。 Corresponds to attribute ‘style’ on the given element. If the user agent does not support styling with CSS, then this attribute must always have the value of null.

演算
CSSValue getPresentationAttribute(in DOMString name)

与えられた 呈示属性 の基底値(すなわち静的な値)を CSSValue 型のオブジェクトとして返す。 返されるオブジェクトは生きた状態であり、それに対する変更は CSSValue が与えられたオブジェクトに即座に反映される。 Returns the base (i.e., static) value of a given presentation attribute as an object of type CSSValue. The returned object is live; changes to the objects represent immediate changes to the objects to which the CSSValue is attached.

注記: getPresentationAttribute メソッドは廃止予定にあり、将来版の SVG 仕様からは取り除かれる可能性がある。 Note: The getPresentationAttribute method is deprecated, and may be dropped from future versions of the SVG specification.

パラメタ
  1. DOMString name

    値を取得する呈示属性の名前。 The name of the presentation attribute whose value is to be returned.

返り値

与えられた 呈示属性 の静的/基底値を CSSValue で表したもの。 属性が指定値を持たない場合は null 。 The static/base value of the given presentation attribute as a CSSValue, or null if the given attribute does not have a specified value.

4.5.23 インタフェース SVGLocatable

SVGLocatable インタフェースは transform 属性を持つか、あるいは transform 属性は持たないがその内容が現在の利用空間における限界ボックスを持ち得るようなすべての要素に対し利用できる。 Interface SVGLocatable is for all elements which either have a ‘transform’ attribute or don't have a ‘transform’ attribute but whose content can have a bounding box in current user space.

interface SVGLocatable {

  readonly attribute SVGElement nearestViewportElement;
  readonly attribute SVGElement farthestViewportElement;

  SVGRect getBBox();
  SVGMatrix getCTM();
  SVGMatrix getScreenCTM();
  SVGMatrix getTransformToElement(in SVGElement element) raises(SVGException);
};
属性
nearestViewportElement (readonly SVGElement)

現在のビューポートを確立した要素。 通常は最も近い先祖の svg 要素。 現在の要素が 最も外側の svg 要素 の場合は null 。 The element which established the current viewport. Often, the nearest ancestor ‘svg’ element. Null if the current element is the outermost svg element.

farthestViewportElement (readonly SVGElement)

最も遠い先祖の svg 要素。 現在の要素が 最も外側の svg 要素 の場合は null 。 The farthest ancestor ‘svg’ element. Null if the current element is the outermost svg element.

演算
SVGRect getBBox()

現在の利用空間(すなわち transform 属性があればその適用後)における、包含するすべてのグラフィックス要素のストローク, マスキング, フィルタ効果を除外した幾何を囲む最小の限界ボックスを返す。 getBBox は、たとえまだ描画されていなくとも、メソッドが呼び出された時点での限界ボックスを返さなければならないことに注意。 Returns the tight bounding box in current user space (i.e., after application of the ‘transform’ attribute, if any) on the geometry of all contained graphics elements, exclusive of stroking, clipping, masking and filter effects). Note that getBBox must return the actual bounding box at the time the method was called, even in case the element has not yet been rendered.

返り値

限界ボックスを与える SVGRect オブジェクト。 An SVGRect object that defines the bounding box.

SVGMatrix getCTM()

nearestViewportElement に対する、現在の利用座標系(すなわち transform 属性があればその適用後)からビューポート座標系への変換行列を返す。 Returns the transformation matrix from current user units (i.e., after application of the ‘transform’ attribute, if any) to the viewport coordinate system for the nearestViewportElement.

返り値

CTM を与える SVGMatrix オブジェクト。 An SVGMatrix object that defines the CTM.

SVGMatrix getScreenCTM()

現在の利用単位(すなわち transform 属性があればその適用後)から親の UA から通知された「画素」への変換行列を返す。 ディスプレイ装置においては、これは理想的には物理的なスクリーンの画素を表す。 物理的な画素の大きさが知られない他の装置あるいは環境においては、 CSS2 による「画素」の定義と同様なアルゴリズムを利用してもよい。 この要素が文書木に結びつけられていない場合 null が返されることに注意。 このメソッドは正しくは getClientCTM と命名されるべきであるが、歴史的な理由によりこの名前 getScreenCTM が保持されている。 Returns the transformation matrix from current user units (i.e., after application of the ‘transform’ attribute, if any) to the parent user agent's notice of a "pixel". For display devices, ideally this represents a physical screen pixel. For other devices or environments where physical pixel sizes are not known, then an algorithm similar to the CSS2 definition of a "pixel" can be used instead. Note that null is returned if this element is not hooked into the document tree. This method would have been more aptly named as getClientCTM, but the name getScreenCTM is kept for historical reasons.

返り値

与えられた変換行列を定義する SVGMatrix オブジェクト。 An SVGMatrix object that defines the given transformation matrix.

SVGMatrix getTransformToElement(in SVGElement element)

現在の要素の利用座標系から( transform 属性があればその適用後) element パラメタで与えられる要素の利用座標系(その transform 属性があればその適用後)への変換行列を返す。 Returns the transformation matrix from the user coordinate system on the current element (after application of the ‘transform’ attribute, if any) to the user coordinate system on parameter element (after application of its ‘transform’ attribute, if any).

パラメタ
  1. SVGElement element

    対象の要素。 The target element.

返り値

変換を与える SVGMatrix オブジェクト。 An SVGMatrix object that defines the transformation.

例外
SVGException, code SVG_MATRIX_NOT_INVERTABLE
現在定義されている変換行列による行列の算出が不可能なとき投出される(例えばどれかの変換が特異である — 逆行列を持たない — などの理由で)。 Raised if the currently defined transformation matrices make it impossible to compute the given matrix (e.g., because one of the transformations is singular).

4.5.24 インタフェース SVGTransformable

インタフェース SVGTransformabletransform 属性を持つすべての要素に適用されるプロパティとメソッドを含む。 Interface SVGTransformable contains properties and methods that apply to all elements which have attribute ‘transform’.

interface SVGTransformable : SVGLocatable {
  readonly attribute SVGAnimatedTransformList transform;
};
属性
transform (readonly SVGAnimatedTransformList)

与えられた要素の transform 属性に対応する。 Corresponds to attribute ‘transform’ on the given element.

4.5.25 インタフェース SVGTests

SVGTests インタフェースは requiredFeatures, requiredExtensions, systemLanguage 属性を持つすべての要素に対し適用されるインタフェースを定義する。 Interface SVGTests defines an interface which applies to all elements which have attributes ‘requiredFeatures’, ‘requiredExtensions’ and ‘systemLanguage’.

interface SVGTests {

  readonly attribute SVGStringList requiredFeatures;
  readonly attribute SVGStringList requiredExtensions;
  readonly attribute SVGStringList systemLanguage;

  boolean hasExtension(in DOMString extension);
};
属性
requiredFeatures (readonly SVGStringList)

与えられた要素の requiredFeatures 属性に対応する。 Corresponds to attribute ‘requiredFeatures’ on the given element.

requiredExtensions (readonly SVGStringList)

与えられた要素の requiredExtensions 属性に対応する。 Corresponds to attribute ‘requiredExtensions’ on the given element.

systemLanguage (readonly SVGStringList)

与えられた要素の systemLanguage 属性に対応する。 Corresponds to attribute ‘systemLanguage’ on the given element.

演算
boolean hasExtension(in DOMString extension)

URI で指定される拡張を UA がサポートする場合 true を返す。 Returns true if the user agent supports the given extension, specified by a URI.

パラメタ
  1. DOMString extension

    URI で表記される拡張名。 The name of the extension, expressed as a URI.

返り値

与えられた拡張がサポートされるかどうかを表す真偽値。 True or false, depending on whether the given extension is supported.

4.5.26 インタフェース SVGLangSpace

SVGLangSpace インタフェースは xml:langxml:space 属性を持つすべての要素に適用されるインタフェースを定義する。 Interface SVGLangSpace defines an interface which applies to all elements which have attributes ‘xml:lang’ and ‘xml:space’.

interface SVGLangSpace {
  attribute DOMString xmllang setraises(DOMException);
  attribute DOMString xmlspace setraises(DOMException);
};
属性
xmllang (DOMString)

与えられた要素の xml:lang 属性に対応する。 Corresponds to attribute ‘xml:lang’ on the given element.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.
xmlspace (DOMString)

与えられた要素の xml:space 属性に対応する。 Corresponds to attribute ‘xml:space’ on the given element.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.

4.5.27 インタフェース SVGExternalResourcesRequired

SVGExternalResourcesRequired インタフェースは要素またはその子孫が外部リソースを参照し得るようなすべての要素に対し適用されるインタフェースを定義する。 Interface SVGExternalResourcesRequired defines an interface which applies to all elements where this element or one of its descendants can reference an external resource.

interface SVGExternalResourcesRequired {
  readonly attribute SVGAnimatedBoolean externalResourcesRequired;
};
属性
externalResourcesRequired (readonly SVGAnimatedBoolean)

与えられた要素の externalResourcesRequired 属性に対応する。 SVG DOM では externalResourcesRequired 属性を型 SVGAnimatedBoolean として定めている一方、 SVG 言語では externalResourcesRequired はアニメートされない/できないものと定義されていることに注意。 したがって、 animVal は常に baseVal と同じ値になる。 Corresponds to attribute ‘externalResourcesRequired’ on the given element. Note that the SVG DOM defines the attribute ‘externalResourcesRequired’ as being of type SVGAnimatedBoolean, whereas the SVG language definition says that ‘externalResourcesRequired’ is not animated. Because the SVG language definition states that ‘externalResourcesRequired’ cannot be animated, the animVal will always be the same as the baseVal.

4.5.28 インタフェース SVGFitToViewBox

インタフェース SVGFitToViewBox は XML 属性 viewBox, preserveAspectRatio を持つ要素に適用される DOM 属性を定義する。 Interface SVGFitToViewBox defines DOM attributes that apply to elements which have XML attributes ‘viewBox’ and ‘preserveAspectRatio’.

interface SVGFitToViewBox {
  readonly attribute SVGAnimatedRect viewBox;
  readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
};
属性
viewBox (readonly SVGAnimatedRect)

与えられた要素の viewBox 属性に対応する。 Corresponds to attribute ‘viewBox’ on the given element.

preserveAspectRatio (readonly SVGAnimatedPreserveAspectRatio)

与えられた要素の preserveAspectRatio 属性に対応する。 Corresponds to attribute ‘preserveAspectRatio’ on the given element.

4.5.29 インタフェース SVGZoomAndPan

SVGZoomAndPan インタフェースは zoomAndPan 属性および関連する定数を定義する。 The SVGZoomAndPan interface defines attribute zoomAndPan and associated constants.

interface SVGZoomAndPan {

  // Zoom and Pan Types
  const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
  const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
  const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;

  attribute unsigned short zoomAndPan setraises(DOMException);
};
“Zoom and Pan Types” グループの定数
SVG_ZOOMANDPAN_UNKNOWN (unsigned short)

定義済みのものではない値に設定されていることを表す。 このタイプの新たな値を定義したり、既存の値をこのタイプに変更する試みは無効である。 The enumeration was set to a value that is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

SVG_ZOOMANDPAN_DISABLE (unsigned short)

disable に対応する。 Corresponds to value 'disable'.

SVG_ZOOMANDPAN_MAGNIFY (unsigned short)

magnify に対応する。 Corresponds to value 'magnify'.

属性
zoomAndPan (unsigned short)

与えられた要素の zoomAndPan 属性に対応する。 値はこのインタフェースで定義される SVG_ZOOMANDPAN_* 定数のいずれかでなければならない。 Corresponds to attribute ‘zoomAndPan’ on the given element. The value must be one of the SVG_ZOOMANDPAN_* constants defined on this interface.

設定時の例外
DOMException, code NO_MODIFICATION_ALLOWED_ERR
読み取り専用の属性 の変更を試みたときに投出される。 Raised on an attempt to change the value of a read only attribute.

4.5.30 インタフェース SVGViewSpec

このインタフェースは SVG ビュー指定に対応する。 The interface corresponds to an SVG View Specification.

interface SVGViewSpec : SVGZoomAndPan,
                        SVGFitToViewBox {
  readonly attribute SVGTransformList transform;
  readonly attribute SVGElement viewTarget;
  readonly attribute DOMString viewBoxString;
  readonly attribute DOMString preserveAspectRatioString;
  readonly attribute DOMString transformString;
  readonly attribute DOMString viewTargetString;
};
属性
transform (readonly SVGTransformList)

SVG ビュー指定における transform の設定に対応する。 Corresponds to the transform setting on the SVG View Specification.

viewTarget (readonly SVGElement)

SVG ビュー指定における viewTarget の設定に対応する。 Corresponds to the viewTarget setting on the SVG View Specification.

viewBoxString (readonly DOMString)

SVG ビュー指定における viewBox の設定に対応する。 Corresponds to the viewBox setting on the SVG View Specification.

preserveAspectRatioString (readonly DOMString)

SVG ビュー指定における preserveAspectRatio の設定に対応する。 Corresponds to the preserveAspectRatio setting on the SVG View Specification.

transformString (readonly DOMString)

SVG ビュー指定における transform の設定に対応する。 Corresponds to the transform setting on the SVG View Specification.

viewTargetString (readonly DOMString)

SVG ビュー指定における viewTarget の設定に対応する。 Corresponds to the viewTarget setting on the SVG View Specification.

4.5.31 インタフェース SVGURIReference

インタフェース SVGURIReferencexlink:href など URI 参照を与える一連の XLink 属性を持つすべての要素に適用されるインタフェースを定義する。 Interface SVGURIReference defines an interface which applies to all elements which have the collection of XLink attributes, such as ‘xlink:href’, which define a URI reference.

interface SVGURIReference {
  readonly attribute SVGAnimatedString href;
};
属性
href (readonly SVGAnimatedString)

与えられた要素の xlink:href 属性に対応する。 Corresponds to attribute ‘xlink:href’ on the given element.

4.5.32 インタフェース SVGCSSRule

SVG は ICC ベースの色指定を可能にするため、 CSSRule インタフェースに SVGColorProfileRule 規則を追加して SVGCSSRule インタフェースに拡張する。 SVG extends interface CSSRule with interface SVGCSSRule by adding an SVGColorProfileRule rule to allow for specification of ICC-based color.

この拡張は将来版の CSS と DOM に取り込まれることが見込まれている。 It is likely that this extension will become part of a future version of CSS and DOM.

interface SVGCSSRule : CSSRule {
  const unsigned short COLOR_PROFILE_RULE = 7;
};
定数
COLOR_PROFILE_RULE (unsigned short)

規則が @color-profile である。 The rule is an @color-profile.

4.5.33 インタフェース SVGRenderingIntent

SVGRenderingIntent インタフェースは rendering-intent 属性/記述に対応する値の列挙を定義する。 The SVGRenderingIntent interface defines the enumerated list of possible values for ‘rendering-intent’ attributes or descriptors.

interface SVGRenderingIntent {
  // Rendering Intent Types
  const unsigned short RENDERING_INTENT_UNKNOWN = 0;
  const unsigned short RENDERING_INTENT_AUTO = 1;
  const unsigned short RENDERING_INTENT_PERCEPTUAL = 2;
  const unsigned short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
  const unsigned short RENDERING_INTENT_SATURATION = 4;
  const unsigned short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
};
“Rendering Intent Types” グループの定数
RENDERING_INTENT_UNKNOWN (unsigned short)

タイプが定義済みのものではないことを表す。 このタイプの新たな値を定義したり、既存の値をこのタイプに変更する試みは無効である。 The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

RENDERING_INTENT_AUTO (unsigned short)

auto に対応する。 Corresponds to a value of 'auto'.

RENDERING_INTENT_PERCEPTUAL (unsigned short)

perceptual に対応する。 Corresponds to a value of 'perceptual'.

RENDERING_INTENT_RELATIVE_COLORIMETRIC (unsigned short)

relative-colorimetric に対応する。 Corresponds to a value of 'relative-colorimetric'.

RENDERING_INTENT_SATURATION (unsigned short)

saturation に対応する。 Corresponds to a value of 'saturation'.

RENDERING_INTENT_ABSOLUTE_COLORIMETRIC (unsigned short)

absolute-colorimetric に対応する。 Corresponds to a value of 'absolute-colorimetric'.

目次詳細目次前章次章要素属性プロパティ