Ask Your Question
2

How to create a empty rect?

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

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
4

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

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

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

Question Tools

1 follower

Stats

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

Seen: 8,025 times

Last updated: Apr 01 '15