MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / Clay_ApplyTransitionedPropertiesToElement

Function Clay_ApplyTransitionedPropertiesToElement

include/clay.h:4410–4445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4408};
4409
4410void Clay_ApplyTransitionedPropertiesToElement(Clay_LayoutElement* currentElement, Clay_TransitionProperty properties, Clay_TransitionData currentTransitionData, Clay_BoundingBox* boundingBox, bool reparented) {
4411 if (properties & CLAY_TRANSITION_PROPERTY_WIDTH) {
4412 if (!reparented) {
4413 currentElement->dimensions.width = currentTransitionData.boundingBox.width;
4414 currentElement->config.layout.sizing.width = CLAY_SIZING_FIXED(currentTransitionData.boundingBox.width);
4415 } else {
4416 boundingBox->width = currentTransitionData.boundingBox.width;
4417 }
4418 }
4419 if (properties & CLAY_TRANSITION_PROPERTY_HEIGHT) {
4420 if (!reparented) {
4421 currentElement->dimensions.height = currentTransitionData.boundingBox.height;
4422 currentElement->config.layout.sizing.height = CLAY_SIZING_FIXED(currentTransitionData.boundingBox.height);
4423 } else {
4424 boundingBox->height = currentTransitionData.boundingBox.height;
4425 }
4426 }
4427 if (properties & CLAY_TRANSITION_PROPERTY_X) {
4428 boundingBox->x = currentTransitionData.boundingBox.x;
4429 }
4430 if (properties & CLAY_TRANSITION_PROPERTY_Y) {
4431 boundingBox->y = currentTransitionData.boundingBox.y;
4432 }
4433 if (properties & CLAY_TRANSITION_PROPERTY_OVERLAY_COLOR) {
4434 currentElement->config.overlayColor = currentTransitionData.overlayColor;
4435 }
4436 if (properties & CLAY_TRANSITION_PROPERTY_BACKGROUND_COLOR) {
4437 currentElement->config.backgroundColor = currentTransitionData.backgroundColor;
4438 }
4439 if (properties & CLAY_TRANSITION_PROPERTY_BORDER_COLOR) {
4440 currentElement->config.border.color = currentTransitionData.borderColor;
4441 }
4442 if (properties & CLAY_TRANSITION_PROPERTY_BORDER_WIDTH) {
4443 currentElement->config.border.width = currentTransitionData.borderWidth;
4444 }
4445}
4446
4447CLAY_WASM_EXPORT("Clay_EndLayout")
4448Clay_RenderCommandArray Clay_EndLayout(float deltaTime) {

Callers 1

Clay_EndLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected