This example shows how to use Draw Shapes blocks to insert circles and rectangles into an image.
|On this page…|
The following figure shows the Bouncing Balls example model:
The Draw Shapes blocks draw circles and rectangles with varying sizes, colors, opacities, and locations. You can change the colors and opacities of these objects by modifying the Fill value color, RGB values, and Opacity factor parameters. The example creates the motion effect by changing the coordinates it inputs to the Pts port at each sample time.
You can use the Set parameters block to specify the Radius and Radius1 parameters. By changing these parameters, you change the size of the moving objects. Note that the Number of rows of input image and Number of columns of input image parameters must match the input signal dimensions.
Windows-only example models might contain compressed multimedia files or To Video Display blocks, both of which are only supported on Windows platforms. The To Video Display block supports code generation, and its performance is optimized for Windows.