C++ builder - clickable map of europe in TForm - c++

I would like to have an image of europe in a TForm or TPanel where each country can simulate the functionality of a button. I would also like to be able to change the colour of each country dynamicaly.
Does anyone know if this is possible to do in C++ Builder?
Any examples or help much appreciated.
Thanks

It is possible.
One quick solution assuming that your image is NOT scaled.
Have a second image similar with the Europe map where each country will have a unique color.
At OnMouseMove of the panel where the image is read the position in regard with Europe map (the image) and get the value of the pixel on the other image - using Timage->Picture->Bitmap->Canvas->Pixels[x][y], so you will get the country or any other info you maybe set.
Using the same method you can tell what pixels are regarding to a country and do a replacement.
This is a quick workaround, there are MANY other ways possible, like overlays of images (multiple TImage controls).

Related

OCR in Sage Maker

Guys i am trying to build infrastructure on aws for getting help from others on annotation. currently we uses label-studio for text annotation. as might know you can label text by selecting through polygon and than writing what does selected area mean. ex: if polygon is made around english word than what writing out label of it to annotate that given english word. for more see image below.
How can i do this in SageMaker Ground Truth. as far as i have gone i think it can just label pre defined words. you cant create custom label in it by selecting any given area using polygon in image am i right ?
Unfortunately LS doesn't support changing of labels on the fly.

Chart.js scatter/bubble pointstyle custom text

I'm looking for a solution in which custom text is rendered instead of a point for a scatter or bubble diagram using chart.js. For example, if plotting baseball players' batting average vs slugging percentage, I want the player's name to appear centered horizontally and vertically over the underlying x,y coordinate, such as 'MANTLE' or 'RUTH', instead of the typical dot/square/triangle/bubble pointstyles. I noticed a callback function lets me program custom axis labels, but I need to do something similar for the actual point of the graph.
If this is not possible, can you recommend another library that can do this.
Thank you in advance...
chartjs-plugin-datalabels does what you're looking for. The positioning of the labels is largely customizable. A custom label formatter function for example lets you display text other than the data values.
Please take a look at the chartjs-plugin-datalabels samples, especially at Custom Labels.
Keep in mind that this plugin registers itself globally, meaning that once imported, all charts will display labels. In case you want it enabled only for a few charts, you first need to unregister it globally. Then, you can enabled the plugin for specific charts.

codename one - no way to set background image in list

I am new to codename one and I have tried for one and half day to fix my issue of,
a list with background image in each row.
Let me explain, I am having a list with some items(entries), I created renderer and name it appropriately. I set background correctly which is reflecting in designer (see image)
but when I run it on simulator/device , all formatting and designs are just invisible..!! (see red arrow pointing to simulator in image)
anyone have any idea ? why this is happening ?
Thanks,
Akash
It seems you didn't set the background correctly in the designer. Since the list items in the model within the designer are strings the renderer entries don't get overriden and so you see a separate UI.
To reproduce the issue in the designer click the items entry in the list property, remove everything and add a sample key/value hashtable pair. You would see all your design entries disappearing.
This might help you understand how to customize images and backgrounds here: http://www.codenameone.com/3/post/2013/12/deeper-in-the-renderer.html

Add text to a picture using photoshop

I want to know if exist templates to add text on photoshop like in the following pictures:
http://sphotos-e.ak.fbcdn.net/hphotos-ak-ash4/485070_566956359990277_263279122_n.jpg
https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash4/3263_403189956409783_609225582_n.jpg
Could you suggest some pages where I can study and try those effects ?
Thanks.
Step1: Find the fonts. Search on font sites for similiar fonts or try to cut out the font and upload it to http://www.whatfontis.com/ or http://www.myfonts.com/WhatTheFont/
Step2: just play around with blending options and stuff.
from what I can see it's these settings you want too look at:
"Notche Latina": Gradient overlay, white stroke and black dropshadow.
"photo recoblablabla": inner shadow and might be in overlay-mode or something
"Festival de la bira": once again, white stroke
First make a layer adjust the objcet on layer as per your requirement.
Add some effects from filter gallery if you required (or layer style).
Click on the text toolbar type your text (required text).Then to apply effects
right click on text layer and click on rasterize type.now you can add effects from the filter gallery to the text.(or Layer style eg-inner shadows,bevel and emboss).

top view drawings in illustrator

I would like to create a city of top view. For example, something similiar as these images:
http://image.shutterstock.com/display_pic_with_logo/73497/73497,1329086967,2/stock-photo-city-top-view-95061103.jpg
http://www.bigcitypix.com/image/big-city-pictures-logo-gearhead-city-buildings-cross-streets-aerial-rooftops-roof-top-high-angle-overhead-view-film-video-shoot-graphic-media-company-brand-image-700x460.gif
I work in adobe Illustrator. Please, how can I do a building of top view? Can I make a building in the perspective view and then rotate to the top view? Or how? Please, if you know about a good tutorial where it is describes, could you send me the link? Thanks.
For the first image, I would go to 3d programs like 3ds Max / sketchup for that effect.
For the second image,
You could use:
- draw some squares
- go to "effect" at the top menu, "3D" - "extrude and bevel"
Hope that helps
Please check that only first image opens.
Its way too easy to do like this. Just hit "M" in illustrator and start making squares and rectangles.
Cheers!