FLTK logo

Re: [fltk.general] Re: FLUID: how can I have SVG icons embedded in the code?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: FLUID: how can I have SVG icons embedded in the code? Ian MacArthur 01:01 Apr 19  
 
On Thursday 18 April 2024 at 21:09:51 UTC+1  Gonzalo wrote:
Ian MacArthur schrieb am Donnerstag, 18. April 2024 um 13:52:14 UTC+2:
BUT: It doesn't rescale when I resize the widget. So I guess I do still need a resize() method to handle that still?

I tried it and it works, but on Windows, with a certain .svg I got:

D:\a\mrv2\mrv2\BUILD-Msys-amd64\Release\mrv2\src\mrv2-build\lib\mrvWidgets\mrViewer.cxx(1529): error C2026: string too big, trailing characters truncated

I am attaching the .svg that I think is the issue.

Hmm, just dropped that SVG file into my little fluid test, and it seems to work OK. Is it possibly a different image that is causing the issue?
(I got a grey image showing a white outline, with a drop-shadow, of a stylised hand wiping a cloth over the surface; which seems like a credible image for a "scrub" icon, so I assume that is working OK.)

This was on Win10 with Msys, and gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) - which is pretty ancient these days but still I use it...

What compiler are you using? That error message "C2026" looks a bit "lc"-ish to me, not like a gcc error, so maybe it's a compiler thing?

Hmm, OK, just checked - C2026 is a MS lc thing: 
<quote>
Before adjacent strings get concatenated, a string can't be longer than 16380 single-byte characters.
A Unicode string of about one half this length would also generate this error.
</quote>

The solution apparently is to dice the string up into separate quoted chunks, i.e. instead of doing :-

"this is a \
very long \
string"

We need to do :-

"this is a "
"very long "
"string"


 

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/39aa2ef7-01b8-4550-a6fd-10468d786f68n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.