Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新谷主代码 #16

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4b9ae93
增加 库项目的配置文件
wangsen3 Nov 6, 2017
504c061
合并 ktv 库项目
wangsen3 Nov 6, 2017
3e85a08
修改 发送socket 是否有消息头
wangsen3 Dec 26, 2017
a774835
Merge branch 'master' of https://github.com/fairygui/FairyGUI-as3 int…
wangsen3 Dec 26, 2017
3553da3
提交合并 谷主代码的修改
wangsen3 Dec 26, 2017
b715648
修改 合并 谷主代码的冲突
wangsen3 Dec 26, 2017
25c6ee2
删除没有必要的文件
wangsen3 Jan 6, 2018
8f32f83
Merge branch 'master' of https://github.com/fairygui/FairyGUI-as3
wangsen3 Jan 6, 2018
281fd20
首次导入fb 的变化
wangsen3 Mar 19, 2018
2fddf93
Merge branch 'master' of https://github.com/fairygui/FairyGUI-as3
wangsen3 Mar 19, 2018
58a0e4b
null
wangsen3 Mar 19, 2018
d3bacab
Merge branch 'master' of https://github.com/690275538/FairyGUI-as3
wangsen3 Mar 19, 2018
b66d0d2
忽略swc文件
wangsen3 Apr 2, 2018
0f03475
Merge branch 'master' of https://github.com/fairygui/FairyGUI-as3
wangsen3 Apr 2, 2018
59468b6
忽略 bin swc文件
wangsen3 Apr 2, 2018
5dfc290
Merge branch 'master' of https://github.com/fairygui/FairyGUI-as3
wangsen3 May 28, 2018
aadd608
修改 合并谷主 代码 产生的bug
wangsen3 May 28, 2018
de0892a
Merge branch 'master' of https://github.com/fairygui/FairyGUI-as3
wangsen3 Dec 3, 2018
4ce0182
修改合并谷主代码的bug
wangsen3 Dec 4, 2018
38fecba
Squashed commit of the following:
wangsen3 Dec 4, 2018
4e95a15
Merge branch 'master' of https://github.com/690275538/FairyGUI-as3
wangsen3 Dec 4, 2018
dd09738
2019.7.29
wangsen3 Jul 29, 2019
8fee4f8
Squashed commit of the following:
wangsen3 Jul 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/FairyGUI-as3/bin/*.swc
/FairyGUI-as3/bin
bin
22 changes: 19 additions & 3 deletions FairyGUI-as3/.actionScriptProperties
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="FairyGUI.as" projectUUID="f87d479b-e86f-4906-b794-4f42710e6608" version="11">
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" flexSDK="Flex 4.7" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="true" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="false">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path="">
<modifiedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/advancedgrids.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/asc-support.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/authoringsupport.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/charts.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flash-integration.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="2" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/osmf.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/rpc.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/spark.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/sparkskins.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/spark_dmv.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/textLayout.swc" useDefaultLinkType="false"/>
</modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="2" path="libs"/>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
Expand All @@ -21,3 +35,5 @@
<buildCSSFiles/>
<flashCatalyst validateFlashCatalystCompatibility="false"/>
</actionScriptProperties>


8 changes: 8 additions & 0 deletions FairyGUI-as3/.flexLibProperties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flexLibProperties includeAllClasses="true" useMultiPlatformConfig="false" version="3">
<includeClasses>
<classEntry path="ktv.inter.ITemplateFun"/>
</includeClasses>
<includeResources/>
<namespaceManifests/>
</flexLibProperties>
Binary file removed FairyGUI-as3/bin/FairyGUI-as3.swc
Binary file not shown.
Binary file added FairyGUI-as3/libs/flTween.swc
Binary file not shown.
100 changes: 100 additions & 0 deletions FairyGUI-as3/src/com/google/zxing/BarcodeFormat.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing
{
/**
* Enumerates barcode formats known to this package.
*
* @author Sean Owen
*/
import com.google.zxing.common.flexdatatypes.HashTable;
import com.google.zxing.common.flexdatatypes.IllegalArgumentException;

