Attention! This forum will be made read-only by Dec-20. Please migrate to Most of existing active users should've received invitation by e-mail.
Ask Your Question

How to create a empty rect?

asked 2015-04-01 07:42:08 -0500

215 gravatar image

How do i instantiate a empty Rect?

Rect ROI = NULL doesn't work...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-01 07:54:55 -0500

updated 2015-04-01 07:56:50 -0500

It is very simple. Just think about your Rect element as a pointer to memory.

// Simply pointer initializing
Rect ROI;

// Pointer initializing and allocating memory
// Rect ROI (x, y, width, height);
Rect ROI (0, 0, 250, 250);

More information about every possible constructor of the Rect element can be found here.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-04-01 07:42:08 -0500

Seen: 5,342 times

Last updated: Apr 01 '15