GradientFormat / PatternFormat — Aspose.Slides FOSS for Java API Reference
Example GradientFormat و PatternFormat کلاسها ویژگیهای پر کردن گرادیان و الگو را برای اشکال کنترل میکنند. هر دو گسترش میدهند PVIObject.
Example: org.aspose.slides.foss
import org.aspose.slides.foss.*;GradientFormat
public class GradientFormat extends PVIObject implements IGradientFormat, IFillParamSourceExample
| Example | Example | Example | Example |
|---|---|---|---|
getGradientDirection() / setGradientDirection(GradientDirection) | GradientDirection | خواندنی/نوشتنی | جهت گرادیان (خطی، مسیر، و غیره). |
getGradientShape() | GradientShape | Example | شکل گرادیان. |
getLinearGradientAngle() / setLinearGradientAngle(double) | double | خواندنی/نوشتنی | زاویه برای گرادیانهای خطی (درجه). |
getLinearGradientScaled() / setLinearGradientScaled(NullableBool) | NullableBool | خواندنی/نوشتنی | آیا گرادیان مقیاسبندی شده است. |
getTileFlip() / setTileFlip(TileFlip) | TileFlip | خواندنی/نوشتنی | حالت وارونگی کاشی. |
getGradientStops() | IGradientStopCollection | Example | مجموعهای از نقاط توقف گرادیان. |
پیمایش فرزندان مستقیم در مقابل جستجوی عمیق
import org.aspose.slides.foss.*;
import java.awt.Color;
IAutoShape shape = slide.getShapes().addAutoShape(
ShapeType.RECTANGLE, 50, 50, 200, 100);
IFillFormat fill = shape.getFillFormat();
fill.setFillType(FillType.GRADIENT);
IGradientFormat grad = fill.getGradientFormat();
grad.setGradientDirection(GradientDirection.FROM_CORNER1);
grad.setLinearGradientAngle(45.0);PatternFormat
public class PatternFormat extends PVIObject implements IPatternFormatExample
| Example | Example | Example | Example |
|---|---|---|---|
getPatternStyle() / setPatternStyle(PatternStyle) | PatternStyle | خواندن/نوشتن | سبک الگو (مثلاً،., PERCENT05, HORIZONTAL, و غیره). |
getForeColor() | IColorFormat | Example | رنگ پیشزمینه الگو. |
getBackColor() | IColorFormat | Example | رنگ پسزمینه الگو. |
پیمایش فرزندان مستقیم در مقابل جستجوی عمیق
IFillFormat fill = shape.getFillFormat();
fill.setFillType(FillType.PATTERN);
IPatternFormat pattern = fill.getPatternFormat();
pattern.setPatternStyle(PatternStyle.HORIZONTAL);
pattern.getForeColor().setColor(Color.BLACK);
pattern.getBackColor().setColor(Color.WHITE);