ComputeProperty.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include "../../Include/RmlUi/Core/NumericValue.h"
  3. #include "../../Include/RmlUi/Core/StyleTypes.h"
  4. namespace Rml {
  5. class Property;
  6. // Note that numbers and percentages are not lengths, they have to be resolved elsewhere.
  7. float ComputeLength(NumericValue value, float font_size, float document_font_size, float dp_ratio, Vector2f vp_dimensions);
  8. float ComputeAngle(NumericValue value);
  9. float ComputeFontsize(NumericValue value, const Style::ComputedValues& values, const Style::ComputedValues* parent_values,
  10. const Style::ComputedValues* document_values, float dp_ratio, Vector2f vp_dimensions);
  11. String ComputeFontFamily(String font_family);
  12. Style::Clip ComputeClip(const Property* property);
  13. Style::LineHeight ComputeLineHeight(const Property* property, float font_size, float document_font_size, float dp_ratio, Vector2f vp_dimensions);
  14. Style::VerticalAlign ComputeVerticalAlign(const Property* property, float line_height, float font_size, float document_font_size, float dp_ratio,
  15. Vector2f vp_dimensions);
  16. Style::LengthPercentage ComputeLengthPercentage(const Property* property, float font_size, float document_font_size, float dp_ratio,
  17. Vector2f vp_dimensions);
  18. Style::LengthPercentageAuto ComputeLengthPercentageAuto(const Property* property, float font_size, float document_font_size, float dp_ratio,
  19. Vector2f vp_dimensions);
  20. Style::LengthPercentage ComputeOrigin(const Property* property, float font_size, float document_font_size, float dp_ratio, Vector2f vp_dimensions);
  21. Style::LengthPercentage ComputeMaxSize(const Property* property, float font_size, float document_font_size, float dp_ratio, Vector2f vp_dimensions);
  22. uint16_t ComputeBorderWidth(float computed_length);
  23. String GetFontFaceDescription(const String& font_family, Style::FontStyle style, Style::FontWeight weight);
  24. const Style::ComputedValues& DefaultComputedValues();
  25. void InitializeComputeProperty();
  26. void ShutdownComputeProperty();
  27. } // namespace Rml