Medialooks Knowledge Base Support Center

Contact Us

Graphics items

There are different types of graphics items in Character Generator. For example, you can use rectangles, stars, polygons in your overlay.

Default XML description of the graphic item looks like:

<graphics type='rect' round-corners='0.3' color-angle='45' sides='0' star-inset='0.' outline='3.' outline-color='White' color='Red(220)-Yellow(100)-Green(180)'/>

And it looks like a rectangle with rounded corners:

To add such item with a code you can call:

string graphicsItemId = "myGraphics";
string graphicsConfiguration = @"<graphics type='rect' round-corners='0.3' color-angle='45' sides='0' star-inset='0.' outline='3.' outline-color='White' color='Red(220)-Yellow(100)-Green(180)'/>";
double relativeX = 0.05;
double relativeY = 0.05;
int isRelative = 1;
int isShow = 1; 
myCharGen.AddNewItem(graphicsConfiguration, relativeX, relativeY, isRelative, isShow, ref graphicsItemId);

Common properties of graphic items

 Property Description Values Example
colorcolor of fillingcolor according to Color settingscolor='Blue(255)'
color-anglegradient angle of fillingangle in degreescolor-angle='90'
outlineoutline widthwidth in pixelsoutline='8'
outline-colorcolor of outlinecolor according to Color settingsoutline-color='Green'
typetype of graphicsdescribed belowtype='circle'

Graphics types

 Type Default view Additional parameters
rectround-corners to specify corner radius. For example, round-corners='0.5' :
block-1None
block-2None
block-3None
block-4None
block-5None
block-6None
circleNone
ellipseNone
triangleNone
polygonsides to specify number of sides. For example, sides='8' :
starsides to specify number of rays. For example, sides='8' :

star-inset to specify a depth of rays. For example, start-inset='0.4' :

There is no specific structure to manage graphics items. So the only way to configure such items from source code is to set XML properties.