>> procedure TLabel.Paint(...) >> begin >> if *Caption.IsRTL *then >> DrawCaptionRTL(0,0,*Caption.AsUTF8*, flags) >> else >> DrawCaption(0,0,*Caption.AsUTF8*, flags); >> end; >> >> Is not that enough? > > What is the gain as opposed to > > procedure TLabel.Paint(...) > begin > if IsRTL(Caption) then > DrawCaptionRTL(0,0,AsUTF8(Caption), flags) > else > DrawCaption(0,0,AsUTF8(Caption), flags); > end; > > In other words where is the benefit from OOP in this ?
IMO, both are deficient as they both assume that a string block (text) is either RTL or LTR.
Doesn't that mean we will be --by design-- unable to write something like 'Yom Kippur (יוֹם כִּפּוּר)' on a caption?
This is why I keep asking that the 'TCharacter' or 'TChar' needs to have a language attribute.
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel