Class Image

  • All Implemented Interfaces:
    kotlin.Cloneable

    
    public class Image
    extends Block
                        
    • Method Detail

      • setup

         Boolean setup(PolyUI polyUI)

        give this a PolyUI reference.

        You can also use this method to do some calculations (such as text widths) that are not dependent on other sizes, or operations that require access to PolyUI things, like PolyUI.settings or PolyUI.translator

        this method is called once, and only once.

      • calculateSize

         Vec2 calculateSize()

        Use this function to calculate the size of this component. DO NOT include children in this calculation!

        This function is only called if no size is supplied to this component at initialization. A return value of null indicates this component is not able to infer its own size, as it is for example, a Block with no reference. A component such as Text on the other hand, is able to infer its own size.

        This function is only ever called if sizeValid is false.

      • debugString

         String debugString()

        Override this function to add things to the debug display of this component.

        Since:

        1.1.1

      • extraToString

         <Error class: unknown class> extraToString()

        Supply extra information to the toString representation of this object. Keep it short.

        Since:

        1.7.1