In windows, say I have windows open with title bars, menus, buttons, text fields and a browser open with HTML displayed,
Is there a way to get the bounding boxes if all text on screen? I could probably access the positions of the open window gui elements, would I also be able to get the bounding box of html text on open webpages in the same way? How about pdf pages?
The reason i want to do this is to take a screenshot of the screen and compare it with the actual text to train a neural network to learn text recognition from screenshots.
Related
I saw a viz in the company's repository, and I wish to replicate one of the feature.
The viz is consist of several pages with an introductory page. The introductory page contained a lot of information with a scrollable canvas, while other detail page had a fixed-to-window way of presenting data, showing each segment in one screen without the overall scroll bar.
What I want to know is how to only make one or part of the pages in the dxp file able to enable the scroll bar (larger canvas height), while the rest having the fit-to screen way of displaying the viz. Any approach will be appreciated.
PS:
The Document Property→General→Visualization area size→Custom size method changes the canvas size of all visualization table. Which is not able to fulfill this feature, as this property changes the canvas size of all pages in the dxp file, which is not what I expected.
sounds like they used a Text Area but it's hard to tell without seeing the document.
you can insert a Text Area the same way you do a visualization (via the toolbar or the main menu). you can then right click the Text Area to edit it either with the WYSIWYG editor or in raw HTML. Text Areas will show scrollbars to match the length of your content.
I'm building a set of slides with bullets. I want to use "appearance" animations so I can step through the bullets with the space bar. On several slides, I have a screenshot image that I've positioned right after the bullet I want the image to be associated with. However, when I add appearance animations, the slide just displays all the screenshot images immediately, before any of the bullets appear. It seems like PowerPoint treats the images as "floating", and not associated with the bullets.
What can I do here?
The fact that the screenshot image is near the bullet doesn't make it part of the bullet or associated text, so it's behaving as expected.
Instead, try using a custom picture bullet for the text or using individual lines of text, each grouped with the screenshot image and each animated individually.
How is it possible to determine the horizontal offset of the Windows 8.1 HubControl?
I would like to adjust the margin of my title by the amount of horizontal offset.
Interestingly I notice in the Bing News app that the title 'Bing News' starts off white when it is over the lead image. However, when you scroll right, and the title is now over the application's (light) background (having scrolled past the image), the title background colour now changes to black.
See image below. Shows the top most part of the screen. Images 1-3 show when the page has scrolled right and the BING NEWS title has changed colour once it is no longer over the image.
I assume this is done via the offset again so I hope that my idea is possible.
The Hub control has a child element which is a ScrollViewer. You can parse the visual tree to retrieve the ScrollViewer, or you can use some neat extensions such as the ones in WinRTXamlToolkit which allow you to do a call such as myHubControl.GetFirstDescendentOfType<ScrollViewer>(). Then, you can retrieve the HorizontalOffset from this object.
Is there any way to get coordinates of a rectangle used to highlight text (such as when you select a piece of text for example with mouse for further copying to clipboard) from a third party application?
I guess it won't be possible when application does some custom rendering, but what about standard controls? There seems to be some central way for drawing the highlighting rectangle, but I couldn't find any useful information about this. Also clipboard interception doesn't seem to return such info.
You can use EM_GETSEL to get the selection range in characters, then EM_POSFROMCHAR to get the coordinates of each character as displayed in the edit control's client area.
We have an Adobe AIR application. It has an image preview feature to show TIF and JPG images inside a TitleWindow.
My requirement is as follows:
i want to highlight(yellow color) a line containing a searched term results inside that image.
i found out examples which can highlight text inside a textarea. But wanted the same thing inside image.
There can be multiple lines having this keyword. All those llines have to be highlighted.
Not sure if this is possible. Please let me know how can this be done in Flex/AIR.
Create mx.controls.Text, assign style which will paint it yellow and place over the Image. This can be done, for example, with Canvas container which allows absolute positioning.
mx:Text has no background, so it will just text over image. Or do you need some background as well?