# cdCanvasSimulate

Definition: | include pGUI.e integer prev_mode = cdCanvasSimulate(cdCanvas canvas, integer mode)
Description: | Activates the simulation of one or more primitives.
pwa/p2js: | Not supported.
Comments: | It is ignored for the canvas in the ImageRGB context, because in this case everything is already simulated. It also has no effect for primitives that are usually simulated. It returns the previous simulation, but does not include primitives that are usually simulated. The simulation can be activated at any moment. For instance, if a line simulation is required only in one specific case, the simulation can be activated for the line to be drawn, and then deactivated. If simulation is activated the driver transformation matrix is disabled. See in the Simulation sub-driver the information on how each simulation is performed. The mode parameter is a combination of the following values: CD_SIM_NONE - Deactivates all kinds of simulation. CD_SIM_LINE CD_SIM_RECT CD_SIM_BOX CD_SIM_ARC CD_SIM_SECTOR CD_SIM_CHORD CD_SIM_POLYLINE CD_SIM_POLYGON CD_SIM_TEXT CD_SIM_ALL - Activates all simulation options. CD_SIM_LINES - Combination of CD_SIM_LINE, CD_SIM_RECT, CD_SIM_ARC and CD_SIM_POLYLINE. CD_SIM_FILLS - Combination of CD_SIM_BOX, CD_SIM_SECTOR, CD_SIM_CHORD and CD_SIM_POLYGON. To activate more than one of these simulataneously, use or_all().