persist_image - Flag the video object as video context persistant.
bool
persist_image( vid )
Some objects, and especially those linked to frameservers, may need to survive
otherwise aggressive operations like push_video_context . This function
attempts to promote the referenced object to such a state. This ability comes
with several restrictions however. In practice, objects that are linked, has a
frameset or in other ways maintain horizontal references (within the same
context) are prohibited from being flagged as persistant.
function persist_image0()
a = fill_surface(32, 32, 255, 0, 0);
b = fill_surface(32, 32, 0, 255, 0);
show_image({a, b});
assert(persist_image(a) == true);
push_video_context();
end
function persist_image0()
a = fill_surface(32, 32, 255, 0, 0);
b = fill_surface(32, 32, 0, 255, 0);
show_image({a, b});
persist_image(a);
push_video_context();
delete_image(a);
end
function persist_image1()
a = fill_surface(32, 32, 255, 0, 0);
b = fill_surface(32, 32, 0, 255, 0);
show_image({a, b});
persist_image(a);
link_image(a, b);
end
function persist_image2()
a = fill_surface(32, 32, 255, 0, 0);
b = fill_surface(32, 32, 0, 255, 0);
show_image({a, b});
persist_image(a);
link_image(b, a);
end
function persist_image3()
a = fill_surface(32, 32, 255, 0, 0);
b = fill_surface(32, 32, 0, 255, 0);
show_image({a, b});
persist_image(a);
c = instance_image(a);
push_video_context();
end
push_video_context(3) pop_video_context(3)