Exemplo n.º 1
0
        /// <summary>
        /// Changes the current graphical context by setting the specified mode
        /// (constant starting by GC_*) to the specified value.
        /// </summary>
        /// <param name="mode">
        /// Constant that is provided by the class GraphicsContext
        /// and describes the mode that has to be changed,
        /// e.g., GraphicsContext.GC_COLOR
        /// </param>
        /// <param name="val">
        /// Value, provided as a string,
        /// the mode is to be changed to, e.g., "blue"
        /// </param>
        public void changeGraphicSettings(string mode, string val)
        {
            switch (mode)
            {
            case GraphicsContext.GC_COLOR:
                mGC.setColorAttribute(val);
                break;

            case GraphicsContext.GC_DRAWMODE:
                mGC.setDrawModeAttribute(val);
                break;

            case GraphicsContext.GC_LUT:
                mGC.setLutAttribute(val);
                break;

            case GraphicsContext.GC_PAINT:
                mGC.setPaintAttribute(val);
                break;

            case GraphicsContext.GC_SHAPE:
                mGC.setShapeAttribute(val);
                break;

            default:
                break;
            }
        }