I made onother Test.
I have copied a part of code from LineChart.Draw() into my component Draw().
It's only the part which draws the 5 horizontal lines of the LineChart.
Then I have included 2 statemants to draw another horizontal line and a vertical line.
The result is crazy! I see only the 5 LineChart lines.
var color dotCol;
var color linCol = #005F3FFF;
var color filCol = #005F3FFF;
var color grdCol = #005F3FFF;
var int32 NoOfGridLines = 5;
var int32 x;
var int32 y;
var int32 w = Bounds.w;
var int32 h = Bounds.h;
var int32 dx = pure Bounds.origin.x + aOffset.x;
var int32 dy = pure Bounds.origin.y + aOffset.y;
/* alpha blending of the chart depends on the blending mode of its owners */
aBlend = aBlend && viewState.contains( Core::ViewState[ AlphaBlended ]);
/* calculate resulting opacity value from given opacity and the components opacity value */
var int32 opacity = ((( aOpacity + 1 ) * pure Opacity ) >> 8 ) + 1;
/* modulate the color values by the calculated opacity */
if ( opacity < 256 )
{
linCol.alpha = uint8(( linCol.alpha * opacity ) >> 8 );
filCol.alpha = uint8(( filCol.alpha * opacity ) >> 8 );
grdCol.alpha = uint8(( grdCol.alpha * opacity ) >> 8 );
}
super(aCanvas, aClip, aOffset, aOpacity, aBlend);
/* draw the horizontal grid lines */
if (( NoOfGridLines ) > 0 && ( grdCol.alpha > 0x00 ))
{
var int32 i;
for ( i = 0; i < NoOfGridLines; i = i + 1 )
{
if ( NoOfGridLines > 1 )
y = i * h / ( NoOfGridLines - 1 ) + dy;
else
y = dy + h;
aCanvas.DrawLine( aClip, point( dx, y ), point( dx + w, y ), grdCol, grdCol, aBlend );
}
}
/* additional lines included */
aCanvas.DrawLine(aClip, point(50,80), point(50, 200), grdCol, grdCol, aBlend);
aCanvas.DrawLine(aClip, point(50,80), point(200, 80), grdCol, grdCol, aBlend);