Rectangle dimensions

When I place in Vision a rectangle on the screen with the dimension 100x100 pixels and with a stroke width of 20 pixels, the outer dimensions of this rectangle will be aprox. 120x120 pixels.
Is it possible to draw a rectangle with the outer dimisions as width and height properties?

Hello!
You may try:

.rectangle {
    width: 200px;
    height: 100px;
    background-color: white;
    border: 5px solid black; /* Stroke */
    box-sizing: border-box; 
}

that css property should be boxSizing in ignition.

Does this also works in Vision?

Sorry, I'm not a vision expert but pretty sure Vision doesn't support CSS styling....

1 Like

I was not aware of this, but Vision shapes use relWidth and relHeight properties that are bindable, so I imagine that custom properties could be added for the desired width and height, and an expression could translate those dimensions to the relative properties in a way that takes the stroke into account.

1 Like