Hi,
I have a question regarding histogram calculation inside selection.
I'm working on "profile" (x/y) histogram. here is an example:
There are two lines (vertical/horizontal). Lines thickness can vary (from 1 to n). Histogram data under vertical line (selection) are shown on the right while histogram data under horizontal line (selection) are shown on the bottom.
Let's say that line thickness is 1. Then selection under horizontal line is constructed as:
PaintView->Select(0, Y, PaintView->IEBitmap->Width-1, Y + 1);
The question is: what is the thickness of selection, i.e. are pixels used to calculate histogram data under Y line, Y+1 line or both?
Beside that, lines are moved with mouse. As lines are actually iekLine objects with XOR blending (antialias = false), there is a slightly delay in onMouse event:
X = PaintView->CurrentLayer->ConvXScr2Bmp(X);
Y = PaintView->CurrentLayer->ConvYScr2Bmp(Y);
PaintView->ObjTop[_hobjHor] = Y;
PaintView->ObjLeft[_hobjVert] = X;
// histogram
drawHistoProfile(hpHor, X, Y);
drawHistoProfile(hpVert, X, Y);
pbHistoHor->OnPaint = 0;
pbHistoVert->OnPaint = 0;
pbHistoHor->Repaint();
pbHistoVert->Repaint();
drawHistoHor();
drawHistoVert();
pbHistoHor->OnPaint = pbHistoHorPaint;
pbHistoVert->OnPaint = pbHistoVertPaint;
When part that calculates and draws histogram data is commented, delay still occurs. Can it be avoided somehow?
I know there is a solution to draw XOR lines in IECanvas, but I would rather stick to iekLine objects.
TIA,
Siniša