blockly > browserEvents > mouseToSvg
browserEvents.mouseToSvg() işlevi
Belirli bir fare etkinliğinin dönüştürülmüş koordinatlarını döndürür. Kaynak (0,0), Blockly SVG'nin sol üst köşesidir.
İmza:
export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;
Parametreler
Parametre |
Tür |
Açıklama |
e |
MouseEvent |
Fare etkinliği. |
svg |
SVGSVGElement |
SVG öğesi. |
matrix |
SVGMatrisi | boş |
Kullanılacak ters ekran CTM'si. |
Şunu döndürür:
SVGPoint
.x ve .y özelliklerine sahip nesne.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-08-21 UTC.
[null,null,["Son güncelleme tarihi: 2024-08-21 UTC."],[[["`browserEvents.mouseToSvg()` converts mouse event coordinates to SVG coordinates relative to the Blockly SVG's top-left corner."],["The function takes a MouseEvent, an SVGSVGElement, and an optional inverted screen CTM as input."],["It returns an SVGPoint object containing the converted x and y coordinates."]]],[]]