How to add image in GL_Line in openGLES (iPhone)? - iphone

Currently i am working in simple game application, using GL_Line to draw a line and its working fine, then i tried to add (Anchor) image, at the end of the line. but i cannot know, How to fix this?, so can any one help me?

Why don't you draw a textured quad to get this done?
You can just glTranslate to the end of the line and draw the quad.

Related

How to draw custom shapes in flutter

I'm trying to draw a custom shape like this in my app:
Tried to draw using custom painter, but haven't figured out how to get this sort of shape. It's really just a container with a custom border I think, but not sure even where to start. It's just the shape I'm interested in, not the content.
Or if someone knows how to draw a rounded rectangle with a thinner bottom section, then that would really help me to work out the rest.
Also, does anyone here know how to draw a rounded rectangle that is thinner in the middle, like the shape behind the purple one in the example I've given?
Any help is grately appreciated.
Thanks in advance
use this tools
this is the link
download it for your windows and draw your shape and generate the code..
here is the tutorial on how to use the tools
the tutorial on how to use it

What method is used to create a multiple curved line with Sprite Kit using swift?

I'm in the process of creating a game using sprite kit and swift - the question I have is... Is there any way to create the "RED" line shown in the attached image by setting points - Instead of flat ground I'm looking for more of a "Tiny Wings" style wave.
Attached image shows blue blocks falling with gravity and resting in the low points of the line.
I just want to draw the RED line using Sprite Kit and swift where the line could be as long as I set it for.
Thank you in advance for the help or ideas
SOF won't let me attach image - here's a link:
Img Link: https://sites.google.com/site/imagestoreage428/home/red-line.png

How to draw Custom lines on touch move in Cocos2D in iOS?

I am developing a puzzle game.
In this game I have to draw custom lines on touch began to touch end points. For this I searched a lot, but all tutorials or links only tell us that how can we use drawLine method for line drawing.
Drawing line on touches moved in COCOS2D is one of them, but I want to draw custom lines over my background sprite. So any one can tell me that is there any method in cocos2d so that i could use my texture image for line drawing.
If this is possible then please refer me link.
Try using CCRibbon to draw a textured line
Edit to expand
I thought I'd looked into this previously :-) This code should be adaptable for your needs also non CCRibbon method (Though it won't be as smooth as multiple CCRibbon's)

UIBezierPath onTouch Drawing Example with smooth draw line

i want to smooth and curve draw line on finger touch and using only UIBezierPath.i am new for drawing concept in iOS and i need any example or code and how to do it like my requirement can any one guide me with greatly appreciated!
Thanks in Advance!
I have one example for free hand drawing but one problem is it is not much smoother but you can have one starting point using this example.
Happy Coding :)

Fade Image to Transparent in iOS

I am just starting out with iOS development. I'm trying to determine if this is possible in iOS and I'm new enough that I don't know what to search for, so please excuse my ignorance.
I'm going to be saving a few images in the application and the primary image will fade over another image like so:
Image A will still need to be a solid image, so my question "Is it possible to create a gradient mask that only fades for 50px from the bottom (transparent) of an image?"
Sorry if this is a basic question and since I don't know where to start I don't have any code to request help on. Any help would be appreciated! :)
Yes, it is definitely possible.
You will need to draw the images in a CGContext. Basically you would first draw image b first then draw image 'a' with an alpha mask using CGImageCreateWithMask.
It is very straight forward. See here for an example.