Re: [fpc-pascal] Canvas.TextStyle
On 24.05.2014 13:45, Juha Manninen wrote: On Sat, May 24, 2014 at 2:26 PM, Sven Barth wrote: http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields Ok, then this becomes an LCL issue. How to port Delphi code like Canvas.TextFlags := Canvas.TextFlags or ETO_RTLREADING Canvas.TextFlags := Canvas.TextFlags or LAYOUT_SUPERSCRIPT; TextStyle was the closest thing to TextFlags I could find. If nobody knows the answer, I will continue my experiments. I know this is not a Lazarus list. I don't know what exactly TextStyle provides, but if it has fields similar to the flags of TextFlags the following would be the way to go: === code begin === var t: TextStyle; begin t := Canvas.TextStyle; t.RtlReading := True; t.SuperScript := True; Canvas.TextStyle := t; end; === code end === Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Canvas.TextStyle
Thanks. I will experiment with it. Regards Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] AnsiStrupper Error
The code bellow is throwing an exception and I don't know why. It used to work. program Project1; uses sysutils; var s : AnsiString; begin s := 'a'; AnsiStrupper(PAnsiChar(s)); end. It works fine with FPC 2.6.4 (Linux x86-64 bits). I'm using FPC trunk (Revision 27818): An unhandled exception occurred at $00428E4D: EAccessViolation: Access violation $00428E4D ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] AnsiStrupper Error
On 26 May 2014, at 01:59, Daniel Gaspary wrote: > The code bellow is throwing an exception and I don't know why. It used to > work. > > program Project1; > uses >sysutils; > var >s : AnsiString; > begin > s := 'a'; > AnsiStrupper(PAnsiChar(s)); > end. > > It works fine with FPC 2.6.4 (Linux x86-64 bits). No, it corrupts your string constant. > I'm using FPC trunk (Revision 27818): > > An unhandled exception occurred at $00428E4D: > EAccessViolation: Access violation > $00428E4D And that corruption is now caught: http://wiki.freepascal.org/User_Changes_Trunk#Literal_storage_memory_has_been_made_read-only Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal