ImageFill
گزینه های نمایش تصویر ممکن برای تأثیرگذاری بر ارائه تصویر. این باید برای زمانی استفاده شود که نسبت تصویر با نسبت تصویر ظرف تصویر مطابقت نداشته باشد.
Enums |
---|
UNSPECIFIED | ImageFill نامشخص است. |
GRAY | شکاف بین تصویر و محفظه تصویر را با نوارهای خاکستری پر کنید. |
WHITE | شکاف بین تصویر و محفظه تصویر را با نوارهای سفید پر کنید. |
CROPPED | تصویر به گونه ای مقیاس بندی می شود که عرض و ارتفاع تصویر با ابعاد ظرف مطابقت داشته باشد یا بیشتر از آن باشد. اگر ارتفاع تصویر کوچکشده بیشتر از ارتفاع ظرف باشد، ممکن است بالا و پایین تصویر را برش دهد، یا اگر عرض تصویر مقیاسشده از عرض ظرف بیشتر باشد، سمت چپ و راست تصویر را برش دهد. این شبیه به "حالت زوم" در تلویزیون با صفحه عریض هنگام پخش یک ویدیوی 4:3 است. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["Image display options control how an image is presented within its container, especially when aspect ratios differ."],["Options include filling the surrounding space with gray or white bars or cropping the image to fit."],["`CROPPED` scales the image to fill the container, potentially cropping parts that extend beyond its boundaries, similar to \"Zoom Mode\" on a widescreen TV."],["Developers can choose an option to optimize image presentation based on the specific needs of their website or application."]]],["The provided information outlines image display options when an image's aspect ratio differs from its container. `GRAY` and `WHITE` options fill the resulting gaps with gray or white bars, respectively. `CROPPED` scales the image to match or exceed container dimensions, potentially cropping the top/bottom or left/right edges. An `UNSPECIFIED` option exists, but its behavior is undefined. These settings control how the image is presented within its designated container.\n"]]