Let me elaborate. I define a D2D Rectangle like so:
D2D1_RECT_F rect1 = D2D1::RectF(5, 0, 150, 150);
and an ellipse as:
D2D1_ELLIPSE ellipse1 = D2D1::Ellipse(D2D1::Point2F(75.f, 75.f), 75.f, 75.f);
To draw these shapes, I first transform them and pass them to the rendertarget:
m_pRenderTarget->SetTransform(D2D1::Matrix3x2F::Translation(D2D1::SizeF(200, 50)));
m_pRenderTarget->FillRectangle(&rect1, m_pLinearGradientBrush);
I'd like a way to create a random number of rectangles and ellipses, and store them in an array, and then be able to draw them as well. I have a function that returns a random number from zero to five. I want to be able to use that number to create an array that points to these shapes, and iterates through them to draw them to the screen. Any ideas on how I can approach this problem?