Rajeev J Sebastian wrote:
On Friday 06 January 2006 19:35, Frank Meies wrote:
For painting, we do this: Get the kern array from vcl by calling
GetTextArray(), add the spacings for justified alignment, pass the
modified kern array to the DrawTextArray() function.
For cursor travelling, we obtain the kern array the same way and add the
spacing if justified alignment is set. After this, we have the x
coordinate for the cursor.
Are these both implemented in the very same function ? Perhaps inspecting it
will give some clues ?
I had a second look at the code. This is how it works: Painting is done
in SwFntObj::DrawText(). The kern array is requested from the output
device and the spacing values are added to the kern array. Having done
this, the modified kern array is passed to the DrawTextArray() function
of the output device.
Cursor position calculation is done in SwFntObj::GetTextSize(). The kern
array is requested from the output device. This gives us the cursor
position without the justified alignment. The spacing for the justified
alignment is added to the cursor position afterwards by calling the
SwTxtPortion::CalcSpacing() function.
Regards,
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]