passing height to the measure function
This diff: * adds height as another parameter passed to the measure function, computed the same way width is * adds tests for this extension, which has involved adding a new measure function to all of js, c, java and c# tests
This commit is contained in:
@@ -91,6 +91,7 @@ typedef struct {
|
||||
bool should_update;
|
||||
float last_requested_dimensions[2];
|
||||
float last_parent_max_width;
|
||||
float last_parent_max_height;
|
||||
float last_dimensions[2];
|
||||
float last_position[2];
|
||||
css_direction_t last_direction;
|
||||
@@ -139,7 +140,7 @@ struct css_node {
|
||||
css_node_t* next_absolute_child;
|
||||
css_node_t* next_flex_child;
|
||||
|
||||
css_dim_t (*measure)(void *context, float width);
|
||||
css_dim_t (*measure)(void *context, float width, float height);
|
||||
void (*print)(void *context);
|
||||
struct css_node* (*get_child)(void *context, int i);
|
||||
bool (*is_dirty)(void *context);
|
||||
@@ -161,7 +162,7 @@ typedef enum {
|
||||
void print_css_node(css_node_t *node, css_print_options_t options);
|
||||
|
||||
// Function that computes the layout!
|
||||
void layoutNode(css_node_t *node, float maxWidth, css_direction_t parentDirection);
|
||||
void layoutNode(css_node_t *node, float maxWidth, float maxHeight, css_direction_t parentDirection);
|
||||
bool isUndefined(float value);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user