How to make text & svg draggable rectangle a single unit placed into another svg rectangle(fix) so both moves at one time in html - html

Want SvgDraggable Rectangle and text inside it to move at same time. In my case only rectangle is moving.

Related

Rounded box in SSRS

I have rectangle which act as container for other elements.
Can I somehow setup some property of rectangle to round its corners, in fact, to get rounded box.
In css it is easy, but how to do in SSRS?
Actually, it is fairly easy. I had a bunch of text boxes that a rounded corner border needed to be placed. The first thing I tried was an image control. I placed it on top of my text boxes and set it to "Send to back." It worked well in print rendering, however, in the browser rendering the HTML placed the textboxes after the image making it look horrible.
The solution was this:
Go into paint and draw a rounded corner box the size you need.
Cut the set of text boxes to surround with rounded border.
Place a rectangle control over the entire area all the text boxes covered.
Paste my text boxes onto the rectangle.
Right-Click and choose rectangle properties.
Select the Fill Tab and select "Embedded" image source.
Click Import and select your paint image(i used PNG but it shouldn't matter).
Click Ok.
Find and expand BackgroundImage on Rectangle and change BackgroundRepeat to "Clip.". Otherwise, your image is repeated.
The report should now render properly in both print and html rendering views. Unfortunately, this doesn't seem to stretch/size, so unless you can figure that one out, you will have to repeat whenever you need a different sized rounded box.
Brian
All solution I have seen use a background image inside a textbox.
But you get problems when you try to resize the textbox.
The solution is to insert a 3x3 table inside the texbox.
Insert the 3x3 table
Insert an image on each corner. They will be a quarter of a circle each. (This image is created in MS Paint or your favorite image program)
Make those 4 corners cells unresizable (Set property CanGrow to false). Make sure all the other cells have CanGrow = true if you need it
Make all the cells the same background color (same color as the image you draw).
Write your text in the middle cell.
OPTIONAL: It might also be a good idea to fuse the 3 vertical middle cells if possible. It will allow more space to write text in the cell.
This way you won't have to create new image everytime the size of your textbox change.
You would have to build an image that has a transparent center for adding your text.
All this would be more work than I would want to do just for a report.
I would stick with just the standard textboxes.

Can opaque element hide other elements?

I've used a technique here with jQuery, HTML and so on. If I select an element its background will be a sliding lines animated gif so if I put another div in front of it and i made the back div 1 pixel wider than the front then it will look like the selection effect on photoshop. The problem is that sometimes I want an element to be opaque (for example text elements should not have background color, I want other elements to have that feature). Thus if I set the front div to opaque which have the text I will see the sliding lines gif itself. Is there a way to overpass the background div's background image on that area where the front div is visible and I could see everything BEHIND the back div?

Setting movieclip origin with AS3

I have a spotlight that moves on a stage.
Now I rotate the spotlight but its not rotating on the correct point/origin.
I am trying to do something like
myOject.setOrigin = {x , y};
//and then rotate it about x,y.
I have manually set the white circle in the correct place and when I rotate the
object with the mouse on the screen it works.
Can somebody help me?
Make sure the registration point is in the middle of your symbol. It's not the white circle that appears when you use the Free Transform Tool:
But the crosshair that appears when you edit your movie clip:
You can easily center the object by selecting everything, then opening the Align panel and aligning its horizontal and vertical axes to the center using the two "center" icons under the Align section. If your MC has multiple items per layer, group each layer before aligning, then ungroup after aligning:
The white circle is not what will be used as the origin, it's the little cross. Adjust your clip to have that in the center (you'll have to move all of it's contents). Another option, if moving is not possible, is to wrap your clip in another clip and move it within that.
Select symbol and click CTRL+E - Then move it to positioning cross.

Cutting shape out image to show underlying image

I have two images, a gameboard and the same gameboard with all posible player positions in a pressed state. When a player moves to a position on the board, I put the board image over the pressed board image and slice using context.drawImage() on the pressed image, to display the pressed position through the slice. However, my game board contains positions which are not rectangular but different shapes.
Is it possible with html 5 canvas, to cut a non-rectangular shape out of an image to display the underlying image?
I found it's possible to use clip() on shapes but I can't find a similar option on images.
you can create a third image that is a mask with transparent (alpha-channel) pixels and non-transparent pixels, and use a
globalCompositeOperation
to merge the mask and the to-be-masked image into a new image ( think you can use an xor or source-out here..

Swing rotate border

I'm working on a swing program to display several pictures. And one can rotate the picture (implemented each as a JComponent).
Problem is, when a picture gets rotated, the border of the JComponent doesn't change so that the picture gets clipped.
Is there any way to also rotate the border so that the picture can be fully drawn?
(I know one can calculate the new size of the border, but it leaves empty space on the edge. When a rotated picture overlaps with another and one want to move the one underneath, one cannot do that because the event will be passed to the picture above, onto the transparent edge. So it is more ideal if one can just rotate the border).
Execute another pack() on your top-level JFrame after rotating.