You ( MrDFS ) replied ( to me ):
> > Now the text version also shows the percent OffLine;
> > it's by the date, on the xAxis; to wit:
> >
> >
http://Jeff-Relf.Me/SleepPat.HTM
> >
http://Jeff-Relf.Me/SleepPat.PNG
>
> And now it's an indecipherable mess.
"SleepPat.HTM" is dense, rich and complex, like my source code.
The yellow box ( in SleepPat.PNG ) is selected text.
Selected text is encased in yellow "boxes" using
Direct2D->CreatePathGeometry(), dxWin->DrawGeometry(), etc.
Selected or not, the background color is _always black, always.
Roughly, The code is:
if ( InText && Selctd && !DrewSel
&& ( iTop = RowsTB + 1 - TopScrLine, iLnA = ScrRow - iTop,
iLnA >= sB.iLnA && iLnA <= sE.iLnA ) ) {
int y, iLnA1, iLnA2, SelRows ; DrewSel = 1 ;
SelRows = sE.iLnA - sB.iLnA, iLnA1 = ER( iLnA, sB.iLnA );
iLnA2 = er( sB.iLnA + SelRows, sE.iLnA );
SelRows = iLnA2 - iLnA1 + 1, y = ( iLnA1 + iTop )*iCharH ;
if ( sB.Alt )
// AltShift selections are encased in a yellow box:
Left = SeLR[0].Left, Right = SeLR[0].Right,
DrawEdge( WinSur, Left, y, ( Right - Left + 1 ), SelRows*iCharH, Yellw99 );
else {
// Encase selected _lines ( lines may be staggered ):
Left = iLnA1 == sB.iLnA ? sB.xStart : 0 ;
Right = iLnA2 == sE.iLnA ? sE.xEnd : 999 ;
Direct2D->CreatePathGeometry( &Path ), Path->Open( &pSink );
pSink->SetFillMode( D2D1_FILL_MODE_WINDING );
pSink->BeginFigure( Pnt( Left, y ), D2D1_FIGURE_BEGIN_FILLED );
y += iCharH, pSink->AddLine( Pnt( Left, y ) );
if ( SelRows > 1 )
pSink->AddLine( Pnt( 0, y ) ),
y += ( SelRows - 1 )*iCharH, pSink->AddLine( Pnt( 0, y ) );
pSink->AddLine( Pnt( Right, y ) ), y -= iCharH ;
pSink->AddLine( Pnt( Right, y ) );
if ( SelRows > 1 )
pSink->AddLine( Pnt( WinW, y ) ),
y -= ( SelRows - 1 )*iCharH, pSink->AddLine( Pnt( WinW, y ) );
pSink->EndFigure( D2D1_FIGURE_END_CLOSED ), pSink->Close();
Trash( pSink ), dxWin->SetTarget( WinSur );
dxWin->DrawGeometry( Path, Yellw99, 3 ), Trash( Path ); } }