How to make overlapping image in PhpOffice\PhpWord? - phpoffice

I have a document with verious variables in it. Need to put a .png stamp that'll be right on top on them. Is it possible?

Related

Is it possible to check is an image is a cropped part of other image with google-cloud-vision?

I'm trying to check is the pair of images actually the larger original and the cropped image from it. It is possible to do with google-cloud-vision?

Place DataBand in a certain space

Im making a report with Stimulsoft Designer, and I place a lot of information. Now I need to place a data band for showing a list of phones in a certain space, but the only position on which the data band appears is on top (after header) and full width. That's not what I need, I need something like this:
I tried to create a "Data" square, and other options shown there, but it doesn't work. What I'am missing?
The solution is to add a panel with that shape, and insert the databand inside the panel

Scale pygal svg graphs in web page with susy

I am trying to place two svg files side by side in a web page. This I have done using susy to create the spans, first one is 2 columns wide, the second 10 columns. I place a narrow bar graph in the first span, and a wide line graph in the second span.
The problem I am having is scaling the graphs. they look like this:
But I want them to look more like this:
They are svg files generated with pygal and I achieved the second image by forcing a size in pygal, but it's not elegant and fails wehn the screen size changes.
How can I make the svg bar chart scale the height without scaling the width and do it dynamically in a web browser instead of manually changing the size in pygal? I also cant manually edit the svg files as they are generated via another system and update frequently.
Your graphs should load in two different divs, so that you can set a different width style for each, depending on a view-based css class (like col based classes in Twitter Bootstrap). If you load dynamic svg's (without any explicit_size setting in Pygal) you should be able to handle different window sizes.

Sikuli gets confused between 2 identical buttons

I have identical buttons on the same page and I want Sikuli to click only one of those but it ends up clicking the other name sake button. Unfortunately, the button names cannot be changed. Any suggestions on how I could handle this situation?
Thanks!
You can tell Sikuli to operate on a particular region on the screen relative to a given image/screenshot object. This is called TargetOffset. Refer here assuming you are asking about using sikuli programmatically. From Sikuli IDE, double click on the screenshot image and it brings up a window where you can set accuracy and targetOffset.
If the two icons are close together, and will always appear the same way, and the space between them will always appear the same, then a
click(imageOfTwoIcons).targetOffset(x,y)
is probably the simplest way to go. But, if there is anything that would make this method unreliable (anything between the two icons ever appears differently than when you are making your screen capture of them)--
You could also use the python sorted() function to sort the images by their position. For example, if one image is always above the other, then you could find both images and sort them by their y coordinate, like so:
#a little prep for the sorted function to get the y coord of the icon
def byY(icon):
return icon.y
#findAll() on your two identical icons and make them into a list
bothIcons = list([x for x in findAll(icon)])
#then sort them
sortedIcons = sorted(bothIcons, key=byY)
iconOnTop = sortedIcons[0]
iconOnBottom = sortedIcons[1]
#then click on the one you want
click(iconOnTop) #or save a line and say: click(sortedIcons[0])
The same can be done if you know that the icon of interest is always left or right of its twin:
def byX(yourTwoImages):
return image.x
bothIcons = list([x for x in findAll(icon)])
sortedIcons = sorted(bothIcons, key=byX)
click(sortedIcons[0]) #for the image on the left
I like this better than working with regions if the two icons are very close together on the screen, or if it's possible for the icons' placement to ever change.
you can enlarge the buttons image, so that the image will include more than just the image, but also the background around it (if you can be sure that the background is not changing) but remember that sikuli clicks on the center of the image, so make sure that the button is in the center.
another option is to click using offset (http://doc.sikuli.org/tutorials/checkone/checkone.html)
use something like this:
this.offset = 15;
org.sikuli.script.Region reg = screen.find("image").left(this.offset);
screen.click(reg);

video inside custom shaped border css

I'm not exactly sure about the correct term of what I'm trying to do. But basically I am trying to set a video or flash.swf file inside a custom shaped border (the boarder isn't a perfect square) in the header of my website.
I've provided two pictures of what I mean. The first picture is what I want the page to look like when it first loads. The second picture is what it should look like after the video or flash.swf file loads.
Notice how in the second picture there is an image that fits inside what I am calling the boarder area. Again I do not know the proper term. Any help would be greatly appreciated as I don't even know where to begin to start.
Image 1 http://i.stack.imgur.com/xHhB6.jpg
Image 2 http://i.stack.imgur.com/gJ77g.jpg
Set the wmode="opaque" in the embed / object tag. Then you can overlay the flash file with a png that is transparent in the area you want the flash visible.
the png must be positioned absolute that you can position it right via top/left and for the z-index.

Resources