|
@@ -97,6 +97,22 @@ public:
|
|
|
/// @param[in] geometry The application-specific compiled geometry to release.
|
|
/// @param[in] geometry The application-specific compiled geometry to release.
|
|
|
virtual void ReleaseCompiledGeometry(CompiledGeometryHandle geometry);
|
|
virtual void ReleaseCompiledGeometry(CompiledGeometryHandle geometry);
|
|
|
|
|
|
|
|
|
|
+ /// Called by RmlUi when a texture is required by the library.
|
|
|
|
|
+ /// @param[out] texture_handle The handle to write the texture handle for the loaded texture to.
|
|
|
|
|
+ /// @param[out] texture_dimensions The variable to write the dimensions of the loaded texture.
|
|
|
|
|
+ /// @param[in] source The application-defined image source, joined with the path of the referencing document.
|
|
|
|
|
+ /// @return True if the load attempt succeeded and the handle and dimensions are valid, false if not.
|
|
|
|
|
+ virtual bool LoadTexture(TextureHandle& texture_handle, Vector2i& texture_dimensions, const String& source);
|
|
|
|
|
+ /// Called by RmlUi when a texture is required to be built from an internally-generated sequence of pixels.
|
|
|
|
|
+ /// @param[out] texture_handle The handle to write the texture handle for the generated texture to.
|
|
|
|
|
+ /// @param[in] source The raw texture data. Each pixel is made up of four 8-bit values, red, green, blue, and premultiplied alpha, in that order.
|
|
|
|
|
+ /// @param[in] source_dimensions The dimensions, in pixels, of the source data.
|
|
|
|
|
+ /// @return True if the texture generation succeeded and the handle is valid, false if not.
|
|
|
|
|
+ virtual bool GenerateTexture(TextureHandle& texture_handle, const byte* source, const Vector2i& source_dimensions);
|
|
|
|
|
+ /// Called by RmlUi when a loaded texture is no longer required.
|
|
|
|
|
+ /// @param[in] texture The texture handle to release.
|
|
|
|
|
+ virtual void ReleaseTexture(TextureHandle texture);
|
|
|
|
|
+
|
|
|
/// Called by RmlUi when it wants to enable or disable scissoring to clip content.
|
|
/// Called by RmlUi when it wants to enable or disable scissoring to clip content.
|
|
|
/// @param[in] enable True if scissoring is to enabled, false if it is to be disabled.
|
|
/// @param[in] enable True if scissoring is to enabled, false if it is to be disabled.
|
|
|
virtual void EnableScissorRegion(bool enable) = 0;
|
|
virtual void EnableScissorRegion(bool enable) = 0;
|
|
@@ -107,6 +123,10 @@ public:
|
|
|
/// @param[in] height The height of the scissored region. All pixels to below (y + height) should be clipped.
|
|
/// @param[in] height The height of the scissored region. All pixels to below (y + height) should be clipped.
|
|
|
virtual void SetScissorRegion(int x, int y, int width, int height) = 0;
|
|
virtual void SetScissorRegion(int x, int y, int width, int height) = 0;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ @name Remaining functions are optional to implement for advanced effects.
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
/// Called by RmlUi when it wants to enable or disable the clip mask.
|
|
/// Called by RmlUi when it wants to enable or disable the clip mask.
|
|
|
/// @param[in] enable True if the clip mask is to be enabled, false if it is to be disabled.
|
|
/// @param[in] enable True if the clip mask is to be enabled, false if it is to be disabled.
|
|
|
/// @note When enabled, the clip mask should hide any rendered contents outside the area of the mask.
|
|
/// @note When enabled, the clip mask should hide any rendered contents outside the area of the mask.
|
|
@@ -117,22 +137,6 @@ public:
|
|
|
/// @param[in] translation The translation to apply to the geometry.
|
|
/// @param[in] translation The translation to apply to the geometry.
|
|
|
virtual void RenderToClipMask(ClipMaskOperation operation, CompiledGeometryHandle geometry, Vector2f translation);
|
|
virtual void RenderToClipMask(ClipMaskOperation operation, CompiledGeometryHandle geometry, Vector2f translation);
|
|
|
|
|
|
|
|
- /// Called by RmlUi when a texture is required by the library.
|
|
|
|
|
- /// @param[out] texture_handle The handle to write the texture handle for the loaded texture to.
|
|
|
|
|
- /// @param[out] texture_dimensions The variable to write the dimensions of the loaded texture.
|
|
|
|
|
- /// @param[in] source The application-defined image source, joined with the path of the referencing document.
|
|
|
|
|
- /// @return True if the load attempt succeeded and the handle and dimensions are valid, false if not.
|
|
|
|
|
- virtual bool LoadTexture(TextureHandle& texture_handle, Vector2i& texture_dimensions, const String& source);
|
|
|
|
|
- /// Called by RmlUi when a texture is required to be built from an internally-generated sequence of pixels.
|
|
|
|
|
- /// @param[out] texture_handle The handle to write the texture handle for the generated texture to.
|
|
|
|
|
- /// @param[in] source The raw texture data. Each pixel is made up of four 8-bit values, red, green, blue, and premultiplied alpha, in that order.
|
|
|
|
|
- /// @param[in] source_dimensions The dimensions, in pixels, of the source data.
|
|
|
|
|
- /// @return True if the texture generation succeeded and the handle is valid, false if not.
|
|
|
|
|
- virtual bool GenerateTexture(TextureHandle& texture_handle, const byte* source, const Vector2i& source_dimensions);
|
|
|
|
|
- /// Called by RmlUi when a loaded texture is no longer required.
|
|
|
|
|
- /// @param[in] texture The texture handle to release.
|
|
|
|
|
- virtual void ReleaseTexture(TextureHandle texture);
|
|
|
|
|
-
|
|
|
|
|
/// Called by RmlUi when it wants the renderer to use a new transform matrix.
|
|
/// Called by RmlUi when it wants the renderer to use a new transform matrix.
|
|
|
/// This will only be called if 'transform' properties are encountered. If no transform applies to the current element, nullptr
|
|
/// This will only be called if 'transform' properties are encountered. If no transform applies to the current element, nullptr
|
|
|
/// is submitted. Then it expects the renderer to use an identity matrix or otherwise omit the multiplication with the transform.
|
|
/// is submitted. Then it expects the renderer to use an identity matrix or otherwise omit the multiplication with the transform.
|