==============================================================================
| 93 | |
| 94 | //============================================================================== |
| 95 | void CtrlrGroup::paint (Graphics& g) |
| 96 | { |
| 97 | //[UserPrePaint] Add your own custom painting code here.. |
| 98 | //[/UserPrePaint] |
| 99 | |
| 100 | //[UserPaint] Add your own custom painting code here.. |
| 101 | Rectangle<int> r = getUsableRect(); |
| 102 | |
| 103 | gradientFromProperty(g, getBounds(), getObjectTree(), Ids::uiGroupOutlineGradientType, Ids::uiGroupOutlineColour1, Ids::uiGroupOutlineColour2); |
| 104 | g.drawRoundedRectangle (r.toFloat().reduced((float)getProperty(Ids::uiGroupOutlineThickness)/2.0f), getProperty(Ids::uiGroupOutlineRoundAngle), getProperty(Ids::uiGroupOutlineThickness)); |
| 105 | |
| 106 | gradientFromProperty(g, getBounds(), getObjectTree(), Ids::uiGroupBackgroundGradientType, Ids::uiGroupBackgroundColour1, Ids::uiGroupBackgroundColour2); |
| 107 | g.fillRoundedRectangle (r.toFloat().reduced((float)getProperty(Ids::uiGroupOutlineThickness)/2.0f), getProperty(Ids::uiGroupOutlineRoundAngle)); |
| 108 | |
| 109 | if (groupBackgroundImage.isValid()) |
| 110 | { |
| 111 | if ((int)getProperty (Ids::uiGroupBackgroundImageLayout) == 8192) |
| 112 | { |
| 113 | g.setTiledImageFill (groupBackgroundImage, 0, 0, (float)getProperty (Ids::uiGroupBackgroundImageAlpha)/255.0f); |
| 114 | g.fillRect(r); |
| 115 | } |
| 116 | else |
| 117 | { |
| 118 | g.setColour (Colours::black.withAlpha ((float)getProperty (Ids::uiGroupBackgroundImageAlpha)/255.0f)); |
| 119 | g.drawImageWithin (groupBackgroundImage, |
| 120 | r.getX(), |
| 121 | r.getY(), |
| 122 | r.getWidth(), |
| 123 | r.getHeight(), |
| 124 | RectanglePlacement(getProperty (Ids::uiGroupBackgroundImageLayout))); |
| 125 | } |
| 126 | } |
| 127 | //[/UserPaint] |
| 128 | } |
| 129 | |
| 130 | void CtrlrGroup::resized() |
| 131 | { |
nothing calls this directly
no test coverage detected