Fire Monkey Image view area - delphi

I want to create simple 2d racing game on FM, I have track (racing map) bitmap. Image component must show only part of that bitmap depending on car position. Is there any way to define coordinates of bitmap's start point, from which Image will show this bitmap. If Image doesn't support that, what component does? Thanks.

Use a TSubImage. This component is similar to a TImage, but lets you specify a sub-section of the image to be displayed.

Related

What does Tile based rendering mean?

tile based
I am wondering what ‘tile based’ here means about figma.
Any one got any paper or ideas.
Thanks a lot!!!!
Divide your canvas up into a grid. Each square on that grid is a tile. This renderer would render each of those tiles individually, then save the resulting image somewhere. Each of these images are then drawn onto the grid at the spot where they are supposed to go.
It allows The renderer to cache each tile, so it only needs to render tiles that just came into view. Or if something in one tile changes, you only need to re-render that one tile and not the entire screen.

How to recolor an image on specific area?

I'm trying to create an iOS recoloring app (this is my reference), and i need to know how recolor some portion of the image when user taps on a given area. All the loaded pictures will be black/white initially.
Is there any prebuilt library? Or which graphics framework should i use?
Any help will be appreciated.
If what you are looking for is adding/replacing the colour within a certain shape and edges are really important (as in the example) then you should be looking into vectorised drawing.
What this means is every shape in your image would have an actual object representation in your code, and you could easily interact with that object to do whatever you want (i.e. tap gestures to change colour, zoom etc.).
This however, means that you can't simply use .jpeg images, and you need to use images in vector format, such as .svg or CorelDraw.
As a reference, check out SVGKit, which is an excellent library for working with SVG images.

How to add rain effect to a picture?

Given a picture, I would like to modify it to create the effect of rain on glass. What steps should I take to achieve this goal?
Suppose we want to add the effect of a single drop of water on a given point in an image, some pixels around that point should be modified in some way: how these pixels should be modified?
Simple way is to just make transparent image that is actually image overlay. That looks like common approach of water drop effects in gimp.
example:
http://natural-drops.deviantart.com/art/drop-of-rain-373710307
I think that in order to make optically correct image one need to have full 3D info of environment, because most optics equations that one needs to simulate correct image includes each object distance.

Put marker on the image in OpenCV

I'm showing an image using cv::imshow("binary1", binary1);. I want to put a marker on the image to the check the pixel locations. How can I put marker on the image for a particular row and column value?
It's difficult to understand what is it that you want to do, but I wrote a code a while back that displays the RGB color of a pixel along with it's coordinates on the title of the window. Move the mouse pointer over the image and you'll see it change.
It uses a Qt window, though. You can check cvImage.

XNA draw / paint onto a Texture2D at runtime

Morning all (if its morning where you are)
I have been looking around and have not seen a satisfactory method for doing this so thought I would ask around...
Ideal world I would like to be able to generate a transparent Texture2D object. Drawing this to the screen I would like to be able to "paint" to it, i.e. when the left mouse button is down whatever pixel the cursor is over should be set to black. Following this I would then need to be able to use this texture.
Using the texture is the easy part, we can simply make a new Texture2D attribute for a "painting" object and use that in the SpriteBatch.Draw method. The two tricky parts are
Generating a texture2D object of a specified size, filled with transparency in code.
Editing that texture2D on the fly (i.e. being able to alter pixel colours)
If anyone has any experience of these you input would be very much appreciated.
You can either use a RenderTarget2D (MSDN), which is itself a Texture2D (so you can use it in SpriteBatch.Draw). This allows you to render onto a texture in the same way you render onto the screen. You need to use GraphicsDevice.SetRenderTarget (MSDN) to set this up.
Or you can use Texture2D.SetData (MSDN) to manipulate pixels directly. You can construct a transparent Texture2D directly (MSDN). Don't forget to Dispose of any textures or other resources you create yourself!

Resources