websvg.pas 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753
  1. unit websvg;
  2. {$MODE ObjFPC}
  3. {$H+}
  4. {$MODESWITCH externalclass}
  5. interface
  6. uses SysUtils, web, JS;
  7. type
  8. // Forward class
  9. TJSSVGSVGElement = class;
  10. TJSSVGNumberList = class;
  11. TJSSVGAngle = class;
  12. TJSSVGAnimatedAngle = class;
  13. TJSSVGAnimatedBoolean = class;
  14. TJSSVGAnimatedEnumeration = class;
  15. TJSSVGAnimatedInteger = class;
  16. TJSSVGAnimatedLength = class;
  17. TJSSVGAnimatedLengthList = class;
  18. TJSSVGAnimatedNumber = class;
  19. TJSSVGAnimatedNumberList = class;
  20. TJSSVGAnimatedPreserveAspectRatio = class;
  21. TJSSVGAnimatedRect = class;
  22. TJSSVGAnimatedString = class;
  23. TJSSVGAnimatedTransformList = class;
  24. TJSSVGAnimateElement = class;
  25. TJSSVGAnimateMotionElement = class;
  26. TJSSVGAnimateTransformElement = class;
  27. TJSSVGAnimationElement = class;
  28. TJSSVGCircleElement = class;
  29. TJSSVGClipPathElement = class;
  30. TJSSVGComponentTransferFunctionElement = class;
  31. TJSSVGDefsElement = class;
  32. TJSSVGDescElement = class;
  33. TJSSVGDiscardElement = class;
  34. TJSSVGDocument = class;
  35. TJSSVGElement = class;
  36. TJSSVGEllipseElement = class;
  37. TJSSVGFEBlendElement = class;
  38. TJSSVGFEColorMatrixElement = class;
  39. TJSSVGFEComponentTransferElement = class;
  40. TJSSVGFECompositeElement = class;
  41. TJSSVGFEConvolveMatrixElement = class;
  42. TJSSVGFEDiffuseLightingElement = class;
  43. TJSSVGFEDisplacementMapElement = class;
  44. TJSSVGFEDistantLightElement = class;
  45. TJSSVGFEDropShadowElement = class;
  46. TJSSVGFEFloodElement = class;
  47. TJSSVGFEFuncAElement = class;
  48. TJSSVGFEFuncBElement = class;
  49. TJSSVGFEFuncGElement = class;
  50. TJSSVGFEFuncRElement = class;
  51. TJSSVGFEGaussianBlurElement = class;
  52. TJSSVGFEImageElement = class;
  53. TJSSVGFEMergeElement = class;
  54. TJSSVGFEMergeNodeElement = class;
  55. TJSSVGFEMorphologyElement = class;
  56. TJSSVGFEOffsetElement = class;
  57. TJSSVGFEPointLightElement = class;
  58. TJSSVGFESpecularLightingElement = class;
  59. TJSSVGFESpotLightElement = class;
  60. TJSSVGFETileElement = class;
  61. TJSSVGFETurbulenceElement = class;
  62. TJSSVGFilterElement = class;
  63. TJSSVGFilterPrimitiveStandardAttributes = class;
  64. TJSSVGFitToViewBox = class;
  65. TJSSVGForeignObjectElement = class;
  66. TJSSVGGElement = class;
  67. TJSSVGGeometryElement = class;
  68. TJSSVGGradientElement = class;
  69. TJSSVGGraphicsElement = class;
  70. TJSSVGImageElement = class;
  71. TJSSVGLength = class;
  72. TJSSVGLinearGradientElement = class;
  73. TJSSVGLineElement = class;
  74. TJSSVGMarkerElement = class;
  75. TJSSVGMaskElement = class;
  76. TJSSVGMatrix = class;
  77. TJSSVGMetadataElement = class;
  78. TJSSVGMPathElement = class;
  79. TJSSVGNumber = class;
  80. TJSSVGPathElement = class;
  81. TJSSVGPatternElement = class;
  82. TJSSVGPoint = class;
  83. TJSSVGPolygonElement = class;
  84. TJSSVGPolylineElement = class;
  85. TJSSVGPreserveAspectRatio = class;
  86. TJSSVGRadialGradientElement = class;
  87. TJSSVGRect = class;
  88. TJSSVGRectElement = class;
  89. TJSSVGScriptElement = class;
  90. TJSSVGSetElement = class;
  91. TJSSVGStopElement = class;
  92. TJSSVGStyleElement = class;
  93. TJSSVGSwitchElement = class;
  94. TJSSVGSymbolElement = class;
  95. TJSSVGTests = class;
  96. TJSSVGTextContentElement = class;
  97. TJSSVGTextElement = class;
  98. TJSSVGTextPathElement = class;
  99. TJSSVGTextPositioningElement = class;
  100. TJSSVGTitleElement = class;
  101. TJSSVGTransform = class;
  102. TJSSVGTSpanElement = class;
  103. TJSSVGUnitTypes = class;
  104. TJSSVGURIReference = class;
  105. TJSSVGUseElement = class;
  106. TJSSVGViewElement = class;
  107. TJSSVGZoomAndPan = class;
  108. type
  109. DOMStringMap = class external name 'DOMStringMap'
  110. private
  111. function GetItem(name: String): String; external name '[]';
  112. procedure SetItem(name: String; value: String); external name '[]';
  113. public
  114. //procedure (name: String);
  115. property Items[name: String]: String read GetItem write SetItem; default;
  116. end;
  117. { --------------------------------------------------------------------
  118. TJSSVGElement
  119. --------------------------------------------------------------------}
  120. TJSSVGElement = class external name 'SVGElement'(TJSElement)
  121. private
  122. FclassName: TJSSVGAnimatedString; external name 'className';
  123. Fdataset: DOMStringMap; external name 'dataset';
  124. Fstyle: TJSCSSStyleDeclaration; external name 'style';
  125. FownerSVGElement: TJSSVGSVGElement; external name 'ownerSVGElement';
  126. FviewportElement: TJSSVGElement; external name 'viewportElement';
  127. public
  128. tabIndex: Integer;
  129. procedure focus;
  130. procedure blur;
  131. property className: TJSSVGAnimatedString read FclassName;
  132. property dataset: DOMStringMap read Fdataset;
  133. property style: TJSCSSStyleDeclaration read Fstyle;
  134. property ownerSVGElement: TJSSVGSVGElement read FownerSVGElement;
  135. property viewportElement: TJSSVGElement read FviewportElement;
  136. end;
  137. { --------------------------------------------------------------------
  138. TJSSVGGraphicsElement
  139. --------------------------------------------------------------------}
  140. TJSSVGGraphicsElement = class external name 'SVGGraphicsElement' (TJSSVGElement)
  141. private
  142. Ftransform: TJSSVGAnimatedTransformList; external name 'transform';
  143. FnearestViewportElement: TJSSVGElement; external name 'nearestViewportElement';
  144. FfarthestViewportElement: TJSSVGElement; external name
  145. 'farthestViewportElement';
  146. public
  147. function getBBox: TJSSVGRect;
  148. function getCTM: TJSSVGMatrix;
  149. function getScreenCTM: TJSSVGMatrix;
  150. property transform: TJSSVGAnimatedTransformList read Ftransform;
  151. property nearestViewportElement: TJSSVGElement read FnearestViewportElement;
  152. property farthestViewportElement: TJSSVGElement read FfarthestViewportElement;
  153. end;
  154. { --------------------------------------------------------------------
  155. TJSSVGSVGElement
  156. --------------------------------------------------------------------}
  157. TJSSVGSVGElement = class external name 'SVGSVGElement' (TJSSVGGraphicsElement)
  158. private
  159. Fx: TJSSVGAnimatedLength; external name 'x';
  160. Fy: TJSSVGAnimatedLength; external name 'y';
  161. Fwidth: TJSSVGAnimatedLength; external name 'width';
  162. Fheight: TJSSVGAnimatedLength; external name 'height';
  163. FcurrentTranslate: TJSSVGPoint; external name 'currentTranslate';
  164. public
  165. currentScale: Double;
  166. function getIntersectionList(rect: TJSSVGRect; referenceElement: TJSSVGElement):
  167. TJSNodeList;
  168. function getEnclosureList(rect: TJSSVGRect; referenceElement: TJSSVGElement):
  169. TJSNodeList;
  170. function checkIntersection(element: TJSSVGElement; rect: TJSSVGRect): boolean;
  171. function checkEnclosure(element: TJSSVGElement; rect: TJSSVGRect): boolean;
  172. procedure deselectAll;
  173. function createSVGNumber: TJSSVGNumber;
  174. function createSVGLength: TJSSVGLength;
  175. function createSVGAngle: TJSSVGAngle;
  176. function createSVGPoint: TJSSVGPoint;
  177. function createSVGMatrix: TJSSVGMatrix;
  178. function createSVGRect: TJSSVGRect;
  179. function createSVGTransform: TJSSVGTransform;
  180. function createSVGTransformFromMatrix(matrix: TJSSVGMatrix): TJSSVGTransform;
  181. function getElementById(elementId: string): TJSElement;
  182. function suspendRedraw(maxWaitMilliseconds: NativeInt): NativeInt;
  183. procedure unsuspendRedraw(suspendHandleId: NativeInt);
  184. procedure unsuspendRedrawAll;
  185. procedure forceRedraw;
  186. procedure pauseAnimations;
  187. procedure unpauseAnimations;
  188. function animationsPaused: boolean;
  189. function getCurrentTime: Double;
  190. procedure setCurrentTime(seconds: Double);
  191. property x: TJSSVGAnimatedLength read Fx;
  192. property y: TJSSVGAnimatedLength read Fy;
  193. property width: TJSSVGAnimatedLength read Fwidth;
  194. property height: TJSSVGAnimatedLength read Fheight;
  195. property currentTranslate: TJSSVGPoint read FcurrentTranslate;
  196. end;
  197. { --------------------------------------------------------------------
  198. TJSSVGAElement
  199. --------------------------------------------------------------------}
  200. TJSSVGAElement = class external name 'SVGAElement' (TJSSVGGraphicsElement)
  201. private
  202. Ftarget: TJSSVGAnimatedString; external name 'target';
  203. public
  204. property target: TJSSVGAnimatedString read Ftarget;
  205. end;
  206. { --------------------------------------------------------------------
  207. TJSSVGAngle
  208. --------------------------------------------------------------------}
  209. TJSSVGAngle = class external name 'SVGAngle'
  210. private
  211. FunitType: Cardinal; external name 'unitType';
  212. public
  213. const
  214. SVG_ANGLETYPE_UNKNOWN = 0;
  215. SVG_ANGLETYPE_UNSPECIFIED = 1;
  216. SVG_ANGLETYPE_DEG = 2;
  217. SVG_ANGLETYPE_RAD = 3;
  218. SVG_ANGLETYPE_GRAD = 4;
  219. Public
  220. value: Double;
  221. valueInSpecifiedUnits: Double;
  222. valueAsString: string;
  223. procedure newValueSpecifiedUnits(unitType: Cardinal; valueInSpecifiedUnits: Double);
  224. procedure convertToSpecifiedUnits(unitType: Cardinal);
  225. property unitType: Cardinal read FunitType;
  226. end;
  227. { --------------------------------------------------------------------
  228. TJSSVGAnimatedAngle
  229. --------------------------------------------------------------------}
  230. TJSSVGAnimatedAngle = class external name 'SVGAnimatedAngle'
  231. private
  232. FbaseVal: TJSSVGAngle; external name 'baseVal';
  233. FanimVal: TJSSVGAngle; external name 'animVal';
  234. public
  235. property baseVal: TJSSVGAngle read FbaseVal;
  236. property animVal: TJSSVGAngle read FanimVal;
  237. end;
  238. { --------------------------------------------------------------------
  239. TJSSVGAnimatedBoolean
  240. --------------------------------------------------------------------}
  241. TJSSVGAnimatedBoolean = class external name 'SVGAnimatedBoolean'
  242. private
  243. FanimVal: boolean; external name 'animVal';
  244. public
  245. baseVal: boolean;
  246. property animVal: boolean read FanimVal;
  247. end;
  248. { --------------------------------------------------------------------
  249. TJSSVGAnimatedEnumeration
  250. --------------------------------------------------------------------}
  251. TJSSVGAnimatedEnumeration = class external name 'SVGAnimatedEnumeration'
  252. private
  253. FanimVal: Cardinal; external name 'animVal';
  254. public
  255. baseVal: Cardinal;
  256. property animVal: Cardinal read FanimVal;
  257. end;
  258. { --------------------------------------------------------------------
  259. TJSSVGAnimatedInteger
  260. --------------------------------------------------------------------}
  261. TJSSVGAnimatedInteger = class external name 'SVGAnimatedInteger'
  262. private
  263. FanimVal: Integer; external name 'animVal';
  264. public
  265. baseVal: Integer;
  266. property animVal: Integer read FanimVal;
  267. end;
  268. { --------------------------------------------------------------------
  269. TJSSVGAnimatedLength
  270. --------------------------------------------------------------------}
  271. TJSSVGAnimatedLength = class external name 'SVGAnimatedLength'
  272. private
  273. FbaseVal: TJSSVGLength; external name 'baseVal';
  274. FanimVal: TJSSVGLength; external name 'animVal';
  275. public
  276. property baseVal: TJSSVGLength read FbaseVal;
  277. property animVal: TJSSVGLength read FanimVal;
  278. end;
  279. { --------------------------------------------------------------------
  280. TJSSVGLengthList
  281. --------------------------------------------------------------------}
  282. TJSSVGLengthList = class external name 'SVGLengthList'
  283. public
  284. numberOfItems: Integer;
  285. procedure clear;
  286. function initialize(newItem: TJSSVGLength): TJSSVGLength;
  287. function getItem(&index: Integer): TJSSVGLength;
  288. function insertItemBefore(newItem: TJSSVGLength; &index: Integer): TJSSVGLength;
  289. function replaceItem(newItem: TJSSVGLength; &index: Integer): TJSSVGLength;
  290. function removeItem(&index: Integer): TJSSVGLength;
  291. function appendItem(newItem: TJSSVGLength): TJSSVGLength;
  292. end;
  293. { --------------------------------------------------------------------
  294. TJSSVGAnimatedLengthList
  295. --------------------------------------------------------------------}
  296. TJSSVGAnimatedLengthList = class external name 'SVGAnimatedLengthList'
  297. private
  298. FbaseVal: TJSSVGLengthList; external name 'baseVal';
  299. FanimVal: TJSSVGLengthList; external name 'animVal';
  300. public
  301. property baseVal: TJSSVGLengthList read FbaseVal;
  302. property animVal: TJSSVGLengthList read FanimVal;
  303. end;
  304. { --------------------------------------------------------------------
  305. TJSSVGAnimatedNumber
  306. --------------------------------------------------------------------}
  307. TJSSVGAnimatedNumber = class external name 'SVGAnimatedNumber'
  308. private
  309. FanimVal: Double; external name 'animVal';
  310. public
  311. baseVal: Double;
  312. property animVal: Double read FanimVal;
  313. end;
  314. { --------------------------------------------------------------------
  315. TJSSVGNumberList
  316. --------------------------------------------------------------------}
  317. TJSSVGNumberList = class external name 'SVGNumberList'
  318. public
  319. numberOfItems: Integer;
  320. procedure clear;
  321. function initialize(newItem: TJSSVGNumber): TJSSVGNumber;
  322. function getItem(&index: Integer): TJSSVGNumber;
  323. function insertItemBefore(newItem: TJSSVGNumber; &index: Integer): TJSSVGNumber;
  324. function replaceItem(newItem: TJSSVGNumber; &index: Integer): TJSSVGNumber;
  325. function removeItem(&index: Integer): TJSSVGNumber;
  326. function appendItem(newItem: TJSSVGNumber): TJSSVGNumber;
  327. end;
  328. { --------------------------------------------------------------------
  329. TJSSVGAnimatedNumberList
  330. --------------------------------------------------------------------}
  331. TJSSVGAnimatedNumberList = class external name 'SVGAnimatedNumberList'
  332. private
  333. FbaseVal: TJSSVGNumberList; external name 'baseVal';
  334. FanimVal: TJSSVGNumberList; external name 'animVal';
  335. public
  336. property baseVal: TJSSVGNumberList read FbaseVal;
  337. property animVal: TJSSVGNumberList read FanimVal;
  338. end;
  339. { --------------------------------------------------------------------
  340. TJSSVGAnimatedPreserveAspectRatio
  341. --------------------------------------------------------------------}
  342. TJSSVGAnimatedPreserveAspectRatio = class external name
  343. 'SVGAnimatedPreserveAspectRatio'
  344. private
  345. FbaseVal: TJSSVGPreserveAspectRatio; external name 'baseVal';
  346. FanimVal: TJSSVGPreserveAspectRatio; external name 'animVal';
  347. public
  348. property baseVal: TJSSVGPreserveAspectRatio read FbaseVal;
  349. property animVal: TJSSVGPreserveAspectRatio read FanimVal;
  350. end;
  351. { --------------------------------------------------------------------
  352. TJSSVGAnimatedRect
  353. --------------------------------------------------------------------}
  354. TJSSVGAnimatedRect = class external name 'SVGAnimatedRect'
  355. private
  356. FbaseVal: TJSSVGRect; external name 'baseVal';
  357. FanimVal: TJSSVGRect; external name 'animVal';
  358. public
  359. property baseVal: TJSSVGRect read FbaseVal;
  360. property animVal: TJSSVGRect read FanimVal;
  361. end;
  362. { --------------------------------------------------------------------
  363. TJSSVGAnimatedString
  364. --------------------------------------------------------------------}
  365. TJSSVGAnimatedString = class external name 'SVGAnimatedString'
  366. private
  367. FanimVal: string; external name 'animVal';
  368. public
  369. baseVal: string;
  370. property animVal: string read FanimVal;
  371. end;
  372. { --------------------------------------------------------------------
  373. TJSSVGTransformList
  374. --------------------------------------------------------------------}
  375. TJSSVGTransformList = class external name 'SVGTransformList'
  376. public
  377. numberOfItems: Integer;
  378. procedure clear;
  379. function initialize(newItem: TJSSVGTransform): TJSSVGTransform;
  380. function getItem(&index: Integer): TJSSVGTransform;
  381. function insertItemBefore(newItem: TJSSVGTransform; &index: Integer): TJSSVGTransform;
  382. function replaceItem(newItem: TJSSVGTransform; &index: Integer): TJSSVGTransform;
  383. function removeItem(&index: Integer): TJSSVGTransform;
  384. function appendItem(newItem: TJSSVGTransform): TJSSVGTransform;
  385. function createSVGTransformFromMatrix(matrix: TJSSVGMatrix): TJSSVGTransform;
  386. function consolidate: TJSSVGTransform;
  387. end;
  388. { --------------------------------------------------------------------
  389. TJSSVGAnimatedTransformList
  390. --------------------------------------------------------------------}
  391. TJSSVGAnimatedTransformList = class external name 'SVGAnimatedTransformList'
  392. private
  393. FbaseVal: TJSSVGTransformList; external name 'baseVal';
  394. FanimVal: TJSSVGTransformList; external name 'animVal';
  395. public
  396. property baseVal: TJSSVGTransformList read FbaseVal;
  397. property animVal: TJSSVGTransformList read FanimVal;
  398. end;
  399. { --------------------------------------------------------------------
  400. TJSSVGAnimationElement
  401. --------------------------------------------------------------------}
  402. TJSSVGAnimationElement = class external name 'SVGAnimationElement' (TJSSVGElement)
  403. private
  404. FtargetElement: TJSSVGElement; external name 'targetElement';
  405. public
  406. onbegin: TJSEventHandler;
  407. onend: TJSEventHandler;
  408. onrepeat: TJSEventHandler;
  409. function getStartTime: Double;
  410. function getCurrentTime: Double;
  411. function getSimpleDuration: Double;
  412. procedure beginElement;
  413. procedure beginElementAt(offset: Double);
  414. procedure endElement;
  415. procedure endElementAt(offset: Double);
  416. property targetElement: TJSSVGElement read FtargetElement;
  417. end;
  418. { --------------------------------------------------------------------
  419. TJSSVGAnimateElement
  420. --------------------------------------------------------------------}
  421. TJSSVGAnimateElement = class external name 'SVGAnimateElement' (TJSSVGAnimationElement)
  422. private
  423. public
  424. end;
  425. { --------------------------------------------------------------------
  426. TJSSVGAnimateMotionElement
  427. --------------------------------------------------------------------}
  428. TJSSVGAnimateMotionElement = class external name 'SVGAnimateMotionElement' (TJSSVGAnimationElement)
  429. private
  430. public
  431. end;
  432. { --------------------------------------------------------------------
  433. TJSSVGAnimateTransformElement
  434. --------------------------------------------------------------------}
  435. TJSSVGAnimateTransformElement = class external name
  436. 'SVGAnimateTransformElement' (TJSSVGAnimationElement)
  437. private
  438. public
  439. end;
  440. { --------------------------------------------------------------------
  441. TJSSVGGeometryElement
  442. --------------------------------------------------------------------}
  443. TJSSVGGeometryElement = class external name 'SVGGeometryElement' (TJSSVGGraphicsElement)
  444. private
  445. FpathLength: TJSSVGAnimatedNumber; external name 'pathLength';
  446. public
  447. function isPointInFill(point: TJSSVGPoint): boolean;
  448. function isPointInStroke(point: TJSSVGPoint): boolean;
  449. function getTotalLength: Double;
  450. function getPointAtLength(distance: Double): TJSSVGPoint;
  451. property pathLength: TJSSVGAnimatedNumber read FpathLength;
  452. end;
  453. { --------------------------------------------------------------------
  454. TJSSVGCircleElement
  455. --------------------------------------------------------------------}
  456. TJSSVGCircleElement = class external name 'SVGCircleElement' (TJSSVGGeometryElement)
  457. private
  458. Fcx: TJSSVGAnimatedLength; external name 'cx';
  459. Fcy: TJSSVGAnimatedLength; external name 'cy';
  460. Fr: TJSSVGAnimatedLength; external name 'r';
  461. public
  462. property cx: TJSSVGAnimatedLength read Fcx;
  463. property cy: TJSSVGAnimatedLength read Fcy;
  464. property r: TJSSVGAnimatedLength read Fr;
  465. end;
  466. { --------------------------------------------------------------------
  467. TJSSVGClipPathElement
  468. --------------------------------------------------------------------}
  469. TJSSVGClipPathElement = class external name
  470. 'SVGClipPathElement' (TJSSVGGraphicsElement)
  471. private
  472. FclipPathUnits: TJSSVGAnimatedEnumeration; external name 'clipPathUnits';
  473. public
  474. property clipPathUnits: TJSSVGAnimatedEnumeration read FclipPathUnits;
  475. end;
  476. { --------------------------------------------------------------------
  477. TJSSVGComponentTransferFunctionElement
  478. --------------------------------------------------------------------}
  479. TJSSVGComponentTransferFunctionElement = class external name
  480. 'SVGComponentTransferFunctionElement' (TJSSVGElement)
  481. private
  482. Ftype_: TJSSVGAnimatedEnumeration; external name 'type';
  483. FtableValues: TJSSVGAnimatedNumberList; external name 'tableValues';
  484. Fslope: TJSSVGAnimatedNumber; external name 'slope';
  485. Fintercept: TJSSVGAnimatedNumber; external name 'intercept';
  486. Famplitude: TJSSVGAnimatedNumber; external name 'amplitude';
  487. Fexponent: TJSSVGAnimatedNumber; external name 'exponent';
  488. Foffset: TJSSVGAnimatedNumber; external name 'offset';
  489. public
  490. const
  491. SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
  492. SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
  493. SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
  494. SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
  495. SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
  496. SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
  497. Public
  498. property type_: TJSSVGAnimatedEnumeration read Ftype_;
  499. property tableValues: TJSSVGAnimatedNumberList read FtableValues;
  500. property slope: TJSSVGAnimatedNumber read Fslope;
  501. property intercept: TJSSVGAnimatedNumber read Fintercept;
  502. property amplitude: TJSSVGAnimatedNumber read Famplitude;
  503. property exponent: TJSSVGAnimatedNumber read Fexponent;
  504. property offset: TJSSVGAnimatedNumber read Foffset;
  505. end;
  506. { --------------------------------------------------------------------
  507. TJSSVGDefsElement
  508. --------------------------------------------------------------------}
  509. TJSSVGDefsElement = class external name 'SVGDefsElement' (TJSSVGGraphicsElement)
  510. private
  511. public
  512. end;
  513. { --------------------------------------------------------------------
  514. TJSSVGDescElement
  515. --------------------------------------------------------------------}
  516. TJSSVGDescElement = class external name 'SVGDescElement' (TJSSVGElement)
  517. private
  518. public
  519. end;
  520. { --------------------------------------------------------------------
  521. TJSSVGDocument
  522. --------------------------------------------------------------------}
  523. TJSSVGDocument = class external name 'SVGDocument' (TJSDocument)
  524. public
  525. Ftitle: String; external name 'tile';
  526. Freferrer: String; external name 'referrer';
  527. Fdomain: String; external name 'domain';
  528. fURL: String; external name 'URL';
  529. rootElement: TJSSVGSVGElement;
  530. end;
  531. { --------------------------------------------------------------------
  532. TJSSVGDiscardElement
  533. --------------------------------------------------------------------}
  534. TJSSVGDiscardElement = class external name 'SVGDiscardElement' (TJSSVGElement)
  535. private
  536. public
  537. end;
  538. { --------------------------------------------------------------------
  539. TJSDocument
  540. --------------------------------------------------------------------}
  541. TJSDocument = class external name 'Document'
  542. private
  543. FrootElement: TJSSVGSVGElement; external name 'rootElement';
  544. public
  545. property rootElement: TJSSVGSVGElement read FrootElement;
  546. end;
  547. { --------------------------------------------------------------------
  548. TJSSVGEllipseElement
  549. --------------------------------------------------------------------}
  550. TJSSVGEllipseElement = class external name
  551. 'SVGEllipseElement' (TJSSVGGeometryElement)
  552. private
  553. Fcx: TJSSVGAnimatedLength; external name 'cx';
  554. Fcy: TJSSVGAnimatedLength; external name 'cy';
  555. Frx: TJSSVGAnimatedLength; external name 'rx';
  556. Fry: TJSSVGAnimatedLength; external name 'ry';
  557. public
  558. property cx: TJSSVGAnimatedLength read Fcx;
  559. property cy: TJSSVGAnimatedLength read Fcy;
  560. property rx: TJSSVGAnimatedLength read Frx;
  561. property ry: TJSSVGAnimatedLength read Fry;
  562. end;
  563. { --------------------------------------------------------------------
  564. TJSSVGFEBlendElement
  565. --------------------------------------------------------------------}
  566. TJSSVGFEBlendElement = class external name 'SVGFEBlendElement' (TJSSVGElement)
  567. private
  568. Fin1: TJSSVGAnimatedString; external name 'in1';
  569. Fin2: TJSSVGAnimatedString; external name 'in2';
  570. Fmode: TJSSVGAnimatedEnumeration; external name 'mode';
  571. public
  572. const
  573. SVG_FEBLEND_MODE_UNKNOWN = 0;
  574. SVG_FEBLEND_MODE_NORMAL = 1;
  575. SVG_FEBLEND_MODE_MULTIPLY = 2;
  576. SVG_FEBLEND_MODE_SCREEN = 3;
  577. SVG_FEBLEND_MODE_DARKEN = 4;
  578. SVG_FEBLEND_MODE_LIGHTEN = 5;
  579. Public
  580. property in1: TJSSVGAnimatedString read Fin1;
  581. property in2: TJSSVGAnimatedString read Fin2;
  582. property mode: TJSSVGAnimatedEnumeration read Fmode;
  583. end;
  584. { --------------------------------------------------------------------
  585. TJSSVGFEColorMatrixElement
  586. --------------------------------------------------------------------}
  587. TJSSVGFEColorMatrixElement = class external name
  588. 'SVGFEColorMatrixElement' (TJSSVGElement)
  589. private
  590. Fin1: TJSSVGAnimatedString; external name 'in1';
  591. Ftype_: TJSSVGAnimatedEnumeration; external name 'type';
  592. Fvalues: TJSSVGAnimatedNumberList; external name 'values';
  593. public
  594. const
  595. SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
  596. SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
  597. SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
  598. SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
  599. SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
  600. Public
  601. property in1: TJSSVGAnimatedString read Fin1;
  602. property type_: TJSSVGAnimatedEnumeration read Ftype_;
  603. property values: TJSSVGAnimatedNumberList read Fvalues;
  604. end;
  605. { --------------------------------------------------------------------
  606. TJSSVGFEComponentTransferElement
  607. --------------------------------------------------------------------}
  608. TJSSVGFEComponentTransferElement = class external name
  609. 'SVGFEComponentTransferElement' (TJSSVGElement)
  610. private
  611. Fin1: TJSSVGAnimatedString; external name 'in1';
  612. public
  613. property in1: TJSSVGAnimatedString read Fin1;
  614. end;
  615. { --------------------------------------------------------------------
  616. TJSSVGFECompositeElement
  617. --------------------------------------------------------------------}
  618. TJSSVGFECompositeElement = class external name
  619. 'SVGFECompositeElement' (TJSSVGElement)
  620. private
  621. Fin2: TJSSVGAnimatedString; external name 'in2';
  622. Fin1: TJSSVGAnimatedString; external name 'in1';
  623. Foperator_: TJSSVGAnimatedEnumeration; external name 'operator';
  624. Fk1: TJSSVGAnimatedNumber; external name 'k1';
  625. Fk2: TJSSVGAnimatedNumber; external name 'k2';
  626. Fk3: TJSSVGAnimatedNumber; external name 'k3';
  627. Fk4: TJSSVGAnimatedNumber; external name 'k4';
  628. public
  629. const
  630. SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
  631. SVG_FECOMPOSITE_OPERATOR_OVER = 1;
  632. SVG_FECOMPOSITE_OPERATOR_IN = 2;
  633. SVG_FECOMPOSITE_OPERATOR_OUT = 3;
  634. SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
  635. SVG_FECOMPOSITE_OPERATOR_XOR = 5;
  636. SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
  637. Public
  638. property in2: TJSSVGAnimatedString read Fin2;
  639. property in1: TJSSVGAnimatedString read Fin1;
  640. property operator_: TJSSVGAnimatedEnumeration read Foperator_;
  641. property k1: TJSSVGAnimatedNumber read Fk1;
  642. property k2: TJSSVGAnimatedNumber read Fk2;
  643. property k3: TJSSVGAnimatedNumber read Fk3;
  644. property k4: TJSSVGAnimatedNumber read Fk4;
  645. end;
  646. { --------------------------------------------------------------------
  647. TJSSVGFEConvolveMatrixElement
  648. --------------------------------------------------------------------}
  649. TJSSVGFEConvolveMatrixElement = class external name
  650. 'SVGFEConvolveMatrixElement' (TJSSVGElement)
  651. private
  652. Fin1: TJSSVGAnimatedString; external name 'in1';
  653. ForderX: TJSSVGAnimatedInteger; external name 'orderX';
  654. ForderY: TJSSVGAnimatedInteger; external name 'orderY';
  655. FkernelMatrix: TJSSVGAnimatedNumberList; external name 'kernelMatrix';
  656. Fdivisor: TJSSVGAnimatedNumber; external name 'divisor';
  657. Fbias: TJSSVGAnimatedNumber; external name 'bias';
  658. FtargetX: TJSSVGAnimatedInteger; external name 'targetX';
  659. FtargetY: TJSSVGAnimatedInteger; external name 'targetY';
  660. FedgeMode: TJSSVGAnimatedEnumeration; external name 'edgeMode';
  661. FkernelUnitLengthX: TJSSVGAnimatedNumber; external name 'kernelUnitLengthX';
  662. FkernelUnitLengthY: TJSSVGAnimatedNumber; external name 'kernelUnitLengthY';
  663. FpreserveAlpha: TJSSVGAnimatedBoolean; external name 'preserveAlpha';
  664. public
  665. const
  666. SVG_EDGEMODE_UNKNOWN = 0;
  667. SVG_EDGEMODE_DUPLICATE = 1;
  668. SVG_EDGEMODE_WRAP = 2;
  669. SVG_EDGEMODE_NONE = 3;
  670. Public
  671. property in1: TJSSVGAnimatedString read Fin1;
  672. property orderX: TJSSVGAnimatedInteger read ForderX;
  673. property orderY: TJSSVGAnimatedInteger read ForderY;
  674. property kernelMatrix: TJSSVGAnimatedNumberList read FkernelMatrix;
  675. property divisor: TJSSVGAnimatedNumber read Fdivisor;
  676. property bias: TJSSVGAnimatedNumber read Fbias;
  677. property targetX: TJSSVGAnimatedInteger read FtargetX;
  678. property targetY: TJSSVGAnimatedInteger read FtargetY;
  679. property edgeMode: TJSSVGAnimatedEnumeration read FedgeMode;
  680. property kernelUnitLengthX: TJSSVGAnimatedNumber read FkernelUnitLengthX;
  681. property kernelUnitLengthY: TJSSVGAnimatedNumber read FkernelUnitLengthY;
  682. property preserveAlpha: TJSSVGAnimatedBoolean read FpreserveAlpha;
  683. end;
  684. { --------------------------------------------------------------------
  685. TJSSVGFEDiffuseLightingElement
  686. --------------------------------------------------------------------}
  687. TJSSVGFEDiffuseLightingElement = class external name
  688. 'SVGFEDiffuseLightingElement' (TJSSVGElement)
  689. private
  690. Fin1: TJSSVGAnimatedString; external name 'in1';
  691. FsurfaceScale: TJSSVGAnimatedNumber; external name 'surfaceScale';
  692. FdiffuseConstant: TJSSVGAnimatedNumber; external name 'diffuseConstant';
  693. FkernelUnitLengthX: TJSSVGAnimatedNumber; external name 'kernelUnitLengthX';
  694. FkernelUnitLengthY: TJSSVGAnimatedNumber; external name 'kernelUnitLengthY';
  695. public
  696. property in1: TJSSVGAnimatedString read Fin1;
  697. property surfaceScale: TJSSVGAnimatedNumber read FsurfaceScale;
  698. property diffuseConstant: TJSSVGAnimatedNumber read FdiffuseConstant;
  699. property kernelUnitLengthX: TJSSVGAnimatedNumber read FkernelUnitLengthX;
  700. property kernelUnitLengthY: TJSSVGAnimatedNumber read FkernelUnitLengthY;
  701. end;
  702. { --------------------------------------------------------------------
  703. TJSSVGFEDisplacementMapElement
  704. --------------------------------------------------------------------}
  705. TJSSVGFEDisplacementMapElement = class external name
  706. 'SVGFEDisplacementMapElement' (TJSSVGElement)
  707. private
  708. Fin1: TJSSVGAnimatedString; external name 'in1';
  709. Fin2: TJSSVGAnimatedString; external name 'in2';
  710. Fscale: TJSSVGAnimatedNumber; external name 'scale';
  711. FxChannelSelector: TJSSVGAnimatedEnumeration; external name 'xChannelSelector';
  712. FyChannelSelector: TJSSVGAnimatedEnumeration; external name 'yChannelSelector';
  713. public
  714. const
  715. SVG_CHANNEL_UNKNOWN = 0;
  716. SVG_CHANNEL_R = 1;
  717. SVG_CHANNEL_G = 2;
  718. SVG_CHANNEL_B = 3;
  719. SVG_CHANNEL_A = 4;
  720. Public
  721. property in1: TJSSVGAnimatedString read Fin1;
  722. property in2: TJSSVGAnimatedString read Fin2;
  723. property scale: TJSSVGAnimatedNumber read Fscale;
  724. property xChannelSelector: TJSSVGAnimatedEnumeration read FxChannelSelector;
  725. property yChannelSelector: TJSSVGAnimatedEnumeration read FyChannelSelector;
  726. end;
  727. { --------------------------------------------------------------------
  728. TJSSVGFEDistantLightElement
  729. --------------------------------------------------------------------}
  730. TJSSVGFEDistantLightElement = class external name
  731. 'SVGFEDistantLightElement' (TJSSVGElement)
  732. private
  733. Fazimuth: TJSSVGAnimatedNumber; external name 'azimuth';
  734. Felevation: TJSSVGAnimatedNumber; external name 'elevation';
  735. public
  736. property azimuth: TJSSVGAnimatedNumber read Fazimuth;
  737. property elevation: TJSSVGAnimatedNumber read Felevation;
  738. end;
  739. { --------------------------------------------------------------------
  740. TJSSVGFEDropShadowElement
  741. --------------------------------------------------------------------}
  742. TJSSVGFEDropShadowElement = class external name
  743. 'SVGFEDropShadowElement' (TJSSVGElement)
  744. private
  745. Fin1: TJSSVGAnimatedString; external name 'in1';
  746. Fdx: TJSSVGAnimatedNumber; external name 'dx';
  747. Fdy: TJSSVGAnimatedNumber; external name 'dy';
  748. FstdDeviationX: TJSSVGAnimatedNumber; external name 'stdDeviationX';
  749. FstdDeviationY: TJSSVGAnimatedNumber; external name 'stdDeviationY';
  750. public
  751. procedure setStdDeviation(stdDeviationX: Double; stdDeviationY: Double);
  752. property in1: TJSSVGAnimatedString read Fin1;
  753. property dx: TJSSVGAnimatedNumber read Fdx;
  754. property dy: TJSSVGAnimatedNumber read Fdy;
  755. property stdDeviationX: TJSSVGAnimatedNumber read FstdDeviationX;
  756. property stdDeviationY: TJSSVGAnimatedNumber read FstdDeviationY;
  757. end;
  758. { --------------------------------------------------------------------
  759. TJSSVGFEFloodElement
  760. --------------------------------------------------------------------}
  761. TJSSVGFEFloodElement = class external name 'SVGFEFloodElement' (TJSSVGElement)
  762. private
  763. public
  764. end;
  765. { --------------------------------------------------------------------
  766. TJSSVGFEFuncAElement
  767. --------------------------------------------------------------------}
  768. TJSSVGFEFuncAElement = class external name
  769. 'SVGFEFuncAElement' (TJSSVGComponentTransferFunctionElement)
  770. private
  771. public
  772. end;
  773. { --------------------------------------------------------------------
  774. TJSSVGFEFuncBElement
  775. --------------------------------------------------------------------}
  776. TJSSVGFEFuncBElement = class external name
  777. 'SVGFEFuncBElement' (TJSSVGComponentTransferFunctionElement)
  778. private
  779. public
  780. end;
  781. { --------------------------------------------------------------------
  782. TJSSVGFEFuncGElement
  783. --------------------------------------------------------------------}
  784. TJSSVGFEFuncGElement = class external name
  785. 'SVGFEFuncGElement' (TJSSVGComponentTransferFunctionElement)
  786. private
  787. public
  788. end;
  789. { --------------------------------------------------------------------
  790. TJSSVGFEFuncRElement
  791. --------------------------------------------------------------------}
  792. TJSSVGFEFuncRElement = class external name
  793. 'SVGFEFuncRElement' (TJSSVGComponentTransferFunctionElement)
  794. private
  795. public
  796. end;
  797. { --------------------------------------------------------------------
  798. TJSSVGFEGaussianBlurElement
  799. --------------------------------------------------------------------}
  800. TJSSVGFEGaussianBlurElement = class external name
  801. 'SVGFEGaussianBlurElement' (TJSSVGElement)
  802. private
  803. Fin1: TJSSVGAnimatedString; external name 'in1';
  804. FstdDeviationX: TJSSVGAnimatedNumber; external name 'stdDeviationX';
  805. FstdDeviationY: TJSSVGAnimatedNumber; external name 'stdDeviationY';
  806. public
  807. procedure setStdDeviation(stdDeviationX: Double; stdDeviationY: Double);
  808. property in1: TJSSVGAnimatedString read Fin1;
  809. property stdDeviationX: TJSSVGAnimatedNumber read FstdDeviationX;
  810. property stdDeviationY: TJSSVGAnimatedNumber read FstdDeviationY;
  811. end;
  812. { --------------------------------------------------------------------
  813. TJSSVGFEImageElement
  814. --------------------------------------------------------------------}
  815. TJSSVGFEImageElement = class external name 'SVGFEImageElement' (TJSSVGElement)
  816. private
  817. FpreserveAspectRatio: TJSSVGAnimatedPreserveAspectRatio; external name
  818. 'preserveAspectRatio';
  819. public
  820. property preserveAspectRatio: TJSSVGAnimatedPreserveAspectRatio read
  821. FpreserveAspectRatio;
  822. end;
  823. { --------------------------------------------------------------------
  824. TJSSVGFEMergeElement
  825. --------------------------------------------------------------------}
  826. TJSSVGFEMergeElement = class external name 'SVGFEMergeElement' (TJSSVGElement)
  827. private
  828. public
  829. end;
  830. { --------------------------------------------------------------------
  831. TJSSVGFEMergeNodeElement
  832. --------------------------------------------------------------------}
  833. TJSSVGFEMergeNodeElement = class external name
  834. 'SVGFEMergeNodeElement' (TJSSVGElement)
  835. private
  836. Fin1: TJSSVGAnimatedString; external name 'in1';
  837. public
  838. property in1: TJSSVGAnimatedString read Fin1;
  839. end;
  840. { --------------------------------------------------------------------
  841. TJSSVGFEMorphologyElement
  842. --------------------------------------------------------------------}
  843. TJSSVGFEMorphologyElement = class external name
  844. 'SVGFEMorphologyElement' (TJSSVGElement)
  845. private
  846. Fin1: TJSSVGAnimatedString; external name 'in1';
  847. Foperator_: TJSSVGAnimatedEnumeration; external name 'operator';
  848. FradiusX: TJSSVGAnimatedNumber; external name 'radiusX';
  849. FradiusY: TJSSVGAnimatedNumber; external name 'radiusY';
  850. public
  851. const
  852. SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
  853. SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
  854. SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
  855. Public
  856. property in1: TJSSVGAnimatedString read Fin1;
  857. property operator_: TJSSVGAnimatedEnumeration read Foperator_;
  858. property radiusX: TJSSVGAnimatedNumber read FradiusX;
  859. property radiusY: TJSSVGAnimatedNumber read FradiusY;
  860. end;
  861. { --------------------------------------------------------------------
  862. TJSSVGFEOffsetElement
  863. --------------------------------------------------------------------}
  864. TJSSVGFEOffsetElement = class external name 'SVGFEOffsetElement' (TJSSVGElement)
  865. private
  866. Fin1: TJSSVGAnimatedString; external name 'in1';
  867. Fdx: TJSSVGAnimatedNumber; external name 'dx';
  868. Fdy: TJSSVGAnimatedNumber; external name 'dy';
  869. public
  870. property in1: TJSSVGAnimatedString read Fin1;
  871. property dx: TJSSVGAnimatedNumber read Fdx;
  872. property dy: TJSSVGAnimatedNumber read Fdy;
  873. end;
  874. { --------------------------------------------------------------------
  875. TJSSVGFEPointLightElement
  876. --------------------------------------------------------------------}
  877. TJSSVGFEPointLightElement = class external name
  878. 'SVGFEPointLightElement' (TJSSVGElement)
  879. private
  880. Fx: TJSSVGAnimatedNumber; external name 'x';
  881. Fy: TJSSVGAnimatedNumber; external name 'y';
  882. Fz: TJSSVGAnimatedNumber; external name 'z';
  883. public
  884. property x: TJSSVGAnimatedNumber read Fx;
  885. property y: TJSSVGAnimatedNumber read Fy;
  886. property z: TJSSVGAnimatedNumber read Fz;
  887. end;
  888. { --------------------------------------------------------------------
  889. TJSSVGFESpecularLightingElement
  890. --------------------------------------------------------------------}
  891. TJSSVGFESpecularLightingElement = class external name
  892. 'SVGFESpecularLightingElement' (TJSSVGElement)
  893. private
  894. Fin1: TJSSVGAnimatedString; external name 'in1';
  895. FsurfaceScale: TJSSVGAnimatedNumber; external name 'surfaceScale';
  896. FspecularConstant: TJSSVGAnimatedNumber; external name 'specularConstant';
  897. FspecularExponent: TJSSVGAnimatedNumber; external name 'specularExponent';
  898. FkernelUnitLengthX: TJSSVGAnimatedNumber; external name 'kernelUnitLengthX';
  899. FkernelUnitLengthY: TJSSVGAnimatedNumber; external name 'kernelUnitLengthY';
  900. public
  901. property in1: TJSSVGAnimatedString read Fin1;
  902. property surfaceScale: TJSSVGAnimatedNumber read FsurfaceScale;
  903. property specularConstant: TJSSVGAnimatedNumber read FspecularConstant;
  904. property specularExponent: TJSSVGAnimatedNumber read FspecularExponent;
  905. property kernelUnitLengthX: TJSSVGAnimatedNumber read FkernelUnitLengthX;
  906. property kernelUnitLengthY: TJSSVGAnimatedNumber read FkernelUnitLengthY;
  907. end;
  908. { --------------------------------------------------------------------
  909. TJSSVGFESpotLightElement
  910. --------------------------------------------------------------------}
  911. TJSSVGFESpotLightElement = class external name
  912. 'SVGFESpotLightElement' (TJSSVGElement)
  913. private
  914. Fx: TJSSVGAnimatedNumber; external name 'x';
  915. Fy: TJSSVGAnimatedNumber; external name 'y';
  916. Fz: TJSSVGAnimatedNumber; external name 'z';
  917. FpointsAtX: TJSSVGAnimatedNumber; external name 'pointsAtX';
  918. FpointsAtY: TJSSVGAnimatedNumber; external name 'pointsAtY';
  919. FpointsAtZ: TJSSVGAnimatedNumber; external name 'pointsAtZ';
  920. FspecularExponent: TJSSVGAnimatedNumber; external name 'specularExponent';
  921. FlimitingConeAngle: TJSSVGAnimatedNumber; external name 'limitingConeAngle';
  922. public
  923. property x: TJSSVGAnimatedNumber read Fx;
  924. property y: TJSSVGAnimatedNumber read Fy;
  925. property z: TJSSVGAnimatedNumber read Fz;
  926. property pointsAtX: TJSSVGAnimatedNumber read FpointsAtX;
  927. property pointsAtY: TJSSVGAnimatedNumber read FpointsAtY;
  928. property pointsAtZ: TJSSVGAnimatedNumber read FpointsAtZ;
  929. property specularExponent: TJSSVGAnimatedNumber read FspecularExponent;
  930. property limitingConeAngle: TJSSVGAnimatedNumber read FlimitingConeAngle;
  931. end;
  932. { --------------------------------------------------------------------
  933. TJSSVGFETileElement
  934. --------------------------------------------------------------------}
  935. TJSSVGFETileElement = class external name 'SVGFETileElement' (TJSSVGElement)
  936. private
  937. Fin1: TJSSVGAnimatedString; external name 'in1';
  938. public
  939. property in1: TJSSVGAnimatedString read Fin1;
  940. end;
  941. { --------------------------------------------------------------------
  942. TJSSVGFETurbulenceElement
  943. --------------------------------------------------------------------}
  944. TJSSVGFETurbulenceElement = class external name
  945. 'SVGFETurbulenceElement' (TJSSVGElement)
  946. private
  947. FbaseFrequencyX: TJSSVGAnimatedNumber; external name 'baseFrequencyX';
  948. FbaseFrequencyY: TJSSVGAnimatedNumber; external name 'baseFrequencyY';
  949. FnumOctaves: TJSSVGAnimatedInteger; external name 'numOctaves';
  950. Fseed: TJSSVGAnimatedNumber; external name 'seed';
  951. FstitchTiles: TJSSVGAnimatedEnumeration; external name 'stitchTiles';
  952. Ftype_: TJSSVGAnimatedEnumeration; external name 'type';
  953. public
  954. const
  955. SVG_TURBULENCE_TYPE_UNKNOWN = 0;
  956. SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
  957. SVG_TURBULENCE_TYPE_TURBULENCE = 2;
  958. SVG_STITCHTYPE_UNKNOWN = 0;
  959. SVG_STITCHTYPE_STITCH = 1;
  960. SVG_STITCHTYPE_NOSTITCH = 2;
  961. Public
  962. property baseFrequencyX: TJSSVGAnimatedNumber read FbaseFrequencyX;
  963. property baseFrequencyY: TJSSVGAnimatedNumber read FbaseFrequencyY;
  964. property numOctaves: TJSSVGAnimatedInteger read FnumOctaves;
  965. property seed: TJSSVGAnimatedNumber read Fseed;
  966. property stitchTiles: TJSSVGAnimatedEnumeration read FstitchTiles;
  967. property type_: TJSSVGAnimatedEnumeration read Ftype_;
  968. end;
  969. { --------------------------------------------------------------------
  970. TJSSVGFilterElement
  971. --------------------------------------------------------------------}
  972. TJSSVGFilterElement = class external name 'SVGFilterElement' (TJSSVGElement)
  973. private
  974. FfilterUnits: TJSSVGAnimatedEnumeration; external name 'filterUnits';
  975. FprimitiveUnits: TJSSVGAnimatedEnumeration; external name 'primitiveUnits';
  976. Fx: TJSSVGAnimatedLength; external name 'x';
  977. Fy: TJSSVGAnimatedLength; external name 'y';
  978. Fwidth: TJSSVGAnimatedLength; external name 'width';
  979. Fheight: TJSSVGAnimatedLength; external name 'height';
  980. public
  981. property filterUnits: TJSSVGAnimatedEnumeration read FfilterUnits;
  982. property primitiveUnits: TJSSVGAnimatedEnumeration read FprimitiveUnits;
  983. property x: TJSSVGAnimatedLength read Fx;
  984. property y: TJSSVGAnimatedLength read Fy;
  985. property width: TJSSVGAnimatedLength read Fwidth;
  986. property height: TJSSVGAnimatedLength read Fheight;
  987. end;
  988. { --------------------------------------------------------------------
  989. TJSSVGFilterPrimitiveStandardAttributes
  990. --------------------------------------------------------------------}
  991. TJSSVGFilterPrimitiveStandardAttributes = class external name
  992. 'SVGFilterPrimitiveStandardAttributes'
  993. private
  994. Fx: TJSSVGAnimatedLength; external name 'x';
  995. Fy: TJSSVGAnimatedLength; external name 'y';
  996. Fwidth: TJSSVGAnimatedLength; external name 'width';
  997. Fheight: TJSSVGAnimatedLength; external name 'height';
  998. Fresult: TJSSVGAnimatedString; external name 'result';
  999. public
  1000. property x: TJSSVGAnimatedLength read Fx;
  1001. property y: TJSSVGAnimatedLength read Fy;
  1002. property width: TJSSVGAnimatedLength read Fwidth;
  1003. property height: TJSSVGAnimatedLength read Fheight;
  1004. property result: TJSSVGAnimatedString read Fresult;
  1005. end;
  1006. { --------------------------------------------------------------------
  1007. TJSSVGFitToViewBox
  1008. --------------------------------------------------------------------}
  1009. TJSSVGFitToViewBox = class external name 'SVGFitToViewBox'
  1010. private
  1011. FviewBox: TJSSVGAnimatedRect; external name 'viewBox';
  1012. FpreserveAspectRatio: TJSSVGAnimatedPreserveAspectRatio; external name
  1013. 'preserveAspectRatio';
  1014. public
  1015. property viewBox: TJSSVGAnimatedRect read FviewBox;
  1016. property preserveAspectRatio: TJSSVGAnimatedPreserveAspectRatio read
  1017. FpreserveAspectRatio;
  1018. end;
  1019. { --------------------------------------------------------------------
  1020. TJSSVGForeignObjectElement
  1021. --------------------------------------------------------------------}
  1022. TJSSVGForeignObjectElement = class external name
  1023. 'SVGForeignObjectElement' (TJSSVGGraphicsElement)
  1024. private
  1025. Fx: TJSSVGAnimatedLength; external name 'x';
  1026. Fy: TJSSVGAnimatedLength; external name 'y';
  1027. Fwidth: TJSSVGAnimatedLength; external name 'width';
  1028. Fheight: TJSSVGAnimatedLength; external name 'height';
  1029. public
  1030. property x: TJSSVGAnimatedLength read Fx;
  1031. property y: TJSSVGAnimatedLength read Fy;
  1032. property width: TJSSVGAnimatedLength read Fwidth;
  1033. property height: TJSSVGAnimatedLength read Fheight;
  1034. end;
  1035. { --------------------------------------------------------------------
  1036. TJSSVGGElement
  1037. --------------------------------------------------------------------}
  1038. TJSSVGGElement = class external name 'SVGGElement' (TJSSVGGraphicsElement)
  1039. private
  1040. public
  1041. end;
  1042. { --------------------------------------------------------------------
  1043. TJSSVGGradientElement
  1044. --------------------------------------------------------------------}
  1045. TJSSVGGradientElement = class external name 'SVGGradientElement' (TJSSVGElement)
  1046. private
  1047. FgradientUnits: TJSSVGAnimatedEnumeration; external name 'gradientUnits';
  1048. FgradientTransform: TJSSVGAnimatedTransformList; external name
  1049. 'gradientTransform';
  1050. FspreadMethod: TJSSVGAnimatedEnumeration; external name 'spreadMethod';
  1051. public
  1052. const
  1053. SVG_SPREADMETHOD_UNKNOWN = 0;
  1054. SVG_SPREADMETHOD_PAD = 1;
  1055. SVG_SPREADMETHOD_REFLECT = 2;
  1056. SVG_SPREADMETHOD_REPEAT = 3;
  1057. Public
  1058. property gradientUnits: TJSSVGAnimatedEnumeration read FgradientUnits;
  1059. property gradientTransform: TJSSVGAnimatedTransformList read FgradientTransform;
  1060. property spreadMethod: TJSSVGAnimatedEnumeration read FspreadMethod;
  1061. end;
  1062. { --------------------------------------------------------------------
  1063. TJSSVGImageElement
  1064. --------------------------------------------------------------------}
  1065. TJSSVGImageElement = class external name 'SVGImageElement' (TJSSVGGraphicsElement)
  1066. private
  1067. Fx: TJSSVGAnimatedLength; external name 'x';
  1068. Fy: TJSSVGAnimatedLength; external name 'y';
  1069. Fwidth: TJSSVGAnimatedLength; external name 'width';
  1070. Fheight: TJSSVGAnimatedLength; external name 'height';
  1071. FpreserveAspectRatio: TJSSVGAnimatedPreserveAspectRatio; external name
  1072. 'preserveAspectRatio';
  1073. public
  1074. property x: TJSSVGAnimatedLength read Fx;
  1075. property y: TJSSVGAnimatedLength read Fy;
  1076. property width: TJSSVGAnimatedLength read Fwidth;
  1077. property height: TJSSVGAnimatedLength read Fheight;
  1078. property preserveAspectRatio: TJSSVGAnimatedPreserveAspectRatio read
  1079. FpreserveAspectRatio;
  1080. end;
  1081. { --------------------------------------------------------------------
  1082. TJSSVGLength
  1083. --------------------------------------------------------------------}
  1084. TJSSVGLength = class external name 'SVGLength'
  1085. private
  1086. FunitType: Cardinal; external name 'unitType';
  1087. public
  1088. const
  1089. SVG_LENGTHTYPE_UNKNOWN = 0;
  1090. SVG_LENGTHTYPE_NUMBER = 1;
  1091. SVG_LENGTHTYPE_PERCENTAGE = 2;
  1092. SVG_LENGTHTYPE_EMS = 3;
  1093. SVG_LENGTHTYPE_EXS = 4;
  1094. SVG_LENGTHTYPE_PX = 5;
  1095. SVG_LENGTHTYPE_CM = 6;
  1096. SVG_LENGTHTYPE_MM = 7;
  1097. SVG_LENGTHTYPE_IN = 8;
  1098. SVG_LENGTHTYPE_PT = 9;
  1099. SVG_LENGTHTYPE_PC = 10;
  1100. Public
  1101. value: Double;
  1102. valueInSpecifiedUnits: Double;
  1103. valueAsString: string;
  1104. procedure newValueSpecifiedUnits(unitType: Cardinal; valueInSpecifiedUnits: Double);
  1105. procedure convertToSpecifiedUnits(unitType: Cardinal);
  1106. property unitType: Cardinal read FunitType;
  1107. end;
  1108. { --------------------------------------------------------------------
  1109. TJSSVGLinearGradientElement
  1110. --------------------------------------------------------------------}
  1111. TJSSVGLinearGradientElement = class external name
  1112. 'SVGLinearGradientElement' (TJSSVGGradientElement)
  1113. private
  1114. Fx1: TJSSVGAnimatedLength; external name 'x1';
  1115. Fy1: TJSSVGAnimatedLength; external name 'y1';
  1116. Fx2: TJSSVGAnimatedLength; external name 'x2';
  1117. Fy2: TJSSVGAnimatedLength; external name 'y2';
  1118. public
  1119. property x1: TJSSVGAnimatedLength read Fx1;
  1120. property y1: TJSSVGAnimatedLength read Fy1;
  1121. property x2: TJSSVGAnimatedLength read Fx2;
  1122. property y2: TJSSVGAnimatedLength read Fy2;
  1123. end;
  1124. { --------------------------------------------------------------------
  1125. TJSSVGLineElement
  1126. --------------------------------------------------------------------}
  1127. TJSSVGLineElement = class external name 'SVGLineElement' (TJSSVGGeometryElement)
  1128. private
  1129. Fx1: TJSSVGAnimatedLength; external name 'x1';
  1130. Fy1: TJSSVGAnimatedLength; external name 'y1';
  1131. Fx2: TJSSVGAnimatedLength; external name 'x2';
  1132. Fy2: TJSSVGAnimatedLength; external name 'y2';
  1133. public
  1134. property x1: TJSSVGAnimatedLength read Fx1;
  1135. property y1: TJSSVGAnimatedLength read Fy1;
  1136. property x2: TJSSVGAnimatedLength read Fx2;
  1137. property y2: TJSSVGAnimatedLength read Fy2;
  1138. end;
  1139. { --------------------------------------------------------------------
  1140. TJSSVGMarkerElement
  1141. --------------------------------------------------------------------}
  1142. TJSSVGMarkerElement = class external name 'SVGMarkerElement' (TJSSVGElement)
  1143. private
  1144. FrefX: TJSSVGAnimatedLength; external name 'refX';
  1145. FrefY: TJSSVGAnimatedLength; external name 'refY';
  1146. FmarkerUnits: TJSSVGAnimatedEnumeration; external name 'markerUnits';
  1147. FmarkerWidth: TJSSVGAnimatedLength; external name 'markerWidth';
  1148. FmarkerHeight: TJSSVGAnimatedLength; external name 'markerHeight';
  1149. ForientType: TJSSVGAnimatedEnumeration; external name 'orientType';
  1150. ForientAngle: TJSSVGAnimatedAngle; external name 'orientAngle';
  1151. public
  1152. const
  1153. SVG_MARKERUNITS_UNKNOWN = 0;
  1154. SVG_MARKERUNITS_USERSPACEONUSE = 1;
  1155. SVG_MARKERUNITS_STROKEWIDTH = 2;
  1156. SVG_MARKER_ORIENT_UNKNOWN = 0;
  1157. SVG_MARKER_ORIENT_AUTO = 1;
  1158. SVG_MARKER_ORIENT_ANGLE = 2;
  1159. Public
  1160. procedure setOrientToAuto;
  1161. procedure setOrientToAngle(angle: TJSSVGAngle);
  1162. property refX: TJSSVGAnimatedLength read FrefX;
  1163. property refY: TJSSVGAnimatedLength read FrefY;
  1164. property markerUnits: TJSSVGAnimatedEnumeration read FmarkerUnits;
  1165. property markerWidth: TJSSVGAnimatedLength read FmarkerWidth;
  1166. property markerHeight: TJSSVGAnimatedLength read FmarkerHeight;
  1167. property orientType: TJSSVGAnimatedEnumeration read ForientType;
  1168. property orientAngle: TJSSVGAnimatedAngle read ForientAngle;
  1169. end;
  1170. { --------------------------------------------------------------------
  1171. TJSSVGMaskElement
  1172. --------------------------------------------------------------------}
  1173. TJSSVGMaskElement = class external name 'SVGMaskElement' (TJSSVGElement)
  1174. private
  1175. FmaskUnits: TJSSVGAnimatedEnumeration; external name 'maskUnits';
  1176. FmaskContentUnits: TJSSVGAnimatedEnumeration; external name 'maskContentUnits';
  1177. Fx: TJSSVGAnimatedLength; external name 'x';
  1178. Fy: TJSSVGAnimatedLength; external name 'y';
  1179. Fwidth: TJSSVGAnimatedLength; external name 'width';
  1180. Fheight: TJSSVGAnimatedLength; external name 'height';
  1181. public
  1182. property maskUnits: TJSSVGAnimatedEnumeration read FmaskUnits;
  1183. property maskContentUnits: TJSSVGAnimatedEnumeration read FmaskContentUnits;
  1184. property x: TJSSVGAnimatedLength read Fx;
  1185. property y: TJSSVGAnimatedLength read Fy;
  1186. property width: TJSSVGAnimatedLength read Fwidth;
  1187. property height: TJSSVGAnimatedLength read Fheight;
  1188. end;
  1189. { --------------------------------------------------------------------
  1190. TJSSVGMatrix
  1191. --------------------------------------------------------------------}
  1192. TJSSVGMatrix = class external name 'SVGMatrix'
  1193. private
  1194. public
  1195. a: double;
  1196. b: double;
  1197. c: double;
  1198. d: double;
  1199. e: double;
  1200. f: double;
  1201. function multiply(secondMatrix: TJSSVGMatrix): TJSSVGMatrix;
  1202. function inverse: TJSSVGMatrix;
  1203. function translate(x: Double; y: Double): TJSSVGMatrix;
  1204. function scale(scaleFactor: Double): TJSSVGMatrix;
  1205. function scaleNonUniform(scaleFactorX: Double; scaleFactorY: Double):
  1206. TJSSVGMatrix;
  1207. function rotate(angle: Double): TJSSVGMatrix;
  1208. function rotateFromVector(x: Double; y: Double): TJSSVGMatrix;
  1209. function flipX: TJSSVGMatrix;
  1210. function flipY: TJSSVGMatrix;
  1211. function skewX(angle: Double): TJSSVGMatrix;
  1212. function skewY(angle: Double): TJSSVGMatrix;
  1213. end;
  1214. { --------------------------------------------------------------------
  1215. TJSSVGMetadataElement
  1216. --------------------------------------------------------------------}
  1217. TJSSVGMetadataElement = class external name 'SVGMetadataElement' (TJSSVGElement)
  1218. private
  1219. public
  1220. end;
  1221. { --------------------------------------------------------------------
  1222. TJSSVGMPathElement
  1223. --------------------------------------------------------------------}
  1224. TJSSVGMPathElement = class external name 'SVGMPathElement' (TJSSVGElement)
  1225. private
  1226. public
  1227. end;
  1228. { --------------------------------------------------------------------
  1229. TJSSVGNumber
  1230. --------------------------------------------------------------------}
  1231. TJSSVGNumber = class external name 'SVGNumber'
  1232. private
  1233. public
  1234. value: Double;
  1235. end;
  1236. { --------------------------------------------------------------------
  1237. TJSSVGPathElement
  1238. --------------------------------------------------------------------}
  1239. TJSSVGPathElement = class external name 'SVGPathElement' (TJSSVGGeometryElement)
  1240. private
  1241. public
  1242. function getPathSegAtLength(distance: Double): NativeInt;
  1243. end;
  1244. { --------------------------------------------------------------------
  1245. TJSSVGPatternElement
  1246. --------------------------------------------------------------------}
  1247. TJSSVGPatternElement = class external name 'SVGPatternElement' (TJSSVGElement)
  1248. private
  1249. FpatternUnits: TJSSVGAnimatedEnumeration; external name 'patternUnits';
  1250. FpatternContentUnits: TJSSVGAnimatedEnumeration; external name
  1251. 'patternContentUnits';
  1252. FpatternTransform: TJSSVGAnimatedTransformList; external name
  1253. 'patternTransform';
  1254. Fx: TJSSVGAnimatedLength; external name 'x';
  1255. Fy: TJSSVGAnimatedLength; external name 'y';
  1256. Fwidth: TJSSVGAnimatedLength; external name 'width';
  1257. Fheight: TJSSVGAnimatedLength; external name 'height';
  1258. public
  1259. property patternUnits: TJSSVGAnimatedEnumeration read FpatternUnits;
  1260. property patternContentUnits: TJSSVGAnimatedEnumeration read
  1261. FpatternContentUnits;
  1262. property patternTransform: TJSSVGAnimatedTransformList read FpatternTransform;
  1263. property x: TJSSVGAnimatedLength read Fx;
  1264. property y: TJSSVGAnimatedLength read Fy;
  1265. property width: TJSSVGAnimatedLength read Fwidth;
  1266. property height: TJSSVGAnimatedLength read Fheight;
  1267. end;
  1268. { --------------------------------------------------------------------
  1269. TJSSVGPoint
  1270. --------------------------------------------------------------------}
  1271. TJSSVGPoint = class external name 'SVGPoint'
  1272. private
  1273. public
  1274. x: Double;
  1275. y: Double;
  1276. function matrixTransform(matrix: TJSSVGMatrix): TJSSVGPoint;
  1277. end;
  1278. { --------------------------------------------------------------------
  1279. TJSSVGPointList
  1280. --------------------------------------------------------------------}
  1281. TJSSVGPointList = class external name 'SVGPointList'
  1282. public
  1283. numberOfItems: Integer;
  1284. procedure clear;
  1285. function initialize(newItem: TJSSVGPoint): TJSSVGPoint;
  1286. function getItem(&index: Integer): TJSSVGPoint;
  1287. function insertItemBefore(newItem: TJSSVGPoint; &index: Integer): TJSSVGPoint;
  1288. function replaceItem(newItem: TJSSVGPoint; &index: Integer): TJSSVGPoint;
  1289. function removeItem(&index: Integer): TJSSVGPoint;
  1290. function appendItem(newItem: TJSSVGPoint): TJSSVGPoint;
  1291. end;
  1292. { --------------------------------------------------------------------
  1293. TJSSVGPolygonElement
  1294. --------------------------------------------------------------------}
  1295. TJSSVGPolygonElement = class external name
  1296. 'SVGPolygonElement' (TJSSVGGeometryElement)
  1297. private
  1298. Fpoints: TJSSVGPointList; external name 'points';
  1299. FanimatedPoints: TJSSVGPointList; external name 'animatedPoints';
  1300. public
  1301. property points: TJSSVGPointList read Fpoints;
  1302. property animatedPoints: TJSSVGPointList read FanimatedPoints;
  1303. end;
  1304. { --------------------------------------------------------------------
  1305. TJSSVGPolylineElement
  1306. --------------------------------------------------------------------}
  1307. TJSSVGPolylineElement = class external name
  1308. 'SVGPolylineElement' (TJSSVGGeometryElement)
  1309. private
  1310. Fpoints: TJSSVGPointList; external name 'points';
  1311. FanimatedPoints: TJSSVGPointList; external name 'animatedPoints';
  1312. public
  1313. property points: TJSSVGPointList read Fpoints;
  1314. property animatedPoints: TJSSVGPointList read FanimatedPoints;
  1315. end;
  1316. { --------------------------------------------------------------------
  1317. TJSSVGPreserveAspectRatio
  1318. --------------------------------------------------------------------}
  1319. TJSSVGPreserveAspectRatio = class external name 'SVGPreserveAspectRatio'
  1320. private
  1321. public
  1322. const
  1323. SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
  1324. SVG_PRESERVEASPECTRATIO_NONE = 1;
  1325. SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
  1326. SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
  1327. SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
  1328. SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
  1329. SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
  1330. SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
  1331. SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
  1332. SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
  1333. SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
  1334. SVG_MEETORSLICE_UNKNOWN = 0;
  1335. SVG_MEETORSLICE_MEET = 1;
  1336. SVG_MEETORSLICE_SLICE = 2;
  1337. Public
  1338. align: Cardinal;
  1339. meetOrSlice: Cardinal;
  1340. end;
  1341. { --------------------------------------------------------------------
  1342. TJSSVGRadialGradientElement
  1343. --------------------------------------------------------------------}
  1344. TJSSVGRadialGradientElement = class external name
  1345. 'SVGRadialGradientElement' (TJSSVGGradientElement)
  1346. private
  1347. Fcx: TJSSVGAnimatedLength; external name 'cx';
  1348. Fcy: TJSSVGAnimatedLength; external name 'cy';
  1349. rFr: TJSSVGAnimatedLength; external name 'r';
  1350. Ffx: TJSSVGAnimatedLength; external name 'fx';
  1351. Ffy: TJSSVGAnimatedLength; external name 'fy';
  1352. Ffr: TJSSVGAnimatedLength; external name 'fr';
  1353. public
  1354. property cx: TJSSVGAnimatedLength read Fcx;
  1355. property cy: TJSSVGAnimatedLength read Fcy;
  1356. property r: TJSSVGAnimatedLength read rFr;
  1357. property fx: TJSSVGAnimatedLength read Ffx;
  1358. property fy: TJSSVGAnimatedLength read Ffy;
  1359. property fr: TJSSVGAnimatedLength read Ffr;
  1360. end;
  1361. { --------------------------------------------------------------------
  1362. TJSSVGRect
  1363. --------------------------------------------------------------------}
  1364. TJSSVGRect = class external name 'SVGRect'
  1365. private
  1366. public
  1367. x: Double;
  1368. y: Double;
  1369. width: Double;
  1370. height: Double;
  1371. end;
  1372. { --------------------------------------------------------------------
  1373. TJSSVGRectElement
  1374. --------------------------------------------------------------------}
  1375. TJSSVGRectElement = class external name 'SVGRectElement' (TJSSVGGeometryElement)
  1376. private
  1377. Fx: TJSSVGAnimatedLength; external name 'x';
  1378. Fy: TJSSVGAnimatedLength; external name 'y';
  1379. Fwidth: TJSSVGAnimatedLength; external name 'width';
  1380. Fheight: TJSSVGAnimatedLength; external name 'height';
  1381. Frx: TJSSVGAnimatedLength; external name 'rx';
  1382. Fry: TJSSVGAnimatedLength; external name 'ry';
  1383. public
  1384. property x: TJSSVGAnimatedLength read Fx;
  1385. property y: TJSSVGAnimatedLength read Fy;
  1386. property width: TJSSVGAnimatedLength read Fwidth;
  1387. property height: TJSSVGAnimatedLength read Fheight;
  1388. property rx: TJSSVGAnimatedLength read Frx;
  1389. property ry: TJSSVGAnimatedLength read Fry;
  1390. end;
  1391. { --------------------------------------------------------------------
  1392. TJSSVGScriptElement
  1393. --------------------------------------------------------------------}
  1394. TJSSVGScriptElement = class external name 'SVGScriptElement' (TJSSVGElement)
  1395. private
  1396. public
  1397. type_: string; external name 'type';
  1398. end;
  1399. { --------------------------------------------------------------------
  1400. TJSSVGSetElement
  1401. --------------------------------------------------------------------}
  1402. TJSSVGSetElement = class external name 'SVGSetElement' (TJSSVGAnimationElement)
  1403. private
  1404. public
  1405. end;
  1406. { --------------------------------------------------------------------
  1407. TJSSVGStopElement
  1408. --------------------------------------------------------------------}
  1409. TJSSVGStopElement = class external name 'SVGStopElement' (TJSSVGElement)
  1410. private
  1411. Foffset: TJSSVGAnimatedNumber; external name 'offset';
  1412. public
  1413. property offset: TJSSVGAnimatedNumber read Foffset;
  1414. end;
  1415. { --------------------------------------------------------------------
  1416. TJSSVGStyleElement
  1417. --------------------------------------------------------------------}
  1418. TJSSVGStyleElement = class external name 'SVGStyleElement' (TJSSVGElement)
  1419. private
  1420. Fsheet: TJSStyleSheet; external name 'sheet';
  1421. public
  1422. type_: string; external name 'type';
  1423. media: string;
  1424. title: string;
  1425. disabled: boolean;
  1426. property sheet: TJSStyleSheet read Fsheet;
  1427. end;
  1428. { --------------------------------------------------------------------
  1429. TJSSVGSwitchElement
  1430. --------------------------------------------------------------------}
  1431. TJSSVGSwitchElement = class external name
  1432. 'SVGSwitchElement' (TJSSVGGraphicsElement)
  1433. private
  1434. public
  1435. end;
  1436. { --------------------------------------------------------------------
  1437. TJSSVGSymbolElement
  1438. --------------------------------------------------------------------}
  1439. TJSSVGSymbolElement = class external name 'SVGSymbolElement' (TJSSVGElement)
  1440. private
  1441. public
  1442. end;
  1443. { --------------------------------------------------------------------
  1444. TJSSVGStringList
  1445. --------------------------------------------------------------------}
  1446. TJSSVGStringList = class external name 'SVGStringList'
  1447. public
  1448. numberOfItems: Integer;
  1449. procedure clear;
  1450. function initialize(newItem: String): String;
  1451. function getItem(&index: Integer): String;
  1452. function insertItemBefore(newItem: String; &index: Integer): String;
  1453. function replaceItem(newItem: String; &index: Integer): String;
  1454. function removeItem(&index: Integer): String;
  1455. function appendItem(newItem: String): String;
  1456. end;
  1457. { --------------------------------------------------------------------
  1458. TJSSVGTests
  1459. --------------------------------------------------------------------}
  1460. TJSSVGTests = class external name 'SVGTests'
  1461. private
  1462. FrequiredExtensions: TJSSVGStringList; external name 'requiredExtensions';
  1463. FsystemLanguage: TJSSVGStringList; external name 'systemLanguage';
  1464. public
  1465. property requiredExtensions: TJSSVGStringList read FrequiredExtensions;
  1466. property systemLanguage: TJSSVGStringList read FsystemLanguage;
  1467. end;
  1468. { --------------------------------------------------------------------
  1469. TJSSVGTextContentElement
  1470. --------------------------------------------------------------------}
  1471. TJSSVGTextContentElement = class external name
  1472. 'SVGTextContentElement' (TJSSVGGraphicsElement)
  1473. private
  1474. FtextLength: TJSSVGAnimatedLength; external name 'textLength';
  1475. FlengthAdjust: TJSSVGAnimatedEnumeration; external name 'lengthAdjust';
  1476. public
  1477. const
  1478. LENGTHADJUST_UNKNOWN = 0;
  1479. LENGTHADJUST_SPACING = 1;
  1480. LENGTHADJUST_SPACINGANDGLYPHS = 2;
  1481. Public
  1482. function getNumberOfChars: Integer;
  1483. function getComputedTextLength: Double;
  1484. function getSubStringLength(charnum: NativeInt; nchars: NativeInt): Double;
  1485. function getStartPositionOfChar(charnum: NativeInt): TJSSVGPoint;
  1486. function getEndPositionOfChar(charnum: NativeInt): TJSSVGPoint;
  1487. function getExtentOfChar(charnum: NativeInt): TJSSVGRect;
  1488. function getRotationOfChar(charnum: NativeInt): Double;
  1489. function getCharNumAtPosition(point: TJSSVGPoint): Integer;
  1490. procedure selectSubString(charnum: NativeInt; nchars: NativeInt);
  1491. property textLength: TJSSVGAnimatedLength read FtextLength;
  1492. property lengthAdjust: TJSSVGAnimatedEnumeration read FlengthAdjust;
  1493. end;
  1494. { --------------------------------------------------------------------
  1495. TJSSVGTextPositioningElement
  1496. --------------------------------------------------------------------}
  1497. TJSSVGTextPositioningElement = class external name
  1498. 'SVGTextPositioningElement' (TJSSVGTextContentElement)
  1499. private
  1500. Fx: TJSSVGAnimatedLengthList; external name 'x';
  1501. Fy: TJSSVGAnimatedLengthList; external name 'y';
  1502. Fdx: TJSSVGAnimatedLengthList; external name 'dx';
  1503. Fdy: TJSSVGAnimatedLengthList; external name 'dy';
  1504. Frotate: TJSSVGAnimatedNumberList; external name 'rotate';
  1505. public
  1506. property x: TJSSVGAnimatedLengthList read Fx;
  1507. property y: TJSSVGAnimatedLengthList read Fy;
  1508. property dx: TJSSVGAnimatedLengthList read Fdx;
  1509. property dy: TJSSVGAnimatedLengthList read Fdy;
  1510. property rotate: TJSSVGAnimatedNumberList read Frotate;
  1511. end;
  1512. { --------------------------------------------------------------------
  1513. TJSSVGTextElement
  1514. --------------------------------------------------------------------}
  1515. TJSSVGTextElement = class external name 'SVGTextElement' (TJSSVGTextPositioningElement)
  1516. private
  1517. public
  1518. end;
  1519. { --------------------------------------------------------------------
  1520. TJSSVGTextPathElement
  1521. --------------------------------------------------------------------}
  1522. TJSSVGTextPathElement = class external name
  1523. 'SVGTextPathElement' (TJSSVGTextContentElement)
  1524. private
  1525. FstartOffset: TJSSVGAnimatedLength; external name 'startOffset';
  1526. Fmethod: TJSSVGAnimatedEnumeration; external name 'method';
  1527. Fspacing: TJSSVGAnimatedEnumeration; external name 'spacing';
  1528. public
  1529. const
  1530. TEXTPATH_METHODTYPE_UNKNOWN = 0;
  1531. TEXTPATH_METHODTYPE_ALIGN = 1;
  1532. TEXTPATH_METHODTYPE_STRETCH = 2;
  1533. TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
  1534. TEXTPATH_SPACINGTYPE_AUTO = 1;
  1535. TEXTPATH_SPACINGTYPE_EXACT = 2;
  1536. Public
  1537. property startOffset: TJSSVGAnimatedLength read FstartOffset;
  1538. property method: TJSSVGAnimatedEnumeration read Fmethod;
  1539. property spacing: TJSSVGAnimatedEnumeration read Fspacing;
  1540. end;
  1541. { --------------------------------------------------------------------
  1542. TJSSVGTitleElement
  1543. --------------------------------------------------------------------}
  1544. TJSSVGTitleElement = class external name 'SVGTitleElement' (TJSSVGElement)
  1545. private
  1546. public
  1547. end;
  1548. { --------------------------------------------------------------------
  1549. TJSSVGTransform
  1550. --------------------------------------------------------------------}
  1551. TJSSVGTransform = class external name 'SVGTransform'
  1552. private
  1553. Ftype_: Cardinal; external name 'type';
  1554. Fmatrix: TJSSVGMatrix; external name 'matrix';
  1555. Fangle: Double; external name 'angle';
  1556. public
  1557. const
  1558. SVG_TRANSFORM_UNKNOWN = 0;
  1559. SVG_TRANSFORM_MATRIX = 1;
  1560. SVG_TRANSFORM_TRANSLATE = 2;
  1561. SVG_TRANSFORM_SCALE = 3;
  1562. SVG_TRANSFORM_ROTATE = 4;
  1563. SVG_TRANSFORM_SKEWX = 5;
  1564. SVG_TRANSFORM_SKEWY = 6;
  1565. Public
  1566. procedure setMatrix(matrix: TJSSVGMatrix);
  1567. procedure setTranslate(tx: Double; ty: Double);
  1568. procedure setScale(sx: Double; sy: Double);
  1569. procedure setRotate(angle: Double; cx: Double; cy: Double);
  1570. procedure setSkewX(angle: Double);
  1571. procedure setSkewY(angle: Double);
  1572. property type_: Cardinal read Ftype_;
  1573. property matrix: TJSSVGMatrix read Fmatrix;
  1574. property angle: Double read Fangle;
  1575. end;
  1576. { --------------------------------------------------------------------
  1577. TJSSVGTSpanElement
  1578. --------------------------------------------------------------------}
  1579. TJSSVGTSpanElement = class external name
  1580. 'SVGTSpanElement' (TJSSVGTextPositioningElement)
  1581. private
  1582. public
  1583. end;
  1584. { --------------------------------------------------------------------
  1585. TJSSVGUnitTypes
  1586. --------------------------------------------------------------------}
  1587. TJSSVGUnitTypes = class external name 'SVGUnitTypes'
  1588. private
  1589. public
  1590. const
  1591. SVG_UNIT_TYPE_UNKNOWN = 0;
  1592. SVG_UNIT_TYPE_USERSPACEONUSE = 1;
  1593. SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
  1594. Public
  1595. end;
  1596. { --------------------------------------------------------------------
  1597. TJSSVGURIReference
  1598. --------------------------------------------------------------------}
  1599. TJSSVGURIReference = class external name 'SVGURIReference'
  1600. private
  1601. Fhref: TJSSVGAnimatedString; external name 'href';
  1602. public
  1603. property href: TJSSVGAnimatedString read Fhref;
  1604. end;
  1605. { --------------------------------------------------------------------
  1606. TJSSVGUseElement
  1607. --------------------------------------------------------------------}
  1608. TJSSVGUseElement = class external name 'SVGUseElement' (TJSSVGGraphicsElement)
  1609. private
  1610. Fx: TJSSVGAnimatedLength; external name 'x';
  1611. Fy: TJSSVGAnimatedLength; external name 'y';
  1612. Fwidth: TJSSVGAnimatedLength; external name 'width';
  1613. Fheight: TJSSVGAnimatedLength; external name 'height';
  1614. public
  1615. property x: TJSSVGAnimatedLength read Fx;
  1616. property y: TJSSVGAnimatedLength read Fy;
  1617. property width: TJSSVGAnimatedLength read Fwidth;
  1618. property height: TJSSVGAnimatedLength read Fheight;
  1619. end;
  1620. { --------------------------------------------------------------------
  1621. TJSSVGViewElement
  1622. --------------------------------------------------------------------}
  1623. TJSSVGViewElement = class external name 'SVGViewElement' (TJSSVGElement)
  1624. private
  1625. public
  1626. end;
  1627. { --------------------------------------------------------------------
  1628. TJSSVGZoomAndPan
  1629. --------------------------------------------------------------------}
  1630. TJSSVGZoomAndPan = class external name 'SVGZoomAndPan'
  1631. private
  1632. public
  1633. const
  1634. SVG_ZOOMANDPAN_UNKNOWN = 0;
  1635. SVG_ZOOMANDPAN_DISABLE = 1;
  1636. SVG_ZOOMANDPAN_MAGNIFY = 2;
  1637. Public
  1638. zoomAndPan: Cardinal;
  1639. end;
  1640. implementation
  1641. end.