Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGSTransitionMBS class.

CGSTransitionMBS.Invoke(duration as single)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 7.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Performs the transition.
Example
// cube transition for the whole screen
dim r as CGSTransitionRequestMBS
dim co as CGSConnectionMBS // global property
dim ct as CGSTransitionMBS // global property

co=new CGSConnectionMBS

r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSCube
r.TransitionOption=r.CGSLeft
r.HasBackGround=true
r.HasBackColor=false

ct=co.NewTransition(r)
if ct<>Nil then
window1.refresh // draw new screen
ct.invoke 5
ct.wait 5
ct.release
else
MsgBox "Error creating the transition."
end if

duration is the time in seconds the duration will need to complete.
Lasterror is set.

CGSTransitionMBS.Release

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 7.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Releases the transaction.
Example
dim r as CGSTransitionRequestMBS
dim co as CGSConnectionMBS // global property
dim ct as CGSTransitionMBS // global property
dim cw as CGSWindowMBS

co=new CGSConnectionMBS

cw=co.CGSWindow(window1)

r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSCube
r.TransitionOption=r.CGSLeft
r.HasBackGround=false
r.HasBackColor=false
r.Win=cw

ct=co.NewTransition(r)
if ct<>Nil then
window1.refresh // draw new screen
ct.invoke 5
ct.wait 5
ct.release
else
MsgBox "Error creating the transition."
end if

Lasterror is set.
Must be called after performing a transition, but not before the transition is finished.

CGSTransitionMBS.Run(duration as single)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 7.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Runs a transition effect for the given duration.
Example
dim r as CGSTransitionRequestMBS
dim co as CGSConnectionMBS // global property
dim ct as CGSTransitionMBS // global property
dim cw as CGSWindowMBS

co=new CGSConnectionMBS

cw=co.CGSWindow(window1)

r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSCube
r.TransitionOption=r.CGSLeft
r.HasBackGround=false
r.HasBackColor=false
r.Win=cw

ct=co.NewTransition(r)
if ct<>Nil then
window1.Refresh // draw new window

ct.run(2)
else
MsgBox "Error creating the transition."
end if

Same as calling Invoke, Wait and Release.

CGSTransitionMBS.Wait(duration as single)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 7.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Waits the given time in second.
Example
// instead of wait(5) you can do this to give time to other threads and timers of your application:

dim ct as CGSTransitionMBS
dim t as Integer

t=ticks+300 // 60th of a second * 300 = 5 seconds

while ticks<t
ct.wait(0.1)
app.YieldToNextThread
wend

All the CPU time is given away to other applications to give maximum performance to the transition.

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...