public class BarcodeFormat
{
// No, we can't use an enum here. J2ME doesn't support it.

private static var VALUES:HashTable = new HashTable();

/** Aztec 2D barcode format. */
public static var AZTEC:BarcodeFormat = new BarcodeFormat("AZTEC");
/** CODABAR 1D format. */
public static var CODABAR:BarcodeFormat = new BarcodeFormat("CODABAR");
/** QR Code 2D barcode format. */
public static var QR_CODE:BarcodeFormat = new BarcodeFormat("QR_CODE");
/** DataMatrix 2D barcode format. */
public static var DATAMATRIX:BarcodeFormat = new BarcodeFormat("DATAMATRIX");
/** UPC-E 1D format. */
public static var UPC_E:BarcodeFormat = new BarcodeFormat("UPC_E");
/** UPC-A 1D format. */
public static var UPC_A:BarcodeFormat = new BarcodeFormat("UPC_A");
/** UPC/EAN extension format. Not a stand-alone format. */
public static var UPC_EAN_EXTENSION:BarcodeFormat = new BarcodeFormat("UPC_EAN_EXTENSION");
/** EAN-8 1D format. */
public static var EAN_8:BarcodeFormat = new BarcodeFormat("EAN_8");
/** EAN-13 1D format. */
public static var EAN_13:BarcodeFormat = new BarcodeFormat("EAN_13");
/** Code 128 1D format. */
public static var CODE_128:BarcodeFormat = new BarcodeFormat("CODE_128");
/** Code 93 1D format. */
public static var CODE_93:BarcodeFormat = new BarcodeFormat("CODE_93");
/** Code 39 1D format. */
public static var CODE_39:BarcodeFormat = new BarcodeFormat("CODE_39");
/** ITF (Interleaved Two of Five) 1D format. */
public static var ITF:BarcodeFormat = new BarcodeFormat("ITF");
/** PDF417 format. */
public static var PDF417:BarcodeFormat = new BarcodeFormat("PDF417");
/** RSS 14 */
public static var RSS_14:BarcodeFormat = new BarcodeFormat("RSS_14");
/** RSS EXPANDED */
public static var RSS_EXPANDED:BarcodeFormat = new BarcodeFormat("RSS_EXPANDED");
/** MAXICODE */
public static var MAXICODE:BarcodeFormat = new BarcodeFormat("MAXICODE");

private var _name:String;

public function BarcodeFormat(name:String)
{
this._name = name;
VALUES._put(name, this);
}

public function toString():String
{
return this._name;
}


public function get name():String
{
return this._name;
}

public static function valueOf(name:String):BarcodeFormat
{
if (name == null || name.length == 0) {
throw new IllegalArgumentException();
}
var format:BarcodeFormat = (VALUES._get(name) as BarcodeFormat);
if (format == null)
{
throw new IllegalArgumentException();
}
return format;
}

}
}
98 changes: 98 additions & 0 deletions FairyGUI-as3/src/com/google/zxing/Binarizer.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/*
* Copyright 2013 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.zxing
{
/**
* This class hierarchy provides a set of methods to convert luminance data to 1 bit data.
* It allows the algorithm to vary polymorphically, for example allowing a very expensive
* thresholding technique for servers and a fast one for mobile. It also permits the implementation
* to vary, e.g. a JNI version for Android and a Java fallback version for other platforms.
*
* @author [email protected] (Daniel Switkin)
*/

