Re: Create image from SVG widget
Here's a link to the post in the archives: http://lists.runrev.com/pipermail/use-livecode/2018-September/250326.html I could get close, but still needed to work out a way to translate the path to improve upon what was already discussed. (I can get the actual bounding box, but it doesn't really help with eliminating the need to use the cropIt handler.) On Mon, Sep 21, 2020 at 10:18 PM Brian Milby wrote: > You do not need a file, but you do need additional code. I found a > handler from a Sep 2018 thread that wraps a path to form the input needed > for the compile. LC Mark mentioned an internal call that could enhance the > process but I didn’t see any code that leveraged it. Let me take a crack > at it and see what I come up with. > > Sent from my iPhone > > > On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > Hi Brian > > > >> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode < > use-livecode@lists.runrev.com>: > >> > >> This may be what you're looking for: > >> > >> put drawingSvgCompile(tFileText) into tDrawing > >> set the text of image "svgImage" to tDrawing > >> http://forums.livecode.com/viewtopic.php?f=10=30441#p163024 > >> The stack in the forum post will let you see the difference in how a > >> particular svg file is rendered in the browser widget, as a SVG path > >> (widget), and as a SVG Compiled Drawing (image). There is some > additional > >> code available that will translate the path (effectively trim extra > space > >> around the image) that I have not incorporated. > > > > thank you! > > > > But I thought we could do this from a SVG widget without the need of a > .svg FILE. > > Was I dreaming? > > > > Best > > > > Klaus > > > > -- > > Klaus Major > > https://www.major-k.de > > kl...@major-k.de > > > > > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Create image from SVG widget
You do not need a file, but you do need additional code. I found a handler from a Sep 2018 thread that wraps a path to form the input needed for the compile. LC Mark mentioned an internal call that could enhance the process but I didn’t see any code that leveraged it. Let me take a crack at it and see what I come up with. Sent from my iPhone > On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode > wrote: > > Hi Brian > >> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode >> : >> >> This may be what you're looking for: >> >> put drawingSvgCompile(tFileText) into tDrawing >> set the text of image "svgImage" to tDrawing >> http://forums.livecode.com/viewtopic.php?f=10=30441#p163024 >> The stack in the forum post will let you see the difference in how a >> particular svg file is rendered in the browser widget, as a SVG path >> (widget), and as a SVG Compiled Drawing (image). There is some additional >> code available that will translate the path (effectively trim extra space >> around the image) that I have not incorporated. > > thank you! > > But I thought we could do this from a SVG widget without the need of a .svg > FILE. > Was I dreaming? > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > kl...@major-k.de > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Updating a menubar button on Mac
When the menu is placed into the system menu on Macs the buttons no longer receive messages but the group does, so update everything at once on mouseDown in the group script. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 21, 2020 5:57:52 PM David Epstein via use-livecode wrote: I can use a “mouseEnter” handler to update a menu button’s contents just before the user displays that menu. But if that menu button is part of the stack’s menubar group on a Mac, the Mac menu does not seem to receive the mouseEnter message and the menu is not updated. Is there a workaround? Thank you! David Epstein ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Updating a menubar button on Mac
Populate it on mouseDown? I’ve done this lots, but mainly with option menus. > On Sep 21, 2020, at 4:55 PM, David Epstein via use-livecode > wrote: > > I can use a “mouseEnter” handler to update a menu button’s contents just > before the user displays that menu. But if that menu button is part of the > stack’s menubar group on a Mac, the Mac menu does not seem to receive the > mouseEnter message and the menu is not updated. Is there a workaround? > Thank you! > > David Epstein > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode Devin Asay Director Office of Digital Humanities Brigham Young University ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Updating a menubar button on Mac
I can use a “mouseEnter” handler to update a menu button’s contents just before the user displays that menu. But if that menu button is part of the stack’s menubar group on a Mac, the Mac menu does not seem to receive the mouseEnter message and the menu is not updated. Is there a workaround? Thank you! David Epstein ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: HOw to get htmltext from the field to display in another field
Sannyasin Brahmanathaswami wrote: > Vedas > A Random Selection > of Sutras > > gets turned around. It becomes > > Vedas > A Random Selection > of Sutras > > ?? where does the font size becomes "34" . HtmlText is not HTML. It was added to the engine as a convenient way to use HTML-like tagging to express field contents with styles. Header tags (eg "H1") are an HTML convention. LiveCode has no CSS, and hence ability to define header specifiers for size. If you try this: set the textSize of fld 1 to "h1" ...it should fail. But as a convenience or those who may be attempting to mix and match a limited form of HTML with LC's HtmlText, the engine will allow header tags as input, translating them to fixed values. As you've discovered there, the fixed value for "H1" is 34. > Even with the font size of field increases, it stays at size="34"?? Attributes of field objects are different from attributes of style runs in the content within the field object. Changes to the object's textColor, textSize, and textFont will affect the visual rendering of the object's contents only, leaving the contents as stored unaffected. If the content has any attribute set within a style run, that setting overrides any setting for the object, much as we see with inheritance of visual properties throughout LC. If you want to change the textSize of the contents of the field, you can either: a) set the textSize of char 1 to -1 of fld "Whatever" to 20 b) set the textSize of char 1 to -1 of fld "Whatever" to empty set the textSize of fld "Whatever" to 20 -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Create image from SVG widget
Hi Brian > Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode > : > > This may be what you're looking for: > > put drawingSvgCompile(tFileText) into tDrawing > set the text of image "svgImage" to tDrawing > http://forums.livecode.com/viewtopic.php?f=10=30441#p163024 > The stack in the forum post will let you see the difference in how a > particular svg file is rendered in the browser widget, as a SVG path > (widget), and as a SVG Compiled Drawing (image). There is some additional > code available that will translate the path (effectively trim extra space > around the image) that I have not incorporated. thank you! But I thought we could do this from a SVG widget without the need of a .svg FILE. Was I dreaming? Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Create image from SVG widget
This may be what you're looking for: put drawingSvgCompile(tFileText) into tDrawing set the text of image "svgImage" to tDrawing http://forums.livecode.com/viewtopic.php?f=10=30441#p163024 The stack in the forum post will let you see the difference in how a particular svg file is rendered in the browser widget, as a SVG path (widget), and as a SVG Compiled Drawing (image). There is some additional code available that will translate the path (effectively trim extra space around the image) that I have not incorporated. On Mon, Sep 21, 2020 at 4:41 PM Klaus major-k via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Mark, > > > Am 21.09.2020 um 22:31 schrieb Mark Wieder via use-livecode < > use-livecode@lists.runrev.com>: > > On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote: > >> Hi friends, > >> I need a little hint, I forgot what command creates an image > >> from an SVG widget. 8-) > >> ... > >> set the text of img 1 to ???(???) > >> ... > >> Thanks for any hint! > > > > Dunno. > > very helpful, thank you. :-D > > > I export a snapshot from the widget. > > > > -- > > Mark Wieder > > ahsoftw...@gmail.com > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > kl...@major-k.de > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Create image from SVG widget
Hi Mark, > Am 21.09.2020 um 22:31 schrieb Mark Wieder via use-livecode > : > On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote: >> Hi friends, >> I need a little hint, I forgot what command creates an image >> from an SVG widget. 8-) >> ... >> set the text of img 1 to ???(???) >> ... >> Thanks for any hint! > > Dunno. very helpful, thank you. :-D > I export a snapshot from the widget. > > -- > Mark Wieder > ahsoftw...@gmail.com Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Create image from SVG widget
On 9/21/20 12:57 PM, Klaus major-k via use-livecode wrote: Hi friends, I need a little hint, I forgot what command creates an image from an SVG widget. 8-) ... set the text of img 1 to ???(???) ... Thanks for any hint! Dunno. I export a snapshot from the widget. -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Create image from SVG widget
Hi friends, I need a little hint, I forgot what command creates an image from an SVG widget. 8-) ... set the text of img 1 to ???(???) ... Thanks for any hint! Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: HOw to get htmltext from the field to display in another field
> On 21Sep, 2020, at 10:55, Sannyasin Brahmanathaswami via use-livecode > wrote: > > ?? where does the font size becomes "34" . Even with the font size of field > increases, it stays at size="34”?? I would say from the h1 attribute that sets the text as a heading, h1 being the largest size. If you test with h2, h3 etc. you should see different font sizes. As you can see, LiveCode’s conversion to HTML is not exactly how you would write the code if you were producing a web page, AFAIK it’s designed to suit LC's internal use. Paul ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: HOw to get htmltext from the field to display in another field
I found it: button "Check HTML" on mouseUp If "" is in field "mainText" then -- htmltext is there set the htmlText of field "mainText" to field "mainText" else put the htmltext of field "mainText" into field "mainText" end if end mouse BUT! Vedas A Random Selection of Sutras gets turned around. It becomes Vedas A Random Selection of Sutras ?? where does the font size becomes "34" . Even with the font size of field increases, it stays at size="34"?? BR J. Landman Gay wrote: I think Swami wants a toggle, so it's likely the field won't ever be empty. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: formattedHeight formattedWidth on android
Hmm… Well now I can’t reproduce the issue that consumed a fair number of hours yesterday. Which, (with the exception of lost hours) is a very good thing. — Scott Morrow > On Sep 20, 2020, at 7:11 PM, scott--- via use-livecode > wrote: > > I’ve recently run into what feels like a bug with formattedWidth and > formattedHeight of a field in android. I’m attempting to maximize (without > clipping) the textSize of a string in a fixed-size field. I have code that > works reliably in the IDE and on iOS but not on android. My use case seems to > be solvable by first calculating the amount it is likely to be off and then > factoring that in. It seems that there might be some related issues in > Bugzilla but I didn’t find anything exactly the same. I’m somewhat new to > Android so I always wonder if my stumbles are known limitations that I just > can’t find the documentation for. > > -- > Scott Morrow > > Elementary Software > (Now with 20% less chalk dust!) > web https://elementarysoftware.com/ > email sc...@elementarysoftware.com > -- > > > > > > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode