I am attempting to use osgEarth in a Qt (5.12) application on Windows, and I am having some trouble with it showing lines - as in, they are simply not showing up.
Following some of the instructions to build osg, osgQt, and osgEarth here on Stack Overflow, I managed to get everything to build and run.
If I run the osgearth_windows with the annotation.earth file, it runs fine, and I see some shapes with borders, and a few lines on the globe.
If I run with my osgQt app, I see the shapes and labels, but no borders on shapes or separate lines.
I'm curious if anyone has experienced this previously, and if there are some settings I should be doing with Qt that will resolve this issue.
Similarly, if I try some of built osgEarth sample programs, such as the osgearth_features.exe, I will see the globe and yellow borders around every country. If I follow the code in there, (the way it creates a Map, then loads the basemap, then the FeatureSoureLayer, etc), I can see the globe, and labels in my Qt app, but still no lines.
Again, I have also had another at another Stack Overflow question (How to add osgEarth Features at runtime?) and tried the solution of adding a PolygonSymbol to the Map. I can see the green triangle, but do not see the border on it.
Any help would be greatly appreciated!
Make sure you are calling this:
#include <osgEarth/GLUtils>
...
GLUtils::setGlobalDefaults(camera->getOrCreateStateSet());
Where camera is the camera in the main view, or another node at the top of the scene graph.
The shader that renders lines needs some default uniform values to be initialized. This code does that.
Related
How can you generate the codes like shown below:
I will assume you want to use an existing standard instead of attempting to invent your own encoder\decoder.
Any 2D barcode can be intentionally damaged for esthetics if you crank up the redundancy used for error correction. 2D barcodes are designed to survive a certain amount of damage. Placing an image in the center and rounding the corners are both considered damage from the perspective of the reader. For round corners you can't use a barcode with orientation dots in the corners, like QR. You must choose a format that is oriented with a marker in the middle like:
MaxiCode
https://en.wikipedia.org/wiki/MaxiCode
ShotCode
https://en.wikipedia.org/wiki/ShotCode
Aztec Code
https://en.wikipedia.org/wiki/Aztec_Code
Similarly, if you wanted to place an image in the center then you wouldn't want to use one that requires a bullseye for orientation, unless you can retain the bullseye somehow in your central image. To place an image in the center and also round the corners you need to get creative. In your first image there are four tracking dots around the image. In the second and third examples the company uses it's own logo as the orientation point.
The first code you show is a proprietary code made by Facebook. It is now no longer used by their products, but some sites, e.g. respond.io may allow you to create them and some regular QR code scanners may be able to read them.
The second code is a Snapchat code and can be made on their site directly when you log into your account. You can also do it the the app on your device using their support instructions within limits for success.
The third code is a Kik code and there is a blog post of how to make that possible by generating a key and then downloading the code image in the color of your choice. They have more posts about how to work with them.
With all that said and done, you could try a site (not affiliated) like QR Code Go to make regular QR codes that are a little fancy. Thank you. Good day.
I am trying to automate the process of turning display layers on and off in a modeling program using AutoIt. I am currently using code that simply simulates a mouse-click at a particular pixel position and as that of course needs to be set up differently depending on the screen being used at the time, I would like to replace the mouse-click simulation with getting the information from the window, looking for a certain text, then checking or unchecking the "Map" and "Legend" check boxes.
My problem is that I don't know how to do that. If someone has a good way to include or point to screen shots let me know but until then I will try to describe everything the best that I can.
The window:
The window I am referring to is titled "Map Layers". The area that I am specifically interested is looks like a large list box (it takes up the vast majority of the window space) and it has 4 columns: Layer Name, Map, Legend, and Sample. Name has the name of the layer, Map has a check box to control which layers are displayed, Legend has a check box that controls which layers appear in the legend window, and Sample for some layers has the symbol that will appear in the legend. for my purpose the Sample column is irrelevant.
AutoIt v3 Window Info:
When I use the finder tool I can't get it to highlight the "list box" area, only the surrounding boarder that it and some buttons are in. The window info says that this surrounding boarder area (which seems similar to a panel) has a class of Button.
So my fundamental question is what code to use to drill into that "Button", find out what the list view looking thing is, and get the info from it, then interact with the map and legend check boxes without referring to pixel location (or at least grammatically get the pixel position).
If I have left out any important information or was unclear anywhere please let me know.
Edit: Forgot to mention and don't know if it helps but the info given using the finder tool for the column headers is Control: Class: SysHeader32
Try RanorexSpy and see if it can give you more details.
We have a library bar filled with items, which can be dragged from and dropped onto it. Now the client wishes to see something like a scrollbar or arrows on the side, to have an indication if items are outside of the visible port.
As you can see in the librarybar template below, it contains a surface scrollviewer. Yet I don't seem to be able to reveal these scrollbars.
Any suggestions on how to resolve this issue?
The librarybar template:
http://pastebin.com/QVnvqbNm
Managed to solve it. Answer was easier then expected. Found out that the scrollbars were cleanly removed, but all properties regarding it were still present. Kind of misleading.
Easiest way to solve:
Open expression blend.
Insert SurfaceScrollViewer
Open Template from the SurfaceScrollViewer
Copy SurfaceScrollbars & necessary templates to the templates/resources
from your library bar
Adjust the templates to meet your requirements
As you know, Google Maps Drawing Library is easy to implement, but it gives very little control to the developer.
(Here is a sample of the library at use http://gmaps-samples-v3.googlecode.com/svn/trunk/drawing/drawing-tools.html )
I would like to change the default settings of drawing polygons in two ways:
first, I'd like to use another icon for the nodes connecting lines instead of the small square icon
second, I like to increase the clickable area around the initial node.
Do you know if it's possible to do these changes to the drawing library?
I appreciate your help.
It is not possible with the existing drawing manager functionality. Please go through the following issue in Google maps api issues
http://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&num=100&q=drawing%20library&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal&groupby=&sort=&id=3760
I haven't found anyone who's stated a problem similar to this, but then again maybe it's because I don't know the right term for the graphical glitch I'm having. This program worked and displayed just fine a week ago, but now it doesn't. I (or rather, "we," since it's a school project) haven't made any changes to it since then. It's made with QT, and running on CentOS. Here's a screenshot:
Screenshot of QT glitch
Whatever is behind the window shows in the background, and whatever happens in the window gets frozen on screen. For example, if a word is supposed to flash on the screen and then disappear and be replaced by another word, the first word does not disappear. Instead, the second word just appears on top of it.
Anyone able to point me in the right direction as to what could be doing this? I could post a code snippet, if I knew what part to post a snippet of. :S
Is the UI just one giant QGraphicsScene object? If so then it could well be an OpenGL driver issue. If not, then I'm going to guess that it's the underlying Qt painting system that has become corrupted, and just reinstalling Qt should do it.