public class Binarizer
{

import com.google.zxing.common.BitArray;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.flexdatatypes.IllegalArgumentException;

private var source:LuminanceSource;

public function Binarizer(source:LuminanceSource)
{
if (source == null)
{
throw new IllegalArgumentException("Source must be non-null.");
}
this.source = source;
}

public function getLuminanceSource():LuminanceSource
{
return source;
}

/**
* Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
* cached data. Callers should assume this method is expensive and call it as seldom as possible.
* This method is intended for decoding 1D barcodes and may choose to apply sharpening.
* For callers which only examine one row of pixels at a time, the same BitArray should be reused
* and passed in with each call for performance. However it is legal to keep more than one row
* at a time if needed.
*
* @param y The row to fetch, 0 <= y < bitmap height.
* @param row An optional preallocated array. If null or too small, it will be ignored.
* If used, the Binarizer will call BitArray.clear(). Always use the returned object.
* @return The array of bits for this row (true means black).
*/
public function getBlackRow(y:int, row:BitArray):BitArray
{
return null;
}

/**
* Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive
* and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
* may not apply sharpening. Therefore, a row from this matrix may not be identical to one
* fetched using getBlackRow(), so don't mix and match between them.
*
* @return The 2D array of bits for the image (true means black).
*/
public function getBlackMatrix():BitMatrix
{
return null
}

/**
* Creates a new object with the same type as this Binarizer implementation, but with pristine
* state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
* of 1 bit data. See Effective Java for why we can't use Java's clone() method.
*
* @param source The LuminanceSource this Binarizer will operate on.
* @return A new concrete Binarizer implementation object.
*/
public function createBinarizer(source:LuminanceSource ):Binarizer
{
return null
}



}
}
141 changes: 141 additions & 0 deletions FairyGUI-as3/src/com/google/zxing/BinaryBitmap.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.zxing
{
/**
* This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects
* accept a BinaryBitmap and attempt to decode it.
*
* @author [email protected] (Daniel Switkin)
*/

import com.google.zxing.common.BitArray;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.flexdatatypes.IllegalArgumentException;

public final class BinaryBitmap
{
private var binarizer:Binarizer;
private var matrix:BitMatrix;

public function BinaryBitmap( binarizer:Binarizer)
{
if (binarizer == null)
{
throw new IllegalArgumentException("Binarizer must be non-null.");
}
this.binarizer = binarizer;
matrix = null;
}

/**
* @return The width of the bitmap.
*/
public function getWidth():int
{
return binarizer.getLuminanceSource().getWidth();
}

/**
* @return The height of the bitmap.
*/
public function getHeight():int
{
return binarizer.getLuminanceSource().getHeight();
}

/**
* Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
* cached data. Callers should assume this method is expensive and call it as seldom as possible.
* This method is intended for decoding 1D barcodes and may choose to apply sharpening.
*
* @param y The row to fetch, 0 <= y < bitmap height.
* @param row An optional preallocated array. If null or too small, it will be ignored.
* If used, the Binarizer will call BitArray.clear(). Always use the returned object.
* @return The array of bits for this row (true means black).
*/
public function getBlackRow(y:int, row:BitArray) :BitArray
{
return binarizer.getBlackRow(y, row);
}

/**
* Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive
* and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
* may not apply sharpening. Therefore, a row from this matrix may not be identical to one
* fetched using getBlackRow(), so don't mix and match between them.
*
* @return The 2D array of bits for the image (true means black).
*/
public function getBlackMatrix():BitMatrix
{
// The matrix is created on demand the first time it is requested, then cached. There are two
// reasons for this:
// 1. This work will never be done if the caller only installs 1D Reader objects, or if a
// 1D Reader finds a barcode before the 2D Readers run.
// 2. This work will only be done once even if the caller installs multiple 2D Readers.
if (matrix == null)
{
matrix = binarizer.getBlackMatrix();
}
return matrix;
}

/**
* @return Whether this bitmap can be cropped.
*/
public function isCropSupported():Boolean
{
return binarizer.getLuminanceSource().isCropSupported();
}

/**
* Returns a new object with cropped image data. Implementations may keep a reference to the
* original data rather than a copy. Only callable if isCropSupported() is true.
*
* @param left The left coordinate, 0 <= left < getWidth().
* @param top The top coordinate, 0 <= top <= getHeight().
* @param width The width of the rectangle to crop.
* @param height The height of the rectangle to crop.
* @return A cropped version of this object.
*/
public function crop(left:int, top:int, width:int, height:int ):BinaryBitmap {
var newSource:LuminanceSource = binarizer.getLuminanceSource().crop(left, top, width, height);
return new BinaryBitmap(binarizer.createBinarizer(newSource));
}

/**
* @return Whether this bitmap supports counter-clockwise rotation.
*/
public function isRotateSupported():Boolean
{
return binarizer.getLuminanceSource().isRotateSupported();
}

/**
* Returns a new object with rotated image data. Only callable if isRotateSupported() is true.
*
* @return A rotated version of this object.
*/
public function rotateCounterClockwise():BinaryBitmap
{
var newSource:LuminanceSource = binarizer.getLuminanceSource().rotateCounterClockwise();
return new BinaryBitmap(binarizer.createBinarizer(newSource));
}

}
}
Loading