How to draw dynamically on Rails 3? - ruby-on-rails

Goal: I want to show a preview of a banner in a web app.
Stage:
Suppose I have a Banner model with these fields:
text
vertical_align
horizontal_align
User should have a square to preview text and if user select top and left, this text must be rendered at top-left corner in the square.
I'm using Rails 3.0.9.
Problem:
I don't have idea how to implement this or if there is some "plugin" to make it easier.
Should I use some canvas widget? I don't know.
Please help me!
Thank you very much.
P.D. If you need more info please feel free to ask me.

I think you will find that rmagick and imagemagick will give you what you need. There are many examples available online including this blog post.
Good luck! :)

Related

Move a Text box in a PDF viewer using PDFKIT - Swift

I am working on this project https://github.com/kishikawakatsumi/BookReader to expand it. It is a PDF viewer implemented by PDFKIT and everything works fine there. but I have a problem in moving an element on the PDF file. I am very new to swift so I really appreciate if some one could help me any how .
I created a text box like the image below in my story board.
and in the result when I run the app is like this
you see it works fine in PDFViewr too. now my problem is that I want to find a way to move this yellow text box during the page by touching it (and also change the height and width of it ). once before , I have found a way using GestureRecognizer but it does not work more after iOS 13. I searched a lot but I all my efforts failed because non of the solutions worked for my project. I really appreciate if help me and even if payment needed, Its very important for me
Thank you very very much

How can I add more image sliders on a parallax website?

I'm busy with an update for my website. At the moment I have this: http://thijmtu141.141.axc.nl/. When you go to portfolio and you click there you see my portfolio page. I would like to put an image slider on every page (graphic design, photographic, art, film) next to the text. I have tried a lot but nothing has worked. Does anyone know a solution to help me?
Thanks,
Thijmen
p.s. Sorry for my bad English I'm from the Netherlands.

Animation on top of uiviewcontroller like facebook app

The new facebook app has a new feature. There is a little circle in the bottom of a message that means where is the user in the conversation. (hist last seen message).
It is pretty awesome, but i couldn´t figure out how it was developed. I´m pretty sure they created a new cell type, to show where is each user in the conversation. And then, if the user reads it, it just update the table and the user will be in another message that he just read. This would be ok.
But my question is, during this transition, the little circle is animated from the current message to the new position, and the others little circle are animated to make space for the new coming little circle. How is that possible? To animate something on top of a listview?
Thanks in regards,
Can you give me a screenshot of what you're talking about so I can look at it, or give steps to get to the screen you're talking about?
Facebook does some pretty remarkable stuff with iOS. If you want to see some of the crazier things, check out the app Paper that was developed using the Pop Framework. In there you might find some of the UI actions you're looking for.

How can i design a list of images in PSCollectionView with different Heights?

Iam new to ios development.I confused to design like a screen which i attached here.
Please help me if anyone know how to design like this.Iam not yet started to design the screen.
Thanks in Advance....![design like this screen][1]
this is WaterfallCollectionView sample code as per your requirement

How can I get a slot machine effect in the IOS SDK with text?

I need to create a list of words then have the words cycle through in a slot machine effect when swiped from top to bottom.
the only issues I'm having problems figuring out is the scrolling text part. UIPICKERVIEW doesn't cycle around (plus I need to only show one option at a time). I've hunted for examples and/or tutorials regarding this but haven't found anything that points me in the right direct.
Anyone know of a tutorial or have suggestions where I can get started or further my research? thanks.
You could use iCarousel for this:
https://github.com/nicklockwood/iCarousel
Run the Basic iOS Demo and select the Cylinder carousel type in vertical orientation with wrap on. If that looks like what you want, the documentation will explain how you can set it up in your project.

Resources