blockly > blockRendering > RenderInfo > القياس
setRendering.RenderInfo.measure()
عليك تعبئة هذا الكائن بجميع معلومات الحجم اللازمة لرسم القطعة.
لا يؤدي تمريرة القياس هذه إلى نشر التغييرات إلى الكتلة (على الرغم من أن الحقول قد تختار العرض عند استدعاء getSize()). ومع ذلك، قد يكون تكرار الاتصال به مكلفًا.
Signature:
measure(): void;
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `blockRendering.RenderInfo.measure()` method calculates and stores the dimensions required to render a block."],["This method populates the RenderInfo object with sizing data without directly updating the block's visual representation, though it may trigger field rerendering."],["While crucial for rendering, repeatedly calling `measure()` can impact performance due to its computational cost."]]],["The `measure()` method within the `blockRendering.RenderInfo` class calculates and stores the necessary sizing data for rendering a block. This process doesn't alter the block itself, although fields might rerender upon size retrieval. It's important to note that repeated calls to `measure()` can be resource-intensive. The method takes no parameters and returns nothing (void). Its primary function is to determine and populate the sizing information required for block drawing.\n"]]