CMvcVisualComponent::ScaleBounds

virtual CSize CMvcVisualComponent::ScaleBounds(int xNum, int xDenom, int yNum, int yDenom, BOOL bAnchorCenter = FALSE)

Scales the bounds of the visual component

Defined in: MvcVisualComponent.h

Return Value

CSize The new size of the component after the scaling is done

Parameters

xNum

xDenom

yNum

yDenom

Comments

This function scales the size of the visual component. The formula is very simple:

new_width = (current_width * xNum) / xDenom; new_height = (current_height * yNum) / yDenom;

To double the width of the component, simply pass the value (int)2 as the xNum parameter and (int)1 as the xDenom parameter. To half its width, simply reverse the previous order. The bAnchorCenter parameter is useful if you want to zoom about a centerpoint.

bAnchorCenter

See Also

MvcVisualComponent::SetSize