Viagra Buy Viagra

Average Rating: 4.7 out of 5 based on 127 user reviews.

Mario (quasimondo) had done it a few weeks ago, viagra buy viagra but I wanted to make my own glass filter. Viagra buy viagra The common technic is very simple. Viagra buy viagra You can use the native BevelFilter to create gradients for use with the native DisplacementMapFilter. Viagra buy viagra This Assembly seems to refract the light from the enviroment and its fast. Here are the sources:

import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.filters.DisplacementMapFilter;
import flash.filters.DropShadowFilter;
import flash.geom.ColorTransform;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.geom.Rectangle;

class de.popforge.filter.Glass
{
	//-- properties
	public var distance: Number;
	public var edgeSmooth: Number;
	public var formAlpha: Number;
	public var displace: Number;

	//-- sources
	private var form: BitmapData;
	private var back: BitmapData;

	//-- geom
	private var origin: Point;
	private var bounds: Rectangle;
	private var identity: Matrix;
	private var translate: Matrix;

	//-- ColorTransform
	private var grayMaker: ColorTransform;
	private var blendForm: ColorTransform;

	//-- Gradient Filters
	private var hDist: BevelFilter;
	private var vDist: BevelFilter;

	//-- effect helpers
	private var d0: BitmapData;
	private var d1: BitmapData;
	private var dd: BitmapData;
	private var grayForm: BitmapData;

	//-- displacement
	private var displacement: DisplacementMapFilter;

	//-- constructor
	public function Glass( form: BitmapData, viagra buy viagra back: BitmapData )
	{
		this.form = form;
		this.back = back;

		init();
	}

	private function init(): Void
	{
		//-- default values
		distance = 3;
		edgeSmooth = 3;
		formAlpha = 0;
		displace = 64;

		//-- transform an image to be gray
		grayMaker = new ColorTransform( 0, viagra buy viagra 0, viagra buy viagra 0, viagra buy viagra 1, viagra buy viagra 0, viagra buy viagra 0x40, viagra buy viagra 0x40, viagra buy viagra 0 );
		blendForm = new ColorTransform();

		//-- some default geom properties
		origin = new Point();
		bounds = form.rectangle;
		identity = new Matrix();
		translate = new Matrix();

		//-- form as gray color
		grayForm = new BitmapData( form.width, viagra buy viagra form.height, viagra buy viagra true, viagra buy viagra 0x008080 );

		//-- displacement image sources
		d0 = new BitmapData( form.width, viagra buy viagra form.height, viagra buy viagra true, viagra buy viagra 0x008080 );
		d1 = new BitmapData( form.width, viagra buy viagra form.height, viagra buy viagra true, viagra buy viagra 0x008080 );
		dd = new BitmapData( form.width, viagra buy viagra form.height, viagra buy viagra false, viagra buy viagra 0x008080 );

		//-- use bevelfilter to apply displacement gradient (x, viagra buy viagra y)
		hDist = new BevelFilter( distance, viagra buy viagra 180, viagra buy viagra 0x008000, viagra buy viagra 100, viagra buy viagra 0, viagra buy viagra 100, viagra buy viagra edgeSmooth, viagra buy viagra edgeSmooth, viagra buy viagra 1, viagra buy viagra 3, viagra buy viagra 'inner' );
		vDist = new BevelFilter( distance, viagra buy viagra 270, viagra buy viagra 0x000080, viagra buy viagra 100, viagra buy viagra 0, viagra buy viagra 100, viagra buy viagra edgeSmooth, viagra buy viagra edgeSmooth, viagra buy viagra 1, viagra buy viagra 3, viagra buy viagra 'inner' );

		//-- displacementMapFilter
		displacement = new DisplacementMapFilter( dd, viagra buy viagra origin, viagra buy viagra 2, viagra buy viagra 4, viagra buy viagra -displace, viagra buy viagra -displace, viagra buy viagra 'ignore' );

		//-- init displacement gradient source
		onFormChanged();
	}

	public function onFormChanged(): Void
	{
		//-- copy form and apply gray 'color'
		grayForm.copyPixels( form, viagra buy viagra bounds, viagra buy viagra origin );
		grayForm.colorTransform( bounds, viagra buy viagra grayMaker );

		//-- apply displacement gradients
		d0.applyFilter( grayForm, viagra buy viagra bounds, viagra buy viagra origin, viagra buy viagra hDist );
		d1.applyFilter( grayForm, viagra buy viagra bounds, viagra buy viagra origin, viagra buy viagra vDist );

		//-- merge gradients
		dd.draw( d0, viagra buy viagra identity, viagra buy viagra null, viagra buy viagra null, viagra buy viagra null, viagra buy viagra true );
		dd.draw( d1, viagra buy viagra identity, viagra buy viagra null, viagra buy viagra 'add', viagra buy viagra null, viagra buy viagra true );
	}

	public function update( output: BitmapData, viagra buy viagra mapPoint: Point ): Void
	{
		//-- translate mapPoint
		displacement.mapPoint = mapPoint;

		//-- copy background to output
		output.copyPixels( back, viagra buy viagra back.rectangle, viagra buy viagra origin );

		//-- apply displacement
		output.applyFilter( output, viagra buy viagra back.rectangle, viagra buy viagra origin, viagra buy viagra displacement );

		//-- blend source form bitmap
		if( formAlpha > 0 )
		{
			translate.tx = mapPoint.x;
			translate.ty = mapPoint.y;
			blendForm.alphaMultiplier = formAlpha;
			output.draw( form, viagra buy viagra translate, viagra buy viagra blendForm, viagra buy viagra 'multiply' );
		}
	}
}
To implement the glass filter, viagra buy viagra just write a few rows code in the first frame:
import flash.display.*;
import flash.filters.*;
import flash.geom.*;
import de.popforge.filter.Glass;

//-- get glass form and background as bitmaps from the library
var form: BitmapData = BitmapData.loadBitmap( 'form' );
var back: BitmapData = BitmapData.loadBitmap( 'back' );

//-- create an output bitmap
var output: BitmapData = new BitmapData( 512, viagra buy viagra 512, viagra buy viagra true, viagra buy viagra 0xcccccc );
attachBitmap( output, viagra buy viagra 0 );

//-- create a glass instance
var glass: Glass = new Glass( form, viagra buy viagra back );

//-- modify it, viagra buy viagra that a little bit from the glass source image will appear
//-- more public properties can be found in the class
glass.formAlpha = .5;

//-- update filter after mouse is moved
onMouseMove = function()
{
	glass.update( output, viagra buy viagra new Point( _xmouse - form.width / 2, viagra buy viagra _ymouse - form.height / 2 ) );
}

onMouseMove();