Exemplo n.º 1
0
        public void Apply(RippleEffect effect, DrawingLayer sourceLayer, DrawingLayer targetLayer)
        {
            effect.Center = Center;
            effect.Amplitude = Amplitude;
            effect.Frequency = Frequency;
            effect.LightIntensity = LightIntensity;
            effect.Phase = Phase;

            sourceLayer.ApplyEffect(effect, targetLayer);
        }
Exemplo n.º 2
0
        private void InitializeResources()
        {
            var factory = m_mainLayer.Factory;

            /* Initialize the drawing layer using our hard coded dimensions */
            m_tempLayer = factory.CreateDrawingLayer(SCENE_WIDTH, SCENE_HEIGHT);

            /* This will read an image from a file, create a DrawingLayer at the
             * same dimensions as the file, then copy the image to the DrawingLayer */
            m_bitmap = factory.CreateDrawingLayerFromFile(@".\Assets\Radioactive.jpg");

            /* Create a new ripple effect */
            m_rippleEffect = new RippleEffect(factory);

            nullRipple = new RippleSettings()
                {
                    Amplitude = 0f,
                    LightIntensity = 0f
                };
        }