調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >blockRendering >ドロワー >描画
blockRendering.Drawer.draw() メソッド
ブロックをワークスペースに描画します。ここでは「drawing」を使用します。SVG パス要素を設定し、画面上のフィールド、アイコン、接続を移動することを意味します。
パスは「ステップ」の配列としてプッシュされ、スペースで結合され、ブロックに直接設定されます。読みやすくするためにステップがスペースで区切られることが保証されますが、必須ではありません。
署名:
draw(): void;
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-29 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-08-29 UTC。"],[[["The `blockRendering.Drawer.draw()` method visually renders a block on the workspace by manipulating SVG elements for its shape, fields, icons, and connections."],["This method achieves the visual representation by constructing SVG paths, dividing them into \"steps,\" and applying them directly to the block element for clear and readable rendering."],["The process focuses on updating the visual aspects of the block on the workspace without returning any specific value."]]],["The `draw()` method, part of the `blockRendering.Drawer` class, is responsible for rendering a block onto the workspace. This involves setting SVG path elements and positioning fields, icons, and connections. The method constructs the block's path by pushing path segments into \"steps\" arrays. These steps are then joined with spaces and assigned directly to the block. The method does not take any arguments and does not return anything.\n"]]