Image control inside OpenGL context. Size is automatically adjusted to the image size, if Stretch is False (default). You should set TCastleImageControl.Left, TCastleImageControl.Bottom properties, and load your image by setting TCastleImageControl.URL property or straight TCastleImageControl.Image.
We automatically use alpha test or alpha blending based on loaded image alpha channel (see TGLImage.Alpha). You can influence this by AlphaChannel property.
Image displayed, or Nil if none. This image is owned by this component. If you set this property to your custom TCastleImage instance you should leave memory management of this instance to this component. If necessary, you can always create a copy by TCastleImage.MakeCopy if you want to give here only a copy.
It is allowed to modify the contents or even size of this image. Just make sure to call ImageChanged after the modifications are done to update the actual rendered image. The control size will be updated immediately (respecing current Stretch and related properties).
property URL: string read FURL write SetURL;
URL of the image. Setting this also sets Image. Set this to '' to clear the image.
How to treat alpha channel of the assigned image. By default, this is acAuto, which means that image contents determine how the alpha of image is treated (opaque, alpha test, alpha blending). Set this to force specific treatment.
If Stretch = False, then values you set for Width, Height, FullSize, Proportional properties do not matter (they are still remembered though, so you can set properties in any order). The displayed size (you can check it through Rect function) always corresponds to the underlying image size. The Left and Bottom properties work as usual, they allow you to move the control.
If Stretch = True, then the image will be stretched to fill the requested area.
If Stretch = True and FullSize = True then values of Width, Height, Left, Bottom do not matter: image always fills the whole container (Rect corresponds to the container area).
Otherwise, if Stretch = True and Proportional = True, then the image will be proportionally scaled to fit within the requested Width and Height. If the aspect ratio of image will be different than aspect ratio of Width/Height, the scaled image will be centered inside the Width/Height.
Otherwise, if Stretch = True but no other condition (so FullSize = False and Proportional = False) then the image will be scaled to exactly fill the requested Width and Height (without paying attention to the aspect ratio of the image).
This is the case when you fully force the displayed size and position, regardless of image size. Displayed image will always exactly fill the requested area.
Note that you can always look at Rect value to know the current calculated size and position of the image control on screen.