-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added transformations support (rotate() and skew())
* Faster (4x) JPEG Encoding
- Loading branch information
1 parent
8206374
commit 090047c
Showing
10 changed files
with
830 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.alivepdf.encoding | ||
{ | ||
public class BitString | ||
{ | ||
public var len:int = 0; | ||
public var val:int = 0; | ||
|
||
public function BitString(vl:int, ln:int) | ||
{ | ||
val = vl; | ||
len = ln; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.alivepdf.encoding | ||
{ | ||
public class IntBlock | ||
{ | ||
public var data:int; | ||
public var next:IntBlock; | ||
public var down:IntBlock; | ||
|
||
public function IntBlock(dt:int, nx:IntBlock, dn:IntBlock) | ||
{ | ||
data = dt; | ||
next = nx; | ||
down = dn; | ||
} | ||
|
||
public static function create8_8(arr:Array):IntBlock | ||
{ | ||
if(arr.length != 64) throw new Error("Need an 8*8 array!"); | ||
|
||
var i:int = arr.length; | ||
var item:IntBlock = null; | ||
var c7:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c6:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c5:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c4:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c3:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c2:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c1:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
var c0:IntBlock = item = new IntBlock(arr[--i], item, null); | ||
while(i != 0) { | ||
c7 = item = new IntBlock(arr[--i], item, c7); | ||
c6 = item = new IntBlock(arr[--i], item, c6); | ||
c5 = item = new IntBlock(arr[--i], item, c5); | ||
c4 = item = new IntBlock(arr[--i], item, c4); | ||
c3 = item = new IntBlock(arr[--i], item, c3); | ||
c2 = item = new IntBlock(arr[--i], item, c2); | ||
c1 = item = new IntBlock(arr[--i], item, c1); | ||
c0 = item = new IntBlock(arr[--i], item, c0); | ||
} | ||
return item; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.alivepdf.encoding | ||
{ | ||
public final class IntList | ||
{ | ||
public var data:int; | ||
public var next:IntList; | ||
|
||
public function IntList(dt:int, nx:IntList) | ||
{ | ||
data = dt; | ||
next = nx; | ||
} | ||
|
||
public static function create(arr:Array):IntList | ||
{ | ||
var i:int = arr.length; | ||
var itm:IntList = new IntList(arr[--i], null); | ||
while (--i > -1) { | ||
itm = new IntList(arr[i], itm); | ||
} | ||
return itm; | ||
} | ||
} | ||
} |
Oops, something went wrong.