Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
blockly > utils > Koordinatör > çeviri
utils.coordinate.translate() yöntemi
Bu koordinatı, verilen ofsetlere göre çevirir. tıklayın.
İmza:
translate(tx: number, ty: number): Coordinate;
Parametreler
Parametre |
Tür |
Açıklama |
tx |
sayı |
X'in çevrileceği değer. |
ty |
sayı |
Y'ye çevrilecek değer. |
Şunu döndürür:
Koordinatör
Çeviriden sonraki koordinat.
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: 2025-07-25 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-25 UTC."],[],["The `translate()` method within the `Coordinate` class shifts a coordinate's position. It accepts two numerical parameters: `tx` and `ty`. `tx` determines the horizontal shift, while `ty` dictates the vertical shift. The method then returns a new `Coordinate` object reflecting the translated position. This effectively modifies the coordinate by the specified x and y offsets.\n"]]