purePDF moved to github

As you may have noticed I’m not working with flash and actionscript anymore. However I still receive some requests regarding the Dissertation Thesis Tai Chi purePDF library I published, well I don’t remember when exactly 🙂
By the way, I decided to move the code to github, thus it will be easier for anyone still interested in that library to fork and add modifications and share to other people.

Here’s the link to the project:  https://github.com/sephiroth74/purePDF

purePDF and transparent BitmapData

http://www.siproferrara.com/?paper-writers-college Paper Writers College Recently I’ve updated purePDF to a new version fixing one bug which caused problems with PNG images.
However when you’re trying to add BitmapData with transparency  to a pdf document you probably get black backgrounds to your images. This is because internaly purePDF converts bitmapdata into 24bit tiff images, so no alpha informations.

This is a script you can use to convert your BitmapData images into transparent pdf ImageElements:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * Create a transparent ImageElement
 *
 * An ImageElement with the input bitmapdata RGB informations will be
 * created and an ImageElement will be used as mask ( using the alpha info from the bitmapdata )
 * If the input bitmapdata is not transparent a regular ImageElement will be returned.
 */

protected function createTransparentImageElement( bitmap: BitmapData ): ImageElement
{
        var output: ByteArray = new ByteArray();
        var transparency: ByteArray = new ByteArray();
        var input: ByteArray = bitmap.getPixels( bitmap.rect );
        input.position = 0;
       
        while( input.bytesAvailable ){
                const pixel: uint = input.readInt();
               
                // write the RGB informations
                output.writeByte( (pixel >> 16) & 0xff );
                output.writeByte( (pixel >> 8) & 0xff );
                output.writeByte( (pixel >> 0) & 0xff );
               
                // write the alpha informations
                transparency.writeByte( (pixel >> 24) & 0xff );
        }
       
        output.position = 0;
        transparency.position = 0;
       
        var mask: ImageElement = ImageElement.getRawInstance( bitmap.width, bitmap.height, 1, 8, transparency, null );
        var image: ImageElement = ImageElement.getRawInstance( bitmap.width, bitmap.height, 3, 8, output, null );

        if( bitmap.transparent )
        {
                mask.makeMask();
                image.imageMask = mask;
        }
        return image;
}

Essay Com Sites and here there’s a demo app: http://bit.ly/dOT2ob

FlexLayout for AsWing

As you may have noticed I’m working with AsWing right now 🙂
Today I proposed a modification of the layout system. That’s because I couldn’t find any layout which satisfied my needs: a container which grows its components in order to fill the entire container size BUT which also keep in mind the component minimum and maximum sizes.
So it will try to grow all the components to the same size, but if a component has defined a specific minimum or maximum size, take that size under consideration.

Can I Reuse Someonses College Essay Here’s a screenshot of the FlexLayout class in action ( click over the image to see the live demo ):

And here’s the code for using the layout:

1
f.getContentPane().setLayout( new FlexLayout( FlexLayout.VERTICAL, 2 ) );

Continue reading

AsWing modifications

It’s a bit since I started using AsWing. It’s really a complete ui framework for flash with many useful components.

Sample For Business Plan But as usual, when using a component set there’s always something missing. For this reason I just added to aswing these 2 components: JMultipleSlider and JLabelSlider. The first one is just a slider with the possibility to add multiple thumbs while the second one has a similar behavior to the Adobe’s label slider added in the last CS5 applications.

http://bcn.uprrp.edu/trash/?buy-a-dissertation-online-oldenburg Buy A Dissertation Online Oldenburg

Distort Tool using triangles

http://sacredsourcework.com/?buy-research-papers-no-plagiarism Buy Research Papers No Plagiarism So just to continue the topic of distorting images using the Graphics.drawTriangles method, like the first experiments I did before, I did my implementation of a simple Distort Tool using the same method.
And here the result:

screenshot of the distort tool in action

And here you can download the source code: distort_tool.zip