Hello!
I want to use the result from a CF file as a backgroud for another. Is it possible?
Thanks in advance.
Using the result from .cfdg file as a backgroud
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Re: Using the result from .cfdg file as a backgroud
Not within Context Free itself. You can set the background of the top cfdg file to transparent and them composite them using a bitmap editor. The code for setting a transparent background is:
or
Code: Select all
background {a -1} // version 2
Code: Select all
CF::Background = [a -1] // version 3
Re: Using the result from .cfdg file as a backgroud
Thank you very much!
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Re: Using the result from .cfdg file as a backgroud
Actually, you could do it in Context Free using the z-axis. If you have a shape called foreground and a shape called bkground then you could do this:
Giving the foreground shape a larger z than the bkground shape ensures that all of its parts are drawn on top.
Code: Select all
startshape scene
shape scene {
foreground [z 1000]
bkground [z -1000]
}
new FILL primitive shapes
In the New Feature I found quote New FILL primitive shape, fills the canvas with the specified color at the specified Z. Similar to the background, but you can interleaves shapes and FILLs in Z. unquote. I do not fully understand this nor did I find a specific entry in the documentation. Help is welcomed.
kind regards from DeFleur
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Re: Using the result from .cfdg file as a backgroud
Oops, I forgot to document that one. FILL works like SQUARE or CIRCLE except that the shape that it draws is a fill of the entire canvas with the specified color. The X/Y plane information is ignored but Z axis is used to determine when the FILL is drawn with respect to the other primitive shapes.