lisp proprieties of entity not updating after entmod? - lisp

I'm kinda a noob at lisp and i'm doing a little project that aims to change the height of a text, color, and also put the text inside a rectangle, but everytime i call the txtedit function, the text changes correctly but the rectangle is forming around the initial size of the text, seeming to be a problem with the x axis, but on the second try on the modified text, it works ok if I input the same height , any tips because i'm kinda stuck?
how it looks after i call the function////////
the code

Related

Unity GUI Label text justification issue

I'm running into an issue with GUI.Label in Unity3D. If I display some text on the screen and display that EXACT same string 1 pixel down and 1 to the right, it works correctly 99.9% of the time:
var old=GUI.color;
var shadow=rec;
shadow.x++; shadow.y++;
GUI.color=Color.black;
GUI.Label(shadow, txt, style);
GUI.color=old;
GUI.Label(rec, txt, style);
I've had this same code for years but I just recently discovered that a particular string will wrap text in the wrong place on the shadow text, even though they both have the same width in their rect's and same style. What's even more strange is it won't do this every frame. The text appears when I hover over something with my mouse and moving the mouse slightly will cause the shadow string to go back & forth, wrapping two different ways causing the shadow text to not coincide with the normal colored text.
Not an edge-of-screen issue either. I'm using 2020.2.1f1.
Thanks in advance!

Text component displaying lines in reverse order

Alright, I do not know how to fix this and only ran into this problem after trying to put in some longer text on a UI Text component. I have tried both pasting a value into its Text attribute through the Unity editor, and setting its value programmatically like this:
t.GetComponent<Text> ().text = "This is where meat, fish, and [...] (long text)"
Because Horizontal wrap is on, the text wraps when it reaches the edge of the available space.
However, the text displays backwards. Meaning, the start of the paragraph is at the bottom, and bottom at the top. Taking off wrap fixes this, but then the font size has to be really small (or it won't all be visible), and it can't form a normal paragraph because it has to... you know... wrap.
Is this a bug in Unity?
This is what happens - as you can see, it is displayed backwards:
The negative Line Spacing value is what is causing the issue here:
When the value of this field is less than 0, the lines will actually be arranged backwards, leading to the behaviour you're currently encountering. Just change the value to a positive number to have the text display correctly.

Can I change/fix the way Matlab creates text boxes in an eps

If I export my matlab figure as an eps using:
print('myfig','-depsc')
I then open it in another software, in my case Illustrator CS6.
The text appears ok, but what should be a single text box, say a legend entry, is actually multiple text boxes arranged so that it looks like one.
In the image below, the black text is what it looks like first, but I have also shown a copy of the same text, with each text box a different color.
If I want to edit any of this its very difficult as the space will then be messed up. Also if I change the font, the kerning gets messed up.
I have also tried using the text command to place text on the axis, and this also ends up in multiple text boxes.
Is there any way to fix this?
Am I missing something?
Just to be clear, I would like to fix matlab's eps, Not use a different software.

Word Styles to get two elements to share same background/border

Within MS Word 2013 I am trying to create a text element plus a list underneath it, all wrapped inside a coloured border with background shading (see image). The attached image shows the text in plain form.
I would like to place a blue border around both the title and the list. I can achieve this by placing both objects within a 1x1 table and applying colouring rules to the cell, but semantically this seems bad (I'm from an HTML development background where it is very wrong!)
When I edit a Style rule to create the border/background, it works well until I create the list, then it goes badly wrong. Is it possible to achieve the output of the table cell approach by only using a style rule and no table?
After a day of experimentation, the closest I can get is by doing the following:
Create a style rule called Tips Heading based on Normal, then set it to be Bold with a blue background.
Create another style rule called Tips List based on List Paragraph, and set it to have a blue background.
Unfortunately the List cannot be indented because the background colour also indents. The border is also affected in this manner, so I ignored the border and indentation. It works really well and is semantically well structured.

Get image width and height in pixels

so i have looked at a couple other questions like this and from what i saw none of the answers seemed to answer my question. I created a program that creates ASCII art, which is basically a picture of text instead of colors. the way i have the program set up at the moment you have to manually set the Width and Height of the pixels. If the width and height of the pixels is too large it simply wont work. so basically what i want to do is have a function to automatically set the width and height to the size of the picture. http://www.mediafire.com/?3nb8jfb8bhj8d is the link to the program now. I looked into pixel grabber but the constructor methods all needed a range of pixels. I also have another folder for the classes, http://www.mediafire.com/?2u7qt21xhbwtp
on another note this program is incredibly inefficient, i know that it is inefficient in the grayscaleValue() method, but i dont know if there is any better way to do this. Any suggestions on this program would be awesome too. Thanks in advance! (this program was all done on eclipse)
After you read the image into your BufferedImage, you can call getWidth() and getHeight() on it to get this information dynamically. See the JavaDocs. Also, Use a constructor for GetPixelColor to create the BufferedImage once and for all. This will avoid reading the entire file from disk for each channel of each pixel.
For further code clean up, change series of if statements to a switch construct, or an index into an array, whichever is more natural. See this for an explanation of the switch construct.
One last comment: anything inside a class that logically represents the state of an object should be declared non static. If, say, you wanted to render two images side by side, you would need to create to instances if GetPixelColor, and each one should have its own height and width attributes. Since they're currently declared static, each instance would be sharing the same data, which is clearly not desireable behavior.