Page 1 of 1

Using the result from .cfdg file as a backgroud

Posted: Sun Jan 29, 2012 7:42 am
by Veliko
Hello!

I want to use the result from a CF file as a backgroud for another. Is it possible?

Thanks in advance.

Re: Using the result from .cfdg file as a backgroud

Posted: Sun Jan 29, 2012 10:17 am
by MtnViewJohn
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:

Code: Select all

background {a -1}    // version 2
or

Code: Select all

CF::Background = [a -1]  // version 3 

Re: Using the result from .cfdg file as a backgroud

Posted: Sun Jan 29, 2012 12:52 pm
by Veliko
Thank you very much!

Re: Using the result from .cfdg file as a backgroud

Posted: Tue Jan 31, 2012 6:23 pm
by MtnViewJohn
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:

Code: Select all

startshape scene

shape scene {
    foreground [z 1000]
    bkground [z -1000]
} 
Giving the foreground shape a larger z than the bkground shape ensures that all of its parts are drawn on top.

new FILL primitive shapes

Posted: Sun Aug 12, 2012 9:37 am
by DeFleur
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.

Re: Using the result from .cfdg file as a backgroud

Posted: Tue Aug 14, 2012 5:45 am
by MtnViewJohn
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.