seraph_nyc Posted April 28, 2009 Posted April 28, 2009 Hi, Is there a way with scriptmaster to put text into a container. Kaostika
LaRetta Posted April 29, 2009 Posted April 29, 2009 Hi Kaostika, Sure, you can use: Set Field [ containerField ; textField ] Commit Records/Requests But why would you want to do that instead of simply using the text field? Once you put text into a container, you lose the ability to modify or search that data. LaRetta
Lee Smith Posted April 29, 2009 Posted April 29, 2009 Hi, Is there a way with [color:blue]scriptmaster to put text into a container. Kaostika Are you asking about ScriptMaker, or ScriptMaster, as in this product Link If the later, then we should move it. Lee
seraph_nyc Posted April 29, 2009 Author Posted April 29, 2009 Yes Sharp! I mean the 360 works Scriptmaster. I want to put text over a gradient. kaostika
David Wikström Posted May 2, 2009 Posted May 2, 2009 Hi Kaostika, You can do this if you combine the "Java Drawing Example" (in the example database that comes with ScriptMaster 2.08) with the "Gradient Image" example. Add a third input variable "textstring" and modify the gradient code by including the creation of the text: import java.awt.*; import java.awt.image.*; import javax.imageio.*; int width=500; int height=200; Color c1 = Color.decode(color1); Color c2 = Color.decode(color2); GradientPaint gradient = new GradientPaint(0, 0, c1, width, height, c2); BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g = img.createGraphics(); g.setPaint(gradient); g.fillRect(0, 0, width, height); // draw a transparent watermark string g.setColor(new Color(0, 255, 255, 100)); g.setFont(new Font("Verdana", Font.BOLD, 24)); g.drawString(textstring, 100, 100); return img; You may have to play around with it to position the text nicely, either hard coding or adding more variables.
Recommended Posts
This topic is 5696 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now