hmp 4 lat temu
rodzic
commit
decd963609
100 zmienionych plików z 2207 dodań i 4468 usunięć
  1. 7 1
      manifest.json
  2. 1 0
      package.json
  3. 5 4
      pages.json
  4. 3 3
      pages/consume/comps/card2.vue
  5. 1 1
      pages/consume/detail/comps/shop-activity.vue
  6. 1 1
      pages/consume/detail/comps/shop-info.vue
  7. 5 5
      pages/gain/comps/card2.vue
  8. 1 4
      pages/mine/mine.vue
  9. 0 161
      pages/userBank/add.vue
  10. 0 116
      pages/userBank/userBank.vue
  11. 1 1
      pagesA/pages/bill/bill-detail.vue
  12. 1 1
      pagesA/pages/my-balance/statistics.vue
  13. 1 1
      pagesA/pages/my-points/accredit.vue
  14. 1 1
      pagesA/pages/my-points/exchange.vue
  15. 3 3
      pagesA/pages/setting/setting.vue
  16. 0 0
      pagesA/static/icon/bill.png
  17. 0 0
      pagesA/static/icon/points-value.png
  18. 0 0
      pagesA/static/icon/points.png
  19. 0 0
      pagesA/static/setting/info.png
  20. 0 0
      pagesA/static/setting/kefu.png
  21. 0 0
      pagesA/static/setting/tousu.png
  22. 735 0
      pagesB/comps/r-canvas/r-canvas.js
  23. 30 0
      pagesB/comps/r-canvas/r-canvas.vue
  24. 1201 0
      pagesB/comps/tki-qrcode/qrcode.js
  25. 210 0
      pagesB/comps/tki-qrcode/tki-qrcode.vue
  26. 0 21
      pagesB/comps/u-draw-poster/LICENSE
  27. 0 230
      pagesB/comps/u-draw-poster/README.md
  28. 0 9
      pagesB/comps/u-draw-poster/core/debugginglog.d.ts
  29. 0 21
      pagesB/comps/u-draw-poster/core/debugginglog.js
  30. 0 1
      pagesB/comps/u-draw-poster/core/debugginglog.js.map
  31. 0 97
      pagesB/comps/u-draw-poster/core/index.d.ts
  32. 0 165
      pagesB/comps/u-draw-poster/core/index.js
  33. 0 0
      pagesB/comps/u-draw-poster/core/index.js.map
  34. 0 37
      pagesB/comps/u-draw-poster/core/plugin.d.ts
  35. 0 52
      pagesB/comps/u-draw-poster/core/plugin.js
  36. 0 0
      pagesB/comps/u-draw-poster/core/plugin.js.map
  37. 0 1
      pagesB/comps/u-draw-poster/index.d.ts
  38. 0 11
      pagesB/comps/u-draw-poster/index.js
  39. 0 1
      pagesB/comps/u-draw-poster/index.js.map
  40. 0 44
      pagesB/comps/u-draw-poster/package.json
  41. 0 17
      pagesB/comps/u-draw-poster/plugins/drawImage/index.d.ts
  42. 0 43
      pagesB/comps/u-draw-poster/plugins/drawImage/index.js
  43. 0 1
      pagesB/comps/u-draw-poster/plugins/drawImage/index.js.map
  44. 0 7
      pagesB/comps/u-draw-poster/plugins/drawImage/utils.d.ts
  45. 0 27
      pagesB/comps/u-draw-poster/plugins/drawImage/utils.js
  46. 0 1
      pagesB/comps/u-draw-poster/plugins/drawImage/utils.js.map
  47. 0 21
      pagesB/comps/u-draw-poster/plugins/drawImageFit/index.d.ts
  48. 0 35
      pagesB/comps/u-draw-poster/plugins/drawImageFit/index.js
  49. 0 1
      pagesB/comps/u-draw-poster/plugins/drawImageFit/index.js.map
  50. 0 38
      pagesB/comps/u-draw-poster/plugins/drawImageFit/object-sizing.d.ts
  51. 0 78
      pagesB/comps/u-draw-poster/plugins/drawImageFit/object-sizing.js
  52. 0 0
      pagesB/comps/u-draw-poster/plugins/drawImageFit/object-sizing.js.map
  53. 0 28
      pagesB/comps/u-draw-poster/plugins/drawQrCode/index.d.ts
  54. 0 12
      pagesB/comps/u-draw-poster/plugins/drawQrCode/index.js
  55. 0 1
      pagesB/comps/u-draw-poster/plugins/drawQrCode/index.js.map
  56. 0 2
      pagesB/comps/u-draw-poster/plugins/drawQrCode/uQRCode.d.ts
  57. 0 1075
      pagesB/comps/u-draw-poster/plugins/drawQrCode/uQRCode.js
  58. 0 0
      pagesB/comps/u-draw-poster/plugins/drawQrCode/uQRCode.js.map
  59. 0 12
      pagesB/comps/u-draw-poster/plugins/drawRoundImage/index.d.ts
  60. 0 17
      pagesB/comps/u-draw-poster/plugins/drawRoundImage/index.js
  61. 0 1
      pagesB/comps/u-draw-poster/plugins/drawRoundImage/index.js.map
  62. 0 12
      pagesB/comps/u-draw-poster/plugins/fillRoundRect/index.d.ts
  63. 0 8
      pagesB/comps/u-draw-poster/plugins/fillRoundRect/index.js
  64. 0 1
      pagesB/comps/u-draw-poster/plugins/fillRoundRect/index.js.map
  65. 0 27
      pagesB/comps/u-draw-poster/plugins/fillWarpText/index.d.ts
  66. 0 82
      pagesB/comps/u-draw-poster/plugins/fillWarpText/index.js
  67. 0 0
      pagesB/comps/u-draw-poster/plugins/fillWarpText/index.js.map
  68. 0 29
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/bridge/bridge-weex.d.ts
  69. 0 183
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/bridge/bridge-weex.js
  70. 0 0
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/bridge/bridge-weex.js.map
  71. 0 15
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.d.ts
  72. 0 16
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.js
  73. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.js.map
  74. 0 6
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.d.ts
  75. 0 8
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.js
  76. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.js.map
  77. 0 17
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.d.ts
  78. 0 16
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.js
  79. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.js.map
  80. 0 98
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/RenderingContext.d.ts
  81. 0 565
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/RenderingContext.js
  82. 0 0
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/RenderingContext.js.map
  83. 0 11
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.d.ts
  84. 0 9
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.js
  85. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.js.map
  86. 0 9
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Buffer.d.ts
  87. 0 16
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Buffer.js
  88. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Buffer.js.map
  89. 0 9
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.d.ts
  90. 0 16
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.js
  91. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.js.map
  92. 0 299
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLenum.d.ts
  93. 0 299
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLenum.js
  94. 0 0
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLenum.js.map
  95. 0 139
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLmethod.d.ts
  96. 0 140
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLmethod.js
  97. 0 0
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLmethod.js.map
  98. 0 2
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLtype.d.ts
  99. 0 19
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLtype.js
  100. 0 1
      pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLtype.js.map

+ 7 - 1
manifest.json

@@ -51,8 +51,14 @@
     /* 小程序特有相关 */
     /* 小程序特有相关 */
     "mp-weixin" : {
     "mp-weixin" : {
         "appid" : "wx9ad53e8c83ae1a51",
         "appid" : "wx9ad53e8c83ae1a51",
+        "optimization" : {
+            "subPackages" : true
+        },
         "setting" : {
         "setting" : {
-            "urlCheck" : false
+            "urlCheck" : false,
+            "es6" : true,
+            "postcss" : true,
+            "minified" : true
         },
         },
         "usingComponents" : true,
         "usingComponents" : true,
         "permission" : {
         "permission" : {

+ 1 - 0
package.json

@@ -3,6 +3,7 @@
   "version": "1.0.0",
   "version": "1.0.0",
   "description": "",
   "description": "",
   "main": "main.js",
   "main": "main.js",
+  "dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
   "scripts": {
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   },

+ 5 - 4
pages.json

@@ -85,10 +85,11 @@
 			}
 			}
 
 
 		}
 		}
+
 	],
 	],
 	"subPackages": [{
 	"subPackages": [{
 			//tarbar下mine的分包
 			//tarbar下mine的分包
-			"root": "pagesA/",
+			"root": "pagesA",
 			"pages": [{
 			"pages": [{
 				"path": "pages/my-balance/statistics",
 				"path": "pages/my-balance/statistics",
 				"style": {
 				"style": {
@@ -160,7 +161,7 @@
 			}]
 			}]
 		}, {
 		}, {
 			//tarbar下gain 代理的分包
 			//tarbar下gain 代理的分包
-			"root": "pagesB/",
+			"root": "pagesB",
 			"pages": [{
 			"pages": [{
 					"path": "pages/agent/agent",
 					"path": "pages/agent/agent",
 					"style": {
 					"style": {
@@ -212,9 +213,9 @@
 
 
 				},
 				},
 				{
 				{
-					"path": "pages/agent/createPoster",
+					"path": "pages/agent/draw-poster",
 					"style": {
 					"style": {
-						"navigationBarTitleText": "生成海报",
+						"navigationBarTitleText": "推广",
 						"enablePullDownRefresh": false
 						"enablePullDownRefresh": false
 					}
 					}
 
 

+ 3 - 3
pages/consume/comps/card2.vue

@@ -14,15 +14,15 @@
 					</view>
 					</view>
 					<view class="bottom">
 					<view class="bottom">
 						<view class="">
 						<view class="">
-							<image src="../../../static/del/map1.png" mode=""></image>
+							<image src="@/static/icon/map1.png" mode=""></image>
 							<text>距离 {{distance(item.latitude,item.longitude)}} 米</text>
 							<text>距离 {{distance(item.latitude,item.longitude)}} 米</text>
 						</view>
 						</view>
 						<view class="" @click.stop="checkLine(item)">
 						<view class="" @click.stop="checkLine(item)">
-							<image style="width: 40rpx;height: 40rpx;" src="../../../static/del/lx.png" mode=""></image>
+							<image style="width: 40rpx;height: 40rpx;" src="@/static/icon/lx.png" mode=""></image>
 							<text>查看路线</text>
 							<text>查看路线</text>
 						</view>
 						</view>
 						<view class="">
 						<view class="">
-							<image src="../../../static/del/activitys.png" mode=""></image>
+							<image src="@/static/icon/activitys.png" mode=""></image>
 							<text>{{item.activityNums}}个活动</text>
 							<text>{{item.activityNums}}个活动</text>
 						</view>
 						</view>
 					</view>
 					</view>

+ 1 - 1
pages/consume/detail/comps/shop-activity.vue

@@ -45,7 +45,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view style="margin-top: 300rpx;" class="center flex flex-direction" v-else>
 		<view style="margin-top: 300rpx;" class="center flex flex-direction" v-else>
-			<image style="width: 300rpx;height: 260rpx;" src="@/static/agent/empty.png" ></image>
+			<image style="width: 236rpx;height: 176rpx;" src="@/static/icon/empty5.png" ></image>
 			<text style="font-weight: 300;margin-top: 10rpx;">暂无活动</text>
 			<text style="font-weight: 300;margin-top: 10rpx;">暂无活动</text>
 		</view>
 		</view>
 	</view>
 	</view>

+ 1 - 1
pages/consume/detail/comps/shop-info.vue

@@ -66,7 +66,7 @@
 					height: '30',
 					height: '30',
 					latitude: 0,
 					latitude: 0,
 					longitude: 0,
 					longitude: 0,
-					iconPath: '/static/del/map.png'
+					iconPath: '/static/icon/map.png'
 				}]
 				}]
 			}
 			}
 		},
 		},

+ 5 - 5
pages/gain/comps/card2.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="">
 	<view class="">
 		<view class="empty-page" v-if="vuex_agenter_type == '普通用户'">
 		<view class="empty-page" v-if="vuex_agenter_type == '普通用户'">
-			<image src="@/static/agent/empty.png" mode=""></image>
+			<image src="@/static/icon/empty.png" mode=""></image>
 			<block v-if="!$isEmpty(vuex_userId)">
 			<block v-if="!$isEmpty(vuex_userId)">
 				<view class="tips">
 				<view class="tips">
 					<text>您当前还不是代理身份</text>
 					<text>您当前还不是代理身份</text>
@@ -82,17 +82,17 @@
 				info:{},
 				info:{},
 				menuList:[
 				menuList:[
 					{
 					{
-						icon:'/static/agent/topromote.png',
+						icon:'/static/icon/topromote.png',
 						name:'去推广',
 						name:'去推广',
-						path:'/pagesB/pages/agent/promote'
+						path:'/pagesB/pages/agent/draw-poster'
 					},
 					},
 					{
 					{
-						icon:'/static/agent/mypromote.png',
+						icon:'/static/icon/mypromote.png',
 						name:'我的推广',
 						name:'我的推广',
 						path:'/pagesB/pages/agent/myPromote'
 						path:'/pagesB/pages/agent/myPromote'
 					},
 					},
 					{
 					{
-						icon:'/static/agent/myearnings.png',
+						icon:'/static/icon/myearnings.png',
 						name:'我的收益',
 						name:'我的收益',
 						path:'/pagesB/pages/agent/myIncome/myIncome'
 						path:'/pagesB/pages/agent/myIncome/myIncome'
 					},
 					},

+ 1 - 4
pages/mine/mine.vue

@@ -32,9 +32,6 @@
 							</block>
 							</block>
 						</view>
 						</view>
 					</view>
 					</view>
-					<view class="center padding-right-20" @click="jump()">
-						<image style="width: 50rpx;height: 50rpx;" src="../../static/icon/setting.png"></image>
-					</view>
 				</view>
 				</view>
 				
 				
 				<view class="cu-list grid col-3 no-border" style="border-radius:20rpx ;">
 				<view class="cu-list grid col-3 no-border" style="border-radius:20rpx ;">
@@ -91,7 +88,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="item item3">
 				<view class="item item3">
-					<image src="../../static/bank/BOC.png" mode=""></image>
+					<image src="@/static/icon/BOC.png" mode=""></image>
 					<text class="title" style="color: #CF4948;">中国银行</text>
 					<text class="title" style="color: #CF4948;">中国银行</text>
 					<view class="cu-btn round sm">
 					<view class="cu-btn round sm">
 						530:100兑入
 						530:100兑入

+ 0 - 161
pages/userBank/add.vue

@@ -1,161 +0,0 @@
-<template>
-	<view>
-		<view class="bg-white " style="padding: 0rpx 40rpx;margin-top: 30rpx;">
-			<u-form :model="bankModel" ref="uForm" label-width="180">
-					<u-form-item label="银行类型">
-						<u-input type="select" placeholder="请选择银行类型" v-model="bankModel.bankTypeLabel" @click="bankTypeShow = true"/>
-					</u-form-item>
-					<u-form-item label="账户类型">
-						<u-input type="select" placeholder="请选择账户类型" v-model="bankModel.bankAccountTypeLabel" @click="bankAccountTypeShow = true"/>
-					</u-form-item>
-					<u-form-item label="开户姓名">
-						<u-input v-model="bankModel.realName" placeholder="请输入开户姓名"/>
-					</u-form-item>
-					<u-form-item label="联系方式">
-						<u-input v-model="bankModel.phone" placeholder="请输入联系方式"/>
-					</u-form-item>
-					<u-form-item label="银行卡号">
-						<u-input v-model="bankModel.cardNo" placeholder="请输入银行卡号" :clearable="false" />
-					</u-form-item>
-			</u-form>
-		</view>
-		<view class="footer-fixed" style="margin: 0 50rpx 200rpx;z-index: 9;">
-			<view @click="confirm" class="bg-gradual-base cu-btn round" style="padding: 46rpx;width: calc(100% - 100rpx);">
-				添加银行
-			</view>
-		</view>
-		
-		<u-select v-model="bankTypeShow" :default-value="bankTypeDefaultValue" :list="bankTypeList" @confirm="bankTypeConfirm"></u-select>
-		<u-select v-model="bankAccountTypeShow" :default-value="bankAccountTypeDefaultValue" :list="bankAccountTypeList" @confirm="bankAccountTypeConfirm"></u-select>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				id:'',
-				//银行类型
-				bankTypeShow:false,
-				bankTypeList:[],
-				//账户类型
-				bankAccountTypeShow:false,
-				bankAccountTypeList:[],
-				//银行对象
-				bankModel:{
-					userId:'',
-					userType:2,
-					cardNo:'',
-					realName:'',
-					phone:'',
-					bankType:'',
-					bankTypeLabel:'',
-					bankAccountType:'',
-					bankAccountTypeLabel:''
-				},
-			}
-		},
-		onLoad(options) {
-			this.id=options.id
-			this.init()
-		},
-		methods: {
-			async init(){
-				this.bankModel.userId=this.vuex_userId
-				this.bankModel.phone=this.vuex_phone
-				
-				await this.getBankType()
-				await this.getBankAccountType()
-				
-				if (this.id) {
-					uni.setNavigationBarTitle({
-						title:"编辑银行卡"
-					})
-					this.fetchUserBank()
-				}else{
-					uni.setNavigationBarTitle({
-						title:"添加银行卡"
-					})
-				}
-			},
-			//回显 begin
-			fetchUserBank(){
-				let params={
-					id:this.id
-				}
-				this.$api.userBank.detail(params).then(res=>{
-					if (!this.$isEmpty(res.data)) {
-						this.bankModel=res.data
-					}
-				})
-			},
-			//字典 begin
-			async getBankType() {
-				let res = await this.$api.dict({code: 'bank_type'})
-				res.data.forEach(item=>{
-					let obj={
-						label:item.dictValue,
-						value:item.dictKey
-					}
-					this.bankTypeList.push(obj)
-				})
-			},
-			async getBankAccountType() {
-				let res = await this.$api.dict({code: 'bank_account_type'})
-				res.data.forEach(item=>{
-					let obj={
-						label:item.dictValue,
-						value:item.dictKey
-					}
-					this.bankAccountTypeList.push(obj)
-				})
-			},
-			//字典 end
-			bankTypeConfirm(e){
-				this.bankModel.bankTypeLabel=e[0].label
-				this.bankModel.bankType=e[0].value
-			},
-			bankAccountTypeConfirm(e){
-				this.bankModel.bankAccountTypeLabel=e[0].label
-				this.bankModel.bankAccountType=e[0].value
-			},
-			confirm() {
-				if (this.$isEmpty(this.bankModel.phone)) {
-					this.$u.toast('请输入联系方式')
-					return
-				}
-				if (this.$isEmpty(this.bankModel.bankType)) {
-					this.$u.toast('请选择银行类型')
-					return
-				}
-				if (this.$isEmpty(this.bankModel.bankAccountType)) {
-					this.$u.toast('请选择账户类型')
-					return
-				}
-				if (this.$isEmpty(this.bankModel.realName)) {
-					this.$u.toast('请输入开户姓名')
-					return
-				}
-				if (this.$isEmpty(this.bankModel.cardNo)) {
-					this.$u.toast('请输入银行卡号')
-					return
-				}
-				this.$api.userBank.submit(this.bankModel).then(res=>{
-					if (res.success) {
-						this.$dialog.showModal('操作成功',false).then(()=>{
-							uni.navigateBack()
-						})
-					}
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.custom-style {
-		background-color: #5b3ee7;
-		width: 400upx;
-		color: #ffffff;
-	}
-</style>

+ 0 - 116
pages/userBank/userBank.vue

@@ -1,116 +0,0 @@
-<template>
-	<view>
-		<navigator style="position: relative;" hover-class="none" :url="'./add?id='+item.id"  v-for="(item,index) in bankList" :key="index" class="card card_bg">
-			<view @click.stop="del(item.id)" style="position: absolute;right: 10rpx;top: 10rpx;">
-				<u-icon name="close-circle" color="#fff" size="40"></u-icon>
-			</view>
-			
-			<view class="top center" style="justify-content: flex-start;">
-				<view class="center margin-top-10">
-					<image :src="'/static/bank/'+item.bankType+'.png'"></image>
-				</view>
-				<view class="">
-					<text class="bankType">{{item.bankTypeLabel}}</text>
-					<text class="bankAccountType">{{item.bankAccountTypeLabel}}</text>
-				</view>
-			</view>
-			<view class="number">
-				<text>{{item.cardNo}}</text>
-			</view>
-		</navigator>
-		<navigator url="./add" class="card_add" hover-class="none">
-			<view class="margin-bottom-10">
-				<u-icon name="plus-circle-fill" color="#F5A85B" size="80"></u-icon>
-			</view>
-			<view  class="" style="color: #666666;">
-				添加新的银行卡
-			</view>
-		</navigator>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				bankList:[]
-			}
-		},
-		onShow() {
-			this.fetchCardList()
-		},
-		methods: {
-			fetchCardList(){
-				let params={
-					userId:this.vuex_userId,
-					size:20
-				}
-				this.$api.userBank.appList(params).then(res=>{
-					this.bankList=res.data.records
-				})
-			},
-			del(id){
-				this.$dialog.showModal('确定要解绑?').then(()=>{
-					this.$api.userBank.remove(id).then(res=>{
-						if (res.success) {
-							this.$u.toast('解绑成功!')
-							this.fetchCardList()
-						}
-					})
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.card_add{
-		margin: 30rpx;
-		border-radius:20rpx;
-		padding: 40rpx 30rpx;
-		background-color: #FFFFFF;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-direction: column;
-	}
-	
-	.card {
-		margin: 30rpx;
-		border-radius:20rpx;
-		padding: 40rpx 30rpx;
-		background-image: linear-gradient(#F5A85B, #EF9944);
-		display: flex;
-		flex-direction: column;
-		.top {
-			display: flex;
-			margin-bottom: 20rpx;
-
-			image {
-				border-radius: 50%;
-				background-color: #FFFFFF;
-				width: 70rpx;
-				height: 70rpx;
-			}
-			
-			.bankType{
-				font-size: 36rpx;
-				color: #FFFFFF;
-				font-weight: 800;
-				margin-left: 30rpx;
-			}
-			.bankAccountType{
-				color: #F8E0C6;
-				font-size: 26rpx;
-				margin-left: 20rpx;
-			}
-		}
-
-		.number {
-			margin-left: 110rpx;
-			color: #FFFFFF;
-			font-weight: 800;
-			font-size: 34rpx;
-		}
-	}
-</style>

+ 1 - 1
pagesA/pages/bill/bill-detail.vue

@@ -5,7 +5,7 @@
 				<image style="border-radius: 50%;" :src="item.logo" mode=""></image>
 				<image style="border-radius: 50%;" :src="item.logo" mode=""></image>
 				<text class="title">{{item.name}}</text>
 				<text class="title">{{item.name}}</text>
 				<view class="data">
 				<view class="data">
-					<image style="border-radius: 50%;" src="@/static/icon/points-value.png" mode="aspectFit"></image>
+					<image style="border-radius: 50%;" src="/pagesA/static/icon/points-value.png" mode="aspectFit"></image>
 					<view>
 					<view>
 						<text v-if="item.type==1||item.type==2">+</text>
 						<text v-if="item.type==1||item.type==2">+</text>
 						<text v-if="item.type==3">-</text>
 						<text v-if="item.type==3">-</text>

+ 1 - 1
pagesA/pages/my-balance/statistics.vue

@@ -9,7 +9,7 @@
 				<text>共支出 {{statistics.payNum}} 笔,合计</text>
 				<text>共支出 {{statistics.payNum}} 笔,合计</text>
 				<text class="text-price">{{statistics.totalMoney}}</text>
 				<text class="text-price">{{statistics.totalMoney}}</text>
 			</view>
 			</view>
-			<image class="logo" src="/static/icon/bill.png" mode=""></image>
+			<image class="logo" src="/pagesA/static/icon/bill.png" mode=""></image>
 		</view>
 		</view>
 		<view class="echart">
 		<view class="echart">
 			<view class="title">
 			<view class="title">

+ 1 - 1
pagesA/pages/my-points/accredit.vue

@@ -55,7 +55,7 @@
 				
 				
 				<view class="right">
 				<view class="right">
 					<view class="flex justify-center align-center">
 					<view class="flex justify-center align-center">
-						<image  src="@/static/icon/points.png" mode=""></image>
+						<image  src="/pagesA/static/icon/points.png" mode=""></image>
 					</view>
 					</view>
 					<text class="margin-left-10">100 = ¥10</text>
 					<text class="margin-left-10">100 = ¥10</text>
 				</view>
 				</view>

+ 1 - 1
pagesA/pages/my-points/exchange.vue

@@ -12,7 +12,7 @@
 		
 		
 		<view class="card" v-for="(item,index) in 6" :key="index">
 		<view class="card" v-for="(item,index) in 6" :key="index">
 			<view class="left">
 			<view class="left">
-				<image src="../../../static/bank/BOC.png" mode=""></image>
+				<image src="@/static/icon/BOC.png" mode=""></image>
 				<view class="">
 				<view class="">
 					<text>中国银行</text>
 					<text>中国银行</text>
 				</view>
 				</view>

+ 3 - 3
pagesA/pages/setting/setting.vue

@@ -21,17 +21,17 @@
 			return {
 			return {
 				menuList:[
 				menuList:[
 					{
 					{
-						icon:'/static/setting/info.png',
+						icon:'/pagesA/static/setting/info.png',
 						name:'个人资料',
 						name:'个人资料',
 						path:'/pagesA/pages/myInfo'
 						path:'/pagesA/pages/myInfo'
 					},
 					},
 					{
 					{
-						icon:'/static/setting/kefu.png',
+						icon:'/pagesA/static/setting/kefu.png',
 						name:'官方客服',
 						name:'官方客服',
 						path:''
 						path:''
 					},
 					},
 					{
 					{
-						icon:'/static/setting/tousu.png',
+						icon:'/pagesA/static/setting/tousu.png',
 						name:'投诉及反馈',
 						name:'投诉及反馈',
 						path:'/pagesA/pages/setting/question'
 						path:'/pagesA/pages/setting/question'
 					}
 					}

+ 0 - 0
static/icon/bill.png → pagesA/static/icon/bill.png


+ 0 - 0
static/icon/points-value.png → pagesA/static/icon/points-value.png


+ 0 - 0
static/icon/points.png → pagesA/static/icon/points.png


+ 0 - 0
static/setting/info.png → pagesA/static/setting/info.png


+ 0 - 0
static/setting/kefu.png → pagesA/static/setting/kefu.png


+ 0 - 0
static/setting/tousu.png → pagesA/static/setting/tousu.png


+ 735 - 0
pagesB/comps/r-canvas/r-canvas.js

@@ -0,0 +1,735 @@
+export default{
+	data(){
+		return{
+			system_info:{}, //system info
+			canvas_width:0, //canvas width px
+			canvas_height:0, //canvas height px
+			ctx:null, //canvas object
+			canvas_id:null, //canvas id
+			hidden:false,//Whether to hide canvas
+			scale:1,//canvas scale
+			r_canvas_scale:1,
+			if_ctx:true
+		}
+	},
+	methods:{
+		/**
+		 * save r-canvas.vue object
+		 * @param {Object} that
+		 */
+		// saveThis(that){
+		// 	rCanvasThis = that
+		// },
+		/**
+		 * Draw round rect text
+		 * @param {Object} config
+		 * @param {Number} config.x x坐标
+		 * @param {Number} config.y y坐标
+		 * @param {Number} config.w 宽度
+		 * @param {Number} config.h 高度
+		 * @param {Number} config.radius 圆角弧度
+		 * @param {String} config.fill_color 矩形颜色
+		 */
+		fillRoundRect(config) {
+			return new Promise((resolve,reject)=>{
+				let x = this.compatibilitySize(parseFloat(config.x)*this.scale)
+				let y = this.compatibilitySize(parseFloat(config.y)*this.scale)
+				let w = this.compatibilitySize(parseFloat(config.w)*this.scale)
+				let h = this.compatibilitySize(parseFloat(config.h)*this.scale)
+				let radius = config.radius?parseFloat(config.radius)*this.scale:10*this.scale
+				
+				let fill_color = config.fill_color || "black"
+				// The diameter of the circle must be less than the width and height of the rectangle
+				if (2 * radius > w || 2 * radius > h) { 
+					reject("The diameter of the circle must be less than the width and height of the rectangle")
+					return false; 
+				}
+				this.ctx.save();
+				this.ctx.translate(x, y);
+				//  
+				this.drawRoundRectPath({
+					w: w, 
+					h: h, 
+					radius: radius
+				});
+				this.ctx.fillStyle = fill_color
+				this.ctx.fill();
+				this.ctx.restore();
+				resolve()
+			})
+		},
+		/**
+		 * Draws the sides of a rounded rectangle
+		 * @param {Object} config
+		 * @param {Number} config.w 宽度
+		 * @param {Number} config.h 高度
+		 * @param {Number} config.radius 圆角弧度
+		 */
+		drawRoundRectPath(config) {
+			this.ctx.beginPath(0);
+			this.ctx.arc(config.w - config.radius, config.h - config.radius, config.radius, 0, Math.PI / 2);
+			this.ctx.lineTo(config.radius, config.h);
+			this.ctx.arc(config.radius, config.h - config.radius, config.radius, Math.PI / 2, Math.PI);
+			this.ctx.lineTo(0, config.radius);
+			this.ctx.arc(config.radius, config.radius, config.radius, Math.PI, Math.PI * 3 / 2);
+			this.ctx.lineTo(config.w - config.radius, 0);
+			this.ctx.arc(config.w - config.radius, config.radius, config.radius, Math.PI * 3 / 2, Math.PI * 2);
+			this.ctx.lineTo(config.w, config.h - config.radius);
+			this.ctx.closePath();
+		},
+		/**
+		 * Draw special Text,line wrapping is not supported
+		 * @param {Object} config
+		 * @param {String} config.text 文字
+		 * @param {Number} config.x x坐标
+		 * @param {Number} config.y y坐标
+		 * @param {String} config.font_color 文字颜色
+		 * @param {String} config.font_family 文字字体
+		 * @param {Number} config.font_size 文字大小(px)
+		 */
+		drawSpecialText(params){
+			let general = params.general
+			let list = params.list
+			return new Promise(async (resolve,reject)=>{
+				if(!general){
+					reject("general cannot be empty:101")
+					return;
+				}else if(list && list.length>0){
+					for(let i in list){
+						if(i != 0){
+							let font_size = list[i-1].font_size?parseFloat(list[i-1].font_size):20
+							this.ctx.setFontSize(font_size)
+							general.x = parseFloat(general.x) + this.ctx.measureText(list[i-1].text).width
+						}
+						list[i].x = general.x
+						list[i].y = general.y + (list[i].margin_top?parseFloat(list[i].margin_top):0)
+						await this.drawText(list[i])
+					}
+					resolve()
+				}else{
+					reject("The length of config arr is less than 0")
+					return;
+				}
+				
+			})
+		},
+		/**
+		 * array delete empty
+		 * @param {Object} arr
+		 */
+		arrDeleteEmpty(arr){
+			let newArr = []
+			for(let i in arr){
+				if(arr[i]){
+					newArr.push(arr[i])
+				}
+			}
+			return newArr
+		},
+		/**
+		 * Draw Text,support line
+		 * @param {Object} config
+		 * @param {String} config.text 文字
+		 * @param {Number} config.max_width 文字最大宽度(大于宽度自动换行)
+		 * @param {Number} config.line_height 文字上下行间距
+		 * @param {Number} config.x x坐标
+		 * @param {Number} config.y y坐标
+		 * @param {String} config.font_color 文字颜色
+		 * @param {String} config.font_family 文字字体 默认值:Arial
+		 * @param {String} config.text_align 文字对齐方式(left/center/right)
+		 * @param {Number} config.font_size 文字大小(px)
+		 * @param {Boolean} config.line_through_height 中划线大小
+		 * @param {Boolean} config.line_through_color 中划线颜色
+		 * @param {String} config.font_style 规定文字样式
+		 * @param {String} config.font_variant 规定字体变体
+		 * @param {String} config.font_weight 规定字体粗细
+		 * @param {String} config.line_through_cap 线末端类型
+		 * @param {String} config.line_clamp 最大行数
+		 * @param {String} config.line_clamp_hint 超过line_clamp后,尾部显示的自定义标识 如 ...
+		 * @param {String} config.is_line_break 是否开启换行符换行
+		 * 
+		 */
+		drawText(config,configuration = {}){
+			
+			configuration['line_num'] = configuration.line_num?configuration.line_num:0
+			configuration['text_width'] = configuration.text_width?configuration.text_width:0
+			
+			return new Promise(async (resolve,reject)=>{
+				
+				if(config.text){
+					
+					let draw_width = 0,draw_height = 0,draw_x = config.x,draw_y = config.y
+					let font_size = config.font_size?(parseFloat(config.font_size)*this.scale):(20*this.scale)
+					let font_color = config.font_color || "#000"
+					let font_family = config.font_family || "Arial"
+					let line_height = config.line_height || config.font_size || 20
+					let text_align = config.text_align || "left"
+					let font_weight = config.font_weight || "normal"
+					let font_variant = config.font_variant || "normal"
+					let font_style = config.font_style || "normal"
+					let line_clamp_hint = config.line_clamp_hint || '...'
+					let lineBreakJoinText = ""
+					let max_width = config.max_width?parseFloat(config.max_width)*this.scale:0
+					// checkout is line break
+					if(config.is_line_break){
+						let splitTextArr = config.text.split(/[\n]/g)
+						if(splitTextArr && splitTextArr.length > 0){
+							let newSplitTextArr = this.arrDeleteEmpty(splitTextArr)
+							if(newSplitTextArr && newSplitTextArr.length > 0){
+								lineBreakJoinText = newSplitTextArr.slice(1).join("\n")
+								config.text = newSplitTextArr[0]
+							}else{
+								reject("Text cannot be empty:103")
+								return
+							}
+						}else{
+							reject("Text cannot be empty:102")
+							return
+						}
+					}
+					
+					this.ctx.setFillStyle(font_color) // color
+					this.ctx.textAlign = text_align;
+					this.ctx.font = `${font_style} ${font_variant} ${font_weight} ${parseInt(font_size)}px ${font_family}`
+					if(configuration.text_width >= this.ctx.measureText(config.text).width){
+						draw_width = configuration.text_width
+					}else if(max_width > 0){
+						draw_width = max_width < this.ctx.measureText(config.text).width ? this.resetCompatibilitySize(max_width) : this.resetCompatibilitySize(this.ctx.measureText(config.text).width)
+					}else{
+						draw_width = this.ctx.measureText(config.text).width
+					}
+					configuration.text_width = draw_width / this.scale
+					if( max_width && this.compatibilitySize(this.ctx.measureText(config.text).width) > this.compatibilitySize(max_width)){
+						let current_text = ""
+						let text_arr = config.text.split("")
+						for(let i in text_arr){
+							if( this.compatibilitySize(this.ctx.measureText(current_text+text_arr[i]).width) > this.compatibilitySize(max_width) ){
+								// Hyphenation that is greater than the drawable width continues to draw
+								if(config.line_clamp && parseInt(config.line_clamp) == 1){
+									// Subtracting the current_text tail width from the line_clamp_hint width
+									let current_text_arr = current_text.split('')
+									let json_current_text = ''
+									while(true){
+										current_text_arr = current_text_arr.slice(1)
+										json_current_text = current_text_arr.join('')
+										if(this.compatibilitySize(this.ctx.measureText(json_current_text).width) <= this.compatibilitySize(this.ctx.measureText(line_clamp_hint).width)){
+											current_text = current_text.replace(json_current_text,'')
+											break;
+										}
+									}
+									configuration.line_num += 1
+									this.ctx.setFontSize(parseInt(this.compatibilitySize(font_size))) // font size
+									this.ctx.fillText(current_text + line_clamp_hint, this.compatibilitySize(parseFloat(config.x)*this.scale), this.compatibilitySize(parseFloat(config.y)*this.scale));
+								}else{
+									configuration.line_num += 1
+									this.ctx.setFontSize(parseInt(this.compatibilitySize(font_size))) // font size
+									this.ctx.fillText(current_text, this.compatibilitySize(parseFloat(config.x)*this.scale), this.compatibilitySize(parseFloat(config.y)*this.scale));
+									config.text = text_arr.slice(i).join("")
+									config.y = config.y + line_height
+									if(config.line_clamp){
+										config.line_clamp = parseInt(config.line_clamp) - 1
+									}
+									await this.drawText(config,configuration)
+								}
+								
+								break;
+							}else{
+								current_text = current_text+text_arr[i]
+							}
+						}
+					}else{
+						if(config.line_through_height){
+							let x = parseFloat(config.x)*this.scale
+							let w
+							let y = parseFloat(config.y)*this.scale - (font_size / 2.6) 
+							if(text_align == "left"){
+								w = this.ctx.measureText(config.text).width/1.1 + parseFloat(config.x)*this.scale
+							}else if(text_align == "right"){
+								w = parseFloat(config.x)*this.scale - this.ctx.measureText(config.text).width/1.1
+							}else if(text_align == "center"){
+								x = parseFloat(config.x)*this.scale - this.ctx.measureText(config.text).width / 1.1 / 2
+								w = parseFloat(config.x)*this.scale + this.ctx.measureText(config.text).width / 1.1 / 2
+							}
+							this.drawLineTo({
+								x:x,
+								y:y,
+								w:w,
+								h:y,
+								line_width:config.line_through_height,
+								line_color:config.line_through_color,
+								line_cap:config.line_through_cap
+							})
+						}
+						configuration.line_num += 1
+						this.ctx.setFontSize(parseInt(this.compatibilitySize(font_size))) // font size
+						this.ctx.fillText(config.text, this.compatibilitySize(parseFloat(config.x)*this.scale), this.compatibilitySize(parseFloat(config.y)*this.scale));
+						if(config.line_clamp){
+							config.line_clamp = parseInt(config.line_clamp) - 1
+						}
+					}
+					if(lineBreakJoinText){
+						await this.drawText({...config,text:lineBreakJoinText,y:config.y + line_height},configuration)
+					}
+					draw_height = config.font_size * configuration.line_num
+					draw_width = configuration.text_width
+					resolve({draw_width,draw_height,draw_x,draw_y})
+				}else{
+					reject("Text cannot be empty:101")
+				}
+			})
+		},
+		/**
+		 * Draw Line
+		 * @param {Object} config
+		 * @param {Object} config.x x坐标
+		 * @param {Object} config.y y坐标
+		 * @param {Object} config.w 线的宽度
+		 * @param {Object} config.h 线的高度
+		 * @param {Object} config.line_width 线的宽度
+		 * @param {Object} config.line_color 线条颜色
+		 */
+		drawLineTo(config){
+			let x = this.compatibilitySize(config.x)
+			let y = this.compatibilitySize(config.y)
+			let w = this.compatibilitySize(config.w)
+			let h = this.compatibilitySize(config.h)
+			let line_width = config.line_width?parseFloat(config.line_width)*this.scale:1*this.scale
+			let line_color = config.line_color || "black"
+			let line_cap = config.line_cap || "butt"
+			this.ctx.beginPath()
+			this.ctx.lineCap = line_cap
+			this.ctx.lineWidth = line_width
+			this.ctx.strokeStyle = line_color
+			this.ctx.moveTo(x,y)
+			this.ctx.lineTo(w,h)
+			this.ctx.stroke()
+		},
+		/** 
+		 * Compatibility px
+		 * @param {Object} size
+		 */
+		compatibilitySize(size) {
+		  let canvasSize = (parseFloat(size) / 750) * this.system_info.windowWidth
+		  canvasSize = parseFloat(canvasSize * 2)
+		  return canvasSize
+		},
+		/**
+		 * Restore compatibility px
+		 * @param {Object} size
+		 */
+		resetCompatibilitySize(size) {
+		  let canvasSize = (parseFloat(size/2)/this.system_info.windowWidth) * 750
+		  return canvasSize
+		},
+		/**
+		 * Init canvas
+		 */
+		init(config){
+			return new Promise(async (resolve,reject)=>{
+				if(!config.canvas_id){
+					reject("Canvas ID cannot be empty, please refer to the usage example")
+					return;
+				}
+				this.hidden = config.hidden
+				this.canvas_id = config.canvas_id
+				let system_info = await uni.getSystemInfoSync()
+				this.system_info = system_info
+				this.scale = config.scale&&parseFloat(config.scale)>0?parseInt(config.scale):1
+				this.canvas_width = (config.canvas_width ? this.compatibilitySize(config.canvas_width) : system_info.windowWidth) * this.scale
+				this.canvas_height = (config.canvas_height ? this.compatibilitySize(config.canvas_height) : system_info.windowHeight) * this.scale,
+				this.r_canvas_scale = 1/this.scale
+				this.ctx = uni.createCanvasContext(this.canvas_id,this)
+				this.setCanvasConfig({
+					global_alpha:config.global_alpha?parseFloat(config.global_alpha):1,
+					backgroundColor:config.background_color?config.background_color:"#fff"
+				})
+				resolve()
+			})
+		},
+		/**
+		 * clear canvas all path
+		 */
+		clearCanvas(){
+			return new Promise(async (resolve,reject)=>{
+				if(!this.ctx){
+					reject("canvas is not initialized:101")
+					return
+				}else{
+					this.ctx.clearRect(0,0,parseFloat(this.canvas_width)*this.scale,parseFloat(this.canvas_height)*this.scale)
+					await this.draw()
+					resolve()
+				}
+			})
+		},
+		/**
+		 * Set canvas config
+		 * @param {Object} config
+		 */
+		setCanvasConfig(config){
+			this.ctx.globalAlpha = config.global_alpha
+			this.ctx.fillStyle = config.backgroundColor
+			this.ctx.fillRect(0, 0, parseFloat(this.canvas_width)*this.scale, parseFloat(this.canvas_height)*this.scale)
+		},
+		/**
+		 * set canvas width
+		 * @param {Object} width
+		 */
+		setCanvasWidth(width){
+			if(!width){
+				uni.showToast({
+					title:'setCanvasWidth:width error',
+					icon:'none'
+				})
+			}
+			this.canvas_width = this.compatibilitySize(parseFloat(width)) * this.scale
+			this.ctx.width = this.canvas_width
+		},
+		/**
+		 * set canvas height
+		 * @param {Object} height
+		 */
+		setCanvasHeight(height){
+			if(!height){
+				uni.showToast({
+					title:'setCanvasWidth:height error',
+					icon:'none'
+				})
+			}
+			this.canvas_height = this.compatibilitySize(parseFloat(height)) * this.scale
+			this.ctx.height = this.canvas_height
+		},
+		/**
+		 * Draw to filepath
+		 */
+		draw(callback){
+			return new Promise((resolve,reject)=>{
+				let stop = setTimeout(()=>{
+					this.ctx.draw(false,setTimeout(()=>{
+					    uni.canvasToTempFilePath({
+					    	canvasId: this.canvas_id,
+					    	quality: 1,
+					    	success: (res)=>{
+					    		console.log('res',res)
+					    		resolve(res)
+					    		callback && callback(res)
+					    	},
+					    	fail:(err)=>{
+					    		reject(JSON.stringify(err)|| "Failed to generate poster:101")
+					    	}
+					    },this)
+					},300))
+					clearTimeout(stop)
+				},300)
+			})
+		},
+		/**
+		 * draw rect
+		 * @param {Number} config.x x坐标
+		 * @param {Number} config.y y坐标
+		 * @param {Number} config.w 图形宽度(px)
+		 * @param {Number} config.h 图形高度(px)
+		 * @param {Number} config.color 图形颜色
+		 * @param {Number} config.is_radius 是否开启圆图(1.1.6及以下版本废弃,请使用border_radius)
+		 * @param {Number} config.border_width 边框大小
+		 * @param {Number} config.border_color 边框颜色
+		 * 
+		 */
+		drawRect(config){
+			return new Promise(async (resolve,reject)=>{
+				if(!config.border_width || config.border_width <=0){
+					config.border_width = 0
+				}else{
+					config.border_width = parseFloat(config.border_width)
+				}
+				if(parseFloat(config.border_width) > 0){
+					let sub_config = JSON.parse(JSON.stringify(config))
+					sub_config.border_width = 0
+					sub_config.w = config.w + config.border_width
+					sub_config.h = config.h + config.border_width
+					sub_config.color = config.border_color || 'black'
+					if(sub_config.border_radius){
+						sub_config.border_radius = parseFloat(sub_config.border_radius) + parseFloat(config.border_width) / 2
+					} 
+					await this.drawRect(sub_config)
+				}
+				
+				let color = config.color || 'white'
+				config.x =  (parseFloat(config.x) + config.border_width / 2)
+				config.y = (parseFloat(config.y) + config.border_width / 2)
+				config['color'] = color
+				this.ctx.fillStyle = color;
+				if(config.is_radius || config.border_radius){
+					this.setNativeBorderRadius(config)
+					this.ctx.fill()
+				}else{
+					console.log('config.border_width',config.border_width)
+					this.ctx.fillRect(this.compatibilitySize(config.x*this.scale),this.compatibilitySize(config.y*this.scale),this.compatibilitySize(parseFloat(config.w)*this.scale),this.compatibilitySize(parseFloat(config.h)*this.scale))
+				}
+				resolve()
+			})
+		},
+		/**
+		 * Draw image
+		 * @param {Object} config
+		 * @param {String} config.url 图片链接
+		 * @param {Number} config.x x坐标
+		 * @param {Number} config.y y坐标
+		 * @param {Number} config.w 图片宽度(px)
+		 * @param {Number} config.h 图片高度(px)
+		 * @param {Number} config.border_width 边大小
+		 * @param {Number} config.border_color 边颜色
+		 * @param {Number} config.is_radius 是否开启圆图(1.1.6及以下版本废弃,请使用border_radius)
+		 * @param {Number} config.border_radius 圆角弧度
+		 */
+		drawImage(config){
+			return new Promise(async (resolve,reject)=>{
+				if(config.url){
+					let type = 0 // 1、network image  2、native image  3、base64 image
+					let image_url
+					let reg = /^https?/ig;
+					if(reg.test(config.url)){
+						type = 1
+					}else{
+						if((config.url.indexOf("data:image/png;base64") != -1) || config.url.indexOf("data:image/jpeg;base64") != -1 || config.url.indexOf("data:image/gif;base64") != -1){
+							type = 3
+						}else{
+							type = 2
+						}
+					}
+					if(type == 1){
+						// network image
+						await this.downLoadNetworkFile(config.url).then(res=>{ // two function
+							image_url = res
+						}).catch(err=>{
+							reject(err)
+							return;
+						})
+					}else if(type == 2){
+						// native image
+						const imageInfoResult = await uni.getImageInfo({
+							src: config.url
+						});
+						try{
+							if(imageInfoResult.length <= 1){
+								reject(imageInfoResult[0].errMsg + ':404')
+								return
+							}
+						}catch(e){
+							reject(e+':500')
+							return
+						}
+						let base64 = await this.urlToBase64({url:imageInfoResult[1].path})
+						// #ifdef MP-WEIXIN
+						await this.base64ToNative({url:base64}).then(res=>{
+							image_url = res
+						}).catch(err=>{
+							reject(JSON.stringify(err)+":501")
+							return;
+						})
+						// #endif
+						// #ifndef MP-WEIXIN
+						image_url = base64
+						// #endif
+						
+					}else if(type == 3){
+						// #ifdef MP-WEIXIN
+						await this.base64ToNative({url:config.url}).then(res=>{
+							image_url = res
+						}).catch(err=>{
+							reject(JSON.stringify(err)+":500")
+							return;
+						})
+						// #endif
+						// #ifndef MP-WEIXIN
+						image_url = config.url
+						// #endif
+					}else{
+						reject("Other Type Errors:101")
+						return
+					}
+					if(config.border_width){
+						let border_radius = 0
+						if(config.border_radius){
+							let multiple = config.w / config.border_radius
+							border_radius = (parseFloat(config.w) + parseFloat(config.border_width)) / multiple
+						}
+						// drawRect
+						await this.drawRect({
+							x:parseFloat(config.x) - parseFloat(config.border_width)/2,
+							y:parseFloat(config.y) - parseFloat(config.border_width)/2,
+							w:parseFloat(config.w) + parseFloat(config.border_width),
+							h:parseFloat(config.h) + parseFloat(config.border_width),
+							color:config.border_color,
+							border_radius:border_radius,
+							border_width:config.border_width,
+							is_radius:config.is_radius
+						})
+					}
+					
+					
+
+					if(config.border_radius){
+						config.color =  config.color?config.color:'rgba(0,0,0,0)'
+						
+						// 圆角有白边,+0.5的误差
+						config.w = config.w + 0.3
+						config.h = config.h + 0.3
+						
+						this.setNativeBorderRadius(config)
+					}else if(config.is_radius){
+						//已废弃 is_radius
+						this.ctx.setStrokeStyle("rgba(0,0,0,0)")
+						this.ctx.save()
+						this.ctx.beginPath()
+						this.ctx.arc(this.compatibilitySize(parseFloat(config.x)*this.scale+parseFloat(config.w)*this.scale/2), this.compatibilitySize(parseFloat(config.y)*this.scale+parseFloat(config.h)*this.scale/2), this.compatibilitySize(parseFloat(config.w)*this.scale/2), 0, 2 * Math.PI, false)
+						this.ctx.stroke();
+						this.ctx.clip()
+					}
+					
+					await this.ctx.drawImage(image_url,this.compatibilitySize(parseFloat(config.x)*this.scale),this.compatibilitySize(parseFloat(config.y)*this.scale),this.compatibilitySize(parseFloat(config.w)*this.scale),this.compatibilitySize(parseFloat(config.h)*this.scale))
+					this.ctx.restore() //Restore previously saved drawing context
+					resolve()
+				}else{
+					let err_msg = "Links cannot be empty:101"
+					reject(err_msg)
+				}
+			})
+		},
+		/**
+		 * base64 to native available path
+		 * @param {Object} config
+		 */
+		base64ToNative(config){
+			return new Promise((resolve,reject)=>{
+				let fileName = new Date().getTime()
+				var filePath = `${wx.env.USER_DATA_PATH}/${fileName}_rCanvas.png`
+				wx.getFileSystemManager().writeFile({
+					filePath: filePath,
+					data: config.url.replace(/^data:\S+\/\S+;base64,/, ''),
+					encoding: 'base64',
+					success: function() {
+						resolve(filePath)
+					},
+					fail: function(error) {
+						reject(error)
+					}
+				})
+			})
+		},
+		/**
+		 * native url to base64
+		 * @param {Object} config
+		 */
+		urlToBase64(config){
+			return new Promise(async (resolve,reject)=>{
+				if (typeof window != 'undefined') {
+					await this.downLoadNetworkFile(config.url).then(res=>{ // two function
+						resolve(res)
+					}).catch(err=>{
+						reject(err)
+					})
+				}else if (typeof plus != 'undefined') {
+					plus.io.resolveLocalFileSystemURL(config.url,(obj)=>{
+						obj.file((file)=>{
+							let fileReader = new plus.io.FileReader()
+							fileReader.onload = (res)=>{
+								resolve(res.target.result)
+							}
+							fileReader.onerror = (err)=>{
+								reject(err)
+							}
+							fileReader.readAsDataURL(file)
+						}, (err)=>{
+							reject(err)
+						})
+					},(err)=>{
+						reject(err)
+					})
+				}else if(typeof wx != 'undefined'){
+					wx.getFileSystemManager().readFile({
+						filePath: config.url,
+						encoding: 'base64',
+						success: function(res) {
+							resolve('data:image/png;base64,' + res.data)
+						},
+						fail: function(error) {
+							reject(error)
+						}
+					})
+				}
+			})
+		},
+		setNativeBorderRadius(config){
+			let border_radius = config.border_radius?(parseFloat(config.border_radius)*this.scale):(20*this.scale)
+			if ((parseFloat(config.w)*this.scale) < 2 * border_radius) border_radius = (parseFloat(config.w)*this.scale) / 2;
+			if ((parseFloat(config.h)*this.scale) < 2 * border_radius) border_radius = (parseFloat(config.h)*this.scale) / 2;
+			this.ctx.beginPath();
+			this.ctx.moveTo(this.compatibilitySize((parseFloat(config.x)*this.scale) + border_radius), this.compatibilitySize((parseFloat(config.y)*this.scale)));
+			this.ctx.arcTo(this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize(border_radius));
+			this.ctx.arcTo(this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize(border_radius));
+			this.ctx.arcTo((this.compatibilitySize(parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize(border_radius));
+			this.ctx.arcTo(this.compatibilitySize((parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize(border_radius));
+			this.ctx.closePath();
+			this.ctx.strokeStyle = config.color || config.border_color || 'rgba(0,0,0,0)'; // 设置绘制边框的颜色
+			this.ctx.stroke();
+			this.ctx.save()
+			this.ctx.clip();
+			
+		},
+		/**
+		 * Download network file
+		 * @param {Object} url : download url
+		 */
+		downLoadNetworkFile(url){
+			return new Promise((resolve,reject)=>{
+				uni.downloadFile({
+					url,
+					success:(res)=>{
+						if(res.statusCode == 200){
+							resolve(res.tempFilePath)
+						}else{
+							reject("Download Image Fail:102")
+						}
+					},
+					fail:(err)=>{
+						reject("Download Image Fail:101")
+					}
+				})
+			})
+		},
+		/**
+		 * Save image to natice
+		 * @param {Object} filePath : native imageUrl
+		 */
+		saveImage(filePath){
+			return new Promise((resolve,reject)=>{
+				if(!filePath){
+					reject("FilePath cannot be null:101")
+					return;
+				}
+				
+				// #ifdef H5
+					var createA = document.createElement("a");
+					createA.download = filePath;
+					createA.href = filePath;
+					document.body.appendChild(createA);
+					createA.click();
+					createA.remove();
+					resolve()
+				// #endif
+				
+				// #ifndef H5
+				uni.saveImageToPhotosAlbum({
+					filePath: filePath,
+					success:(res)=>{
+						resolve(res)
+					}, 
+					fail:(err)=>{
+						reject(err)
+					}
+				})
+				// #endif
+			})
+		}
+	}
+}

+ 30 - 0
pagesB/comps/r-canvas/r-canvas.vue

@@ -0,0 +1,30 @@
+<template>
+	<view>
+		<view class="r-canvas-component" :style="{width:canvas_width/scale+'px',height:canvas_height/scale+'px'}"
+			:class="{'hidden':hidden}">
+			<canvas class="r-canvas" v-if="canvas_id" :canvas-id="canvas_id" :id="canvas_id"
+				:style="{width:canvas_width+'px',height:canvas_height+'px','transform': `scale(${r_canvas_scale})`}"></canvas>
+		</view>
+	</view>
+</template>
+
+<script>
+	import rCanvasJS from "./r-canvas.js"
+	export default {
+		mixins: [rCanvasJS]
+	}
+</script>
+<style>
+	.r-canvas {
+		transform-origin: 0 0;
+	}
+
+	.r-canvas-component {
+		overflow: hidden;
+	}
+
+	.r-canvas-component.hidden {
+		position: fixed;
+		top: -5000upx;
+	}
+</style>

+ 1201 - 0
pagesB/comps/tki-qrcode/qrcode.js

@@ -0,0 +1,1201 @@
+let QRCode = {};
+(function () {
+    /**
+     * 获取单个字符的utf8编码
+     * unicode BMP平面约65535个字符
+     * @param {num} code
+     * return {array}
+     */
+    function unicodeFormat8(code) {
+        // 1 byte
+        var c0, c1, c2;
+        if (code < 128) {
+            return [code];
+            // 2 bytes
+        } else if (code < 2048) {
+            c0 = 192 + (code >> 6);
+            c1 = 128 + (code & 63);
+            return [c0, c1];
+            // 3 bytes
+        } else {
+            c0 = 224 + (code >> 12);
+            c1 = 128 + (code >> 6 & 63);
+            c2 = 128 + (code & 63);
+            return [c0, c1, c2];
+        }
+    }
+    /**
+     * 获取字符串的utf8编码字节串
+     * @param {string} string
+     * @return {array}
+     */
+    function getUTF8Bytes(string) {
+        var utf8codes = [];
+        for (var i = 0; i < string.length; i++) {
+            var code = string.charCodeAt(i);
+            var utf8 = unicodeFormat8(code);
+            for (var j = 0; j < utf8.length; j++) {
+                utf8codes.push(utf8[j]);
+            }
+        }
+        return utf8codes;
+    }
+    /**
+     * 二维码算法实现
+     * @param {string} data              要编码的信息字符串
+     * @param {num} errorCorrectLevel 纠错等级
+     */
+    function QRCodeAlg(data, errorCorrectLevel) {
+        this.typeNumber = -1; //版本
+        this.errorCorrectLevel = errorCorrectLevel;
+        this.modules = null; //二维矩阵,存放最终结果
+        this.moduleCount = 0; //矩阵大小
+        this.dataCache = null; //数据缓存
+        this.rsBlocks = null; //版本数据信息
+        this.totalDataCount = -1; //可使用的数据量
+        this.data = data;
+        this.utf8bytes = getUTF8Bytes(data);
+        this.make();
+    }
+    QRCodeAlg.prototype = {
+        constructor: QRCodeAlg,
+        /**
+         * 获取二维码矩阵大小
+         * @return {num} 矩阵大小
+         */
+        getModuleCount: function () {
+            return this.moduleCount;
+        },
+        /**
+         * 编码
+         */
+        make: function () {
+            this.getRightType();
+            this.dataCache = this.createData();
+            this.createQrcode();
+        },
+        /**
+         * 设置二位矩阵功能图形
+         * @param  {bool} test 表示是否在寻找最好掩膜阶段
+         * @param  {num} maskPattern 掩膜的版本
+         */
+        makeImpl: function (maskPattern) {
+            this.moduleCount = this.typeNumber * 4 + 17;
+            this.modules = new Array(this.moduleCount);
+            for (var row = 0; row < this.moduleCount; row++) {
+                this.modules[row] = new Array(this.moduleCount);
+            }
+            this.setupPositionProbePattern(0, 0);
+            this.setupPositionProbePattern(this.moduleCount - 7, 0);
+            this.setupPositionProbePattern(0, this.moduleCount - 7);
+            this.setupPositionAdjustPattern();
+            this.setupTimingPattern();
+            this.setupTypeInfo(true, maskPattern);
+            if (this.typeNumber >= 7) {
+                this.setupTypeNumber(true);
+            }
+            this.mapData(this.dataCache, maskPattern);
+        },
+        /**
+         * 设置二维码的位置探测图形
+         * @param  {num} row 探测图形的中心横坐标
+         * @param  {num} col 探测图形的中心纵坐标
+         */
+        setupPositionProbePattern: function (row, col) {
+            for (var r = -1; r <= 7; r++) {
+                if (row + r <= -1 || this.moduleCount <= row + r) continue;
+                for (var c = -1; c <= 7; c++) {
+                    if (col + c <= -1 || this.moduleCount <= col + c) continue;
+                    if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) {
+                        this.modules[row + r][col + c] = true;
+                    } else {
+                        this.modules[row + r][col + c] = false;
+                    }
+                }
+            }
+        },
+        /**
+         * 创建二维码
+         * @return {[type]} [description]
+         */
+        createQrcode: function () {
+            var minLostPoint = 0;
+            var pattern = 0;
+            var bestModules = null;
+            for (var i = 0; i < 8; i++) {
+                this.makeImpl(i);
+                var lostPoint = QRUtil.getLostPoint(this);
+                if (i == 0 || minLostPoint > lostPoint) {
+                    minLostPoint = lostPoint;
+                    pattern = i;
+                    bestModules = this.modules;
+                }
+            }
+            this.modules = bestModules;
+            this.setupTypeInfo(false, pattern);
+            if (this.typeNumber >= 7) {
+                this.setupTypeNumber(false);
+            }
+        },
+        /**
+         * 设置定位图形
+         * @return {[type]} [description]
+         */
+        setupTimingPattern: function () {
+            for (var r = 8; r < this.moduleCount - 8; r++) {
+                if (this.modules[r][6] != null) {
+                    continue;
+                }
+                this.modules[r][6] = (r % 2 == 0);
+                if (this.modules[6][r] != null) {
+                    continue;
+                }
+                this.modules[6][r] = (r % 2 == 0);
+            }
+        },
+        /**
+         * 设置矫正图形
+         * @return {[type]} [description]
+         */
+        setupPositionAdjustPattern: function () {
+            var pos = QRUtil.getPatternPosition(this.typeNumber);
+            for (var i = 0; i < pos.length; i++) {
+                for (var j = 0; j < pos.length; j++) {
+                    var row = pos[i];
+                    var col = pos[j];
+                    if (this.modules[row][col] != null) {
+                        continue;
+                    }
+                    for (var r = -2; r <= 2; r++) {
+                        for (var c = -2; c <= 2; c++) {
+                            if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {
+                                this.modules[row + r][col + c] = true;
+                            } else {
+                                this.modules[row + r][col + c] = false;
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        /**
+         * 设置版本信息(7以上版本才有)
+         * @param  {bool} test 是否处于判断最佳掩膜阶段
+         * @return {[type]}      [description]
+         */
+        setupTypeNumber: function (test) {
+            var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
+            for (var i = 0; i < 18; i++) {
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
+                this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
+            }
+        },
+        /**
+         * 设置格式信息(纠错等级和掩膜版本)
+         * @param  {bool} test
+         * @param  {num} maskPattern 掩膜版本
+         * @return {}
+         */
+        setupTypeInfo: function (test, maskPattern) {
+            var data = (QRErrorCorrectLevel[this.errorCorrectLevel] << 3) | maskPattern;
+            var bits = QRUtil.getBCHTypeInfo(data);
+            // vertical
+            for (var i = 0; i < 15; i++) {
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                if (i < 6) {
+                    this.modules[i][8] = mod;
+                } else if (i < 8) {
+                    this.modules[i + 1][8] = mod;
+                } else {
+                    this.modules[this.moduleCount - 15 + i][8] = mod;
+                }
+                // horizontal
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                if (i < 8) {
+                    this.modules[8][this.moduleCount - i - 1] = mod;
+                } else if (i < 9) {
+                    this.modules[8][15 - i - 1 + 1] = mod;
+                } else {
+                    this.modules[8][15 - i - 1] = mod;
+                }
+            }
+            // fixed module
+            this.modules[this.moduleCount - 8][8] = (!test);
+        },
+        /**
+         * 数据编码
+         * @return {[type]} [description]
+         */
+        createData: function () {
+            var buffer = new QRBitBuffer();
+            var lengthBits = this.typeNumber > 9 ? 16 : 8;
+            buffer.put(4, 4); //添加模式
+            buffer.put(this.utf8bytes.length, lengthBits);
+            for (var i = 0, l = this.utf8bytes.length; i < l; i++) {
+                buffer.put(this.utf8bytes[i], 8);
+            }
+            if (buffer.length + 4 <= this.totalDataCount * 8) {
+                buffer.put(0, 4);
+            }
+            // padding
+            while (buffer.length % 8 != 0) {
+                buffer.putBit(false);
+            }
+            // padding
+            while (true) {
+                if (buffer.length >= this.totalDataCount * 8) {
+                    break;
+                }
+                buffer.put(QRCodeAlg.PAD0, 8);
+                if (buffer.length >= this.totalDataCount * 8) {
+                    break;
+                }
+                buffer.put(QRCodeAlg.PAD1, 8);
+            }
+            return this.createBytes(buffer);
+        },
+        /**
+         * 纠错码编码
+         * @param  {buffer} buffer 数据编码
+         * @return {[type]}
+         */
+        createBytes: function (buffer) {
+            var offset = 0;
+            var maxDcCount = 0;
+            var maxEcCount = 0;
+            var length = this.rsBlock.length / 3;
+            var rsBlocks = new Array();
+            for (var i = 0; i < length; i++) {
+                var count = this.rsBlock[i * 3 + 0];
+                var totalCount = this.rsBlock[i * 3 + 1];
+                var dataCount = this.rsBlock[i * 3 + 2];
+                for (var j = 0; j < count; j++) {
+                    rsBlocks.push([dataCount, totalCount]);
+                }
+            }
+            var dcdata = new Array(rsBlocks.length);
+            var ecdata = new Array(rsBlocks.length);
+            for (var r = 0; r < rsBlocks.length; r++) {
+                var dcCount = rsBlocks[r][0];
+                var ecCount = rsBlocks[r][1] - dcCount;
+                maxDcCount = Math.max(maxDcCount, dcCount);
+                maxEcCount = Math.max(maxEcCount, ecCount);
+                dcdata[r] = new Array(dcCount);
+                for (var i = 0; i < dcdata[r].length; i++) {
+                    dcdata[r][i] = 0xff & buffer.buffer[i + offset];
+                }
+                offset += dcCount;
+                var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
+                var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
+                var modPoly = rawPoly.mod(rsPoly);
+                ecdata[r] = new Array(rsPoly.getLength() - 1);
+                for (var i = 0; i < ecdata[r].length; i++) {
+                    var modIndex = i + modPoly.getLength() - ecdata[r].length;
+                    ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
+                }
+            }
+            var data = new Array(this.totalDataCount);
+            var index = 0;
+            for (var i = 0; i < maxDcCount; i++) {
+                for (var r = 0; r < rsBlocks.length; r++) {
+                    if (i < dcdata[r].length) {
+                        data[index++] = dcdata[r][i];
+                    }
+                }
+            }
+            for (var i = 0; i < maxEcCount; i++) {
+                for (var r = 0; r < rsBlocks.length; r++) {
+                    if (i < ecdata[r].length) {
+                        data[index++] = ecdata[r][i];
+                    }
+                }
+            }
+            return data;
+
+        },
+        /**
+         * 布置模块,构建最终信息
+         * @param  {} data
+         * @param  {} maskPattern
+         * @return {}
+         */
+        mapData: function (data, maskPattern) {
+            var inc = -1;
+            var row = this.moduleCount - 1;
+            var bitIndex = 7;
+            var byteIndex = 0;
+            for (var col = this.moduleCount - 1; col > 0; col -= 2) {
+                if (col == 6) col--;
+                while (true) {
+                    for (var c = 0; c < 2; c++) {
+                        if (this.modules[row][col - c] == null) {
+                            var dark = false;
+                            if (byteIndex < data.length) {
+                                dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
+                            }
+                            var mask = QRUtil.getMask(maskPattern, row, col - c);
+                            if (mask) {
+                                dark = !dark;
+                            }
+                            this.modules[row][col - c] = dark;
+                            bitIndex--;
+                            if (bitIndex == -1) {
+                                byteIndex++;
+                                bitIndex = 7;
+                            }
+                        }
+                    }
+                    row += inc;
+                    if (row < 0 || this.moduleCount <= row) {
+                        row -= inc;
+                        inc = -inc;
+                        break;
+                    }
+                }
+            }
+        }
+    };
+    /**
+     * 填充字段
+     */
+    QRCodeAlg.PAD0 = 0xEC;
+    QRCodeAlg.PAD1 = 0x11;
+    //---------------------------------------------------------------------
+    // 纠错等级对应的编码
+    //---------------------------------------------------------------------
+    var QRErrorCorrectLevel = [1, 0, 3, 2];
+    //---------------------------------------------------------------------
+    // 掩膜版本
+    //---------------------------------------------------------------------
+    var QRMaskPattern = {
+        PATTERN000: 0,
+        PATTERN001: 1,
+        PATTERN010: 2,
+        PATTERN011: 3,
+        PATTERN100: 4,
+        PATTERN101: 5,
+        PATTERN110: 6,
+        PATTERN111: 7
+    };
+    //---------------------------------------------------------------------
+    // 工具类
+    //---------------------------------------------------------------------
+    var QRUtil = {
+        /*
+        每个版本矫正图形的位置
+         */
+        PATTERN_POSITION_TABLE: [
+            [],
+            [6, 18],
+            [6, 22],
+            [6, 26],
+            [6, 30],
+            [6, 34],
+            [6, 22, 38],
+            [6, 24, 42],
+            [6, 26, 46],
+            [6, 28, 50],
+            [6, 30, 54],
+            [6, 32, 58],
+            [6, 34, 62],
+            [6, 26, 46, 66],
+            [6, 26, 48, 70],
+            [6, 26, 50, 74],
+            [6, 30, 54, 78],
+            [6, 30, 56, 82],
+            [6, 30, 58, 86],
+            [6, 34, 62, 90],
+            [6, 28, 50, 72, 94],
+            [6, 26, 50, 74, 98],
+            [6, 30, 54, 78, 102],
+            [6, 28, 54, 80, 106],
+            [6, 32, 58, 84, 110],
+            [6, 30, 58, 86, 114],
+            [6, 34, 62, 90, 118],
+            [6, 26, 50, 74, 98, 122],
+            [6, 30, 54, 78, 102, 126],
+            [6, 26, 52, 78, 104, 130],
+            [6, 30, 56, 82, 108, 134],
+            [6, 34, 60, 86, 112, 138],
+            [6, 30, 58, 86, 114, 142],
+            [6, 34, 62, 90, 118, 146],
+            [6, 30, 54, 78, 102, 126, 150],
+            [6, 24, 50, 76, 102, 128, 154],
+            [6, 28, 54, 80, 106, 132, 158],
+            [6, 32, 58, 84, 110, 136, 162],
+            [6, 26, 54, 82, 110, 138, 166],
+            [6, 30, 58, 86, 114, 142, 170]
+        ],
+        G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
+        G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
+        G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
+        /*
+        BCH编码格式信息
+         */
+        getBCHTypeInfo: function (data) {
+            var d = data << 10;
+            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
+                d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
+            }
+            return ((data << 10) | d) ^ QRUtil.G15_MASK;
+        },
+        /*
+        BCH编码版本信息
+         */
+        getBCHTypeNumber: function (data) {
+            var d = data << 12;
+            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
+                d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
+            }
+            return (data << 12) | d;
+        },
+        /*
+        获取BCH位信息
+         */
+        getBCHDigit: function (data) {
+            var digit = 0;
+            while (data != 0) {
+                digit++;
+                data >>>= 1;
+            }
+            return digit;
+        },
+        /*
+        获取版本对应的矫正图形位置
+         */
+        getPatternPosition: function (typeNumber) {
+            return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
+        },
+        /*
+        掩膜算法
+         */
+        getMask: function (maskPattern, i, j) {
+            switch (maskPattern) {
+                case QRMaskPattern.PATTERN000:
+                    return (i + j) % 2 == 0;
+                case QRMaskPattern.PATTERN001:
+                    return i % 2 == 0;
+                case QRMaskPattern.PATTERN010:
+                    return j % 3 == 0;
+                case QRMaskPattern.PATTERN011:
+                    return (i + j) % 3 == 0;
+                case QRMaskPattern.PATTERN100:
+                    return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
+                case QRMaskPattern.PATTERN101:
+                    return (i * j) % 2 + (i * j) % 3 == 0;
+                case QRMaskPattern.PATTERN110:
+                    return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
+                case QRMaskPattern.PATTERN111:
+                    return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
+                default:
+                    throw new Error("bad maskPattern:" + maskPattern);
+            }
+        },
+        /*
+        获取RS的纠错多项式
+         */
+        getErrorCorrectPolynomial: function (errorCorrectLength) {
+            var a = new QRPolynomial([1], 0);
+            for (var i = 0; i < errorCorrectLength; i++) {
+                a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
+            }
+            return a;
+        },
+        /*
+        获取评价
+         */
+        getLostPoint: function (qrCode) {
+            var moduleCount = qrCode.getModuleCount(),
+                lostPoint = 0,
+                darkCount = 0;
+            for (var row = 0; row < moduleCount; row++) {
+                var sameCount = 0;
+                var head = qrCode.modules[row][0];
+                for (var col = 0; col < moduleCount; col++) {
+                    var current = qrCode.modules[row][col];
+                    //level 3 评价
+                    if (col < moduleCount - 6) {
+                        if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
+                            if (col < moduleCount - 10) {
+                                if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
+                                    lostPoint += 40;
+                                }
+                            } else if (col > 3) {
+                                if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
+                                    lostPoint += 40;
+                                }
+                            }
+                        }
+                    }
+                    //level 2 评价
+                    if ((row < moduleCount - 1) && (col < moduleCount - 1)) {
+                        var count = 0;
+                        if (current) count++;
+                        if (qrCode.modules[row + 1][col]) count++;
+                        if (qrCode.modules[row][col + 1]) count++;
+                        if (qrCode.modules[row + 1][col + 1]) count++;
+                        if (count == 0 || count == 4) {
+                            lostPoint += 3;
+                        }
+                    }
+                    //level 1 评价
+                    if (head ^ current) {
+                        sameCount++;
+                    } else {
+                        head = current;
+                        if (sameCount >= 5) {
+                            lostPoint += (3 + sameCount - 5);
+                        }
+                        sameCount = 1;
+                    }
+                    //level 4 评价
+                    if (current) {
+                        darkCount++;
+                    }
+                }
+            }
+            for (var col = 0; col < moduleCount; col++) {
+                var sameCount = 0;
+                var head = qrCode.modules[0][col];
+                for (var row = 0; row < moduleCount; row++) {
+                    var current = qrCode.modules[row][col];
+                    //level 3 评价
+                    if (row < moduleCount - 6) {
+                        if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
+                            if (row < moduleCount - 10) {
+                                if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
+                                    lostPoint += 40;
+                                }
+                            } else if (row > 3) {
+                                if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
+                                    lostPoint += 40;
+                                }
+                            }
+                        }
+                    }
+                    //level 1 评价
+                    if (head ^ current) {
+                        sameCount++;
+                    } else {
+                        head = current;
+                        if (sameCount >= 5) {
+                            lostPoint += (3 + sameCount - 5);
+                        }
+                        sameCount = 1;
+                    }
+                }
+            }
+            // LEVEL4
+            var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
+            lostPoint += ratio * 10;
+            return lostPoint;
+        }
+
+    };
+    //---------------------------------------------------------------------
+    // QRMath使用的数学工具
+    //---------------------------------------------------------------------
+    var QRMath = {
+        /*
+        将n转化为a^m
+         */
+        glog: function (n) {
+            if (n < 1) {
+                throw new Error("glog(" + n + ")");
+            }
+            return QRMath.LOG_TABLE[n];
+        },
+        /*
+        将a^m转化为n
+         */
+        gexp: function (n) {
+            while (n < 0) {
+                n += 255;
+            }
+            while (n >= 256) {
+                n -= 255;
+            }
+            return QRMath.EXP_TABLE[n];
+        },
+        EXP_TABLE: new Array(256),
+        LOG_TABLE: new Array(256)
+
+    };
+    for (var i = 0; i < 8; i++) {
+        QRMath.EXP_TABLE[i] = 1 << i;
+    }
+    for (var i = 8; i < 256; i++) {
+        QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
+    }
+    for (var i = 0; i < 255; i++) {
+        QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
+    }
+    //---------------------------------------------------------------------
+    // QRPolynomial 多项式
+    //---------------------------------------------------------------------
+    /**
+     * 多项式类
+     * @param {Array} num   系数
+     * @param {num} shift a^shift
+     */
+    function QRPolynomial(num, shift) {
+        if (num.length == undefined) {
+            throw new Error(num.length + "/" + shift);
+        }
+        var offset = 0;
+        while (offset < num.length && num[offset] == 0) {
+            offset++;
+        }
+        this.num = new Array(num.length - offset + shift);
+        for (var i = 0; i < num.length - offset; i++) {
+            this.num[i] = num[i + offset];
+        }
+    }
+    QRPolynomial.prototype = {
+        get: function (index) {
+            return this.num[index];
+        },
+        getLength: function () {
+            return this.num.length;
+        },
+        /**
+         * 多项式乘法
+         * @param  {QRPolynomial} e 被乘多项式
+         * @return {[type]}   [description]
+         */
+        multiply: function (e) {
+            var num = new Array(this.getLength() + e.getLength() - 1);
+            for (var i = 0; i < this.getLength(); i++) {
+                for (var j = 0; j < e.getLength(); j++) {
+                    num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
+                }
+            }
+            return new QRPolynomial(num, 0);
+        },
+        /**
+         * 多项式模运算
+         * @param  {QRPolynomial} e 模多项式
+         * @return {}
+         */
+        mod: function (e) {
+            var tl = this.getLength(),
+                el = e.getLength();
+            if (tl - el < 0) {
+                return this;
+            }
+            var num = new Array(tl);
+            for (var i = 0; i < tl; i++) {
+                num[i] = this.get(i);
+            }
+            while (num.length >= el) {
+                var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0));
+
+                for (var i = 0; i < e.getLength(); i++) {
+                    num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
+                }
+                while (num[0] == 0) {
+                    num.shift();
+                }
+            }
+            return new QRPolynomial(num, 0);
+        }
+    };
+
+    //---------------------------------------------------------------------
+    // RS_BLOCK_TABLE
+    //---------------------------------------------------------------------
+    /*
+    二维码各个版本信息[块数, 每块中的数据块数, 每块中的信息块数]
+     */
+    var RS_BLOCK_TABLE = [
+        // L
+        // M
+        // Q
+        // H
+        // 1
+        [1, 26, 19],
+        [1, 26, 16],
+        [1, 26, 13],
+        [1, 26, 9],
+
+        // 2
+        [1, 44, 34],
+        [1, 44, 28],
+        [1, 44, 22],
+        [1, 44, 16],
+
+        // 3
+        [1, 70, 55],
+        [1, 70, 44],
+        [2, 35, 17],
+        [2, 35, 13],
+
+        // 4
+        [1, 100, 80],
+        [2, 50, 32],
+        [2, 50, 24],
+        [4, 25, 9],
+
+        // 5
+        [1, 134, 108],
+        [2, 67, 43],
+        [2, 33, 15, 2, 34, 16],
+        [2, 33, 11, 2, 34, 12],
+
+        // 6
+        [2, 86, 68],
+        [4, 43, 27],
+        [4, 43, 19],
+        [4, 43, 15],
+
+        // 7
+        [2, 98, 78],
+        [4, 49, 31],
+        [2, 32, 14, 4, 33, 15],
+        [4, 39, 13, 1, 40, 14],
+
+        // 8
+        [2, 121, 97],
+        [2, 60, 38, 2, 61, 39],
+        [4, 40, 18, 2, 41, 19],
+        [4, 40, 14, 2, 41, 15],
+
+        // 9
+        [2, 146, 116],
+        [3, 58, 36, 2, 59, 37],
+        [4, 36, 16, 4, 37, 17],
+        [4, 36, 12, 4, 37, 13],
+
+        // 10
+        [2, 86, 68, 2, 87, 69],
+        [4, 69, 43, 1, 70, 44],
+        [6, 43, 19, 2, 44, 20],
+        [6, 43, 15, 2, 44, 16],
+
+        // 11
+        [4, 101, 81],
+        [1, 80, 50, 4, 81, 51],
+        [4, 50, 22, 4, 51, 23],
+        [3, 36, 12, 8, 37, 13],
+
+        // 12
+        [2, 116, 92, 2, 117, 93],
+        [6, 58, 36, 2, 59, 37],
+        [4, 46, 20, 6, 47, 21],
+        [7, 42, 14, 4, 43, 15],
+
+        // 13
+        [4, 133, 107],
+        [8, 59, 37, 1, 60, 38],
+        [8, 44, 20, 4, 45, 21],
+        [12, 33, 11, 4, 34, 12],
+
+        // 14
+        [3, 145, 115, 1, 146, 116],
+        [4, 64, 40, 5, 65, 41],
+        [11, 36, 16, 5, 37, 17],
+        [11, 36, 12, 5, 37, 13],
+
+        // 15
+        [5, 109, 87, 1, 110, 88],
+        [5, 65, 41, 5, 66, 42],
+        [5, 54, 24, 7, 55, 25],
+        [11, 36, 12],
+
+        // 16
+        [5, 122, 98, 1, 123, 99],
+        [7, 73, 45, 3, 74, 46],
+        [15, 43, 19, 2, 44, 20],
+        [3, 45, 15, 13, 46, 16],
+
+        // 17
+        [1, 135, 107, 5, 136, 108],
+        [10, 74, 46, 1, 75, 47],
+        [1, 50, 22, 15, 51, 23],
+        [2, 42, 14, 17, 43, 15],
+
+        // 18
+        [5, 150, 120, 1, 151, 121],
+        [9, 69, 43, 4, 70, 44],
+        [17, 50, 22, 1, 51, 23],
+        [2, 42, 14, 19, 43, 15],
+
+        // 19
+        [3, 141, 113, 4, 142, 114],
+        [3, 70, 44, 11, 71, 45],
+        [17, 47, 21, 4, 48, 22],
+        [9, 39, 13, 16, 40, 14],
+
+        // 20
+        [3, 135, 107, 5, 136, 108],
+        [3, 67, 41, 13, 68, 42],
+        [15, 54, 24, 5, 55, 25],
+        [15, 43, 15, 10, 44, 16],
+
+        // 21
+        [4, 144, 116, 4, 145, 117],
+        [17, 68, 42],
+        [17, 50, 22, 6, 51, 23],
+        [19, 46, 16, 6, 47, 17],
+
+        // 22
+        [2, 139, 111, 7, 140, 112],
+        [17, 74, 46],
+        [7, 54, 24, 16, 55, 25],
+        [34, 37, 13],
+
+        // 23
+        [4, 151, 121, 5, 152, 122],
+        [4, 75, 47, 14, 76, 48],
+        [11, 54, 24, 14, 55, 25],
+        [16, 45, 15, 14, 46, 16],
+
+        // 24
+        [6, 147, 117, 4, 148, 118],
+        [6, 73, 45, 14, 74, 46],
+        [11, 54, 24, 16, 55, 25],
+        [30, 46, 16, 2, 47, 17],
+
+        // 25
+        [8, 132, 106, 4, 133, 107],
+        [8, 75, 47, 13, 76, 48],
+        [7, 54, 24, 22, 55, 25],
+        [22, 45, 15, 13, 46, 16],
+
+        // 26
+        [10, 142, 114, 2, 143, 115],
+        [19, 74, 46, 4, 75, 47],
+        [28, 50, 22, 6, 51, 23],
+        [33, 46, 16, 4, 47, 17],
+
+        // 27
+        [8, 152, 122, 4, 153, 123],
+        [22, 73, 45, 3, 74, 46],
+        [8, 53, 23, 26, 54, 24],
+        [12, 45, 15, 28, 46, 16],
+
+        // 28
+        [3, 147, 117, 10, 148, 118],
+        [3, 73, 45, 23, 74, 46],
+        [4, 54, 24, 31, 55, 25],
+        [11, 45, 15, 31, 46, 16],
+
+        // 29
+        [7, 146, 116, 7, 147, 117],
+        [21, 73, 45, 7, 74, 46],
+        [1, 53, 23, 37, 54, 24],
+        [19, 45, 15, 26, 46, 16],
+
+        // 30
+        [5, 145, 115, 10, 146, 116],
+        [19, 75, 47, 10, 76, 48],
+        [15, 54, 24, 25, 55, 25],
+        [23, 45, 15, 25, 46, 16],
+
+        // 31
+        [13, 145, 115, 3, 146, 116],
+        [2, 74, 46, 29, 75, 47],
+        [42, 54, 24, 1, 55, 25],
+        [23, 45, 15, 28, 46, 16],
+
+        // 32
+        [17, 145, 115],
+        [10, 74, 46, 23, 75, 47],
+        [10, 54, 24, 35, 55, 25],
+        [19, 45, 15, 35, 46, 16],
+
+        // 33
+        [17, 145, 115, 1, 146, 116],
+        [14, 74, 46, 21, 75, 47],
+        [29, 54, 24, 19, 55, 25],
+        [11, 45, 15, 46, 46, 16],
+
+        // 34
+        [13, 145, 115, 6, 146, 116],
+        [14, 74, 46, 23, 75, 47],
+        [44, 54, 24, 7, 55, 25],
+        [59, 46, 16, 1, 47, 17],
+
+        // 35
+        [12, 151, 121, 7, 152, 122],
+        [12, 75, 47, 26, 76, 48],
+        [39, 54, 24, 14, 55, 25],
+        [22, 45, 15, 41, 46, 16],
+
+        // 36
+        [6, 151, 121, 14, 152, 122],
+        [6, 75, 47, 34, 76, 48],
+        [46, 54, 24, 10, 55, 25],
+        [2, 45, 15, 64, 46, 16],
+
+        // 37
+        [17, 152, 122, 4, 153, 123],
+        [29, 74, 46, 14, 75, 47],
+        [49, 54, 24, 10, 55, 25],
+        [24, 45, 15, 46, 46, 16],
+
+        // 38
+        [4, 152, 122, 18, 153, 123],
+        [13, 74, 46, 32, 75, 47],
+        [48, 54, 24, 14, 55, 25],
+        [42, 45, 15, 32, 46, 16],
+
+        // 39
+        [20, 147, 117, 4, 148, 118],
+        [40, 75, 47, 7, 76, 48],
+        [43, 54, 24, 22, 55, 25],
+        [10, 45, 15, 67, 46, 16],
+
+        // 40
+        [19, 148, 118, 6, 149, 119],
+        [18, 75, 47, 31, 76, 48],
+        [34, 54, 24, 34, 55, 25],
+        [20, 45, 15, 61, 46, 16]
+    ];
+
+    /**
+     * 根据数据获取对应版本
+     * @return {[type]} [description]
+     */
+    QRCodeAlg.prototype.getRightType = function () {
+        for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
+            var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
+            if (rsBlock == undefined) {
+                throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
+            }
+            var length = rsBlock.length / 3;
+            var totalDataCount = 0;
+            for (var i = 0; i < length; i++) {
+                var count = rsBlock[i * 3 + 0];
+                var dataCount = rsBlock[i * 3 + 2];
+                totalDataCount += dataCount * count;
+            }
+            var lengthBytes = typeNumber > 9 ? 2 : 1;
+            if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
+                this.typeNumber = typeNumber;
+                this.rsBlock = rsBlock;
+                this.totalDataCount = totalDataCount;
+                break;
+            }
+        }
+    };
+
+    //---------------------------------------------------------------------
+    // QRBitBuffer
+    //---------------------------------------------------------------------
+    function QRBitBuffer() {
+        this.buffer = new Array();
+        this.length = 0;
+    }
+    QRBitBuffer.prototype = {
+        get: function (index) {
+            var bufIndex = Math.floor(index / 8);
+            return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1);
+        },
+        put: function (num, length) {
+            for (var i = 0; i < length; i++) {
+                this.putBit(((num >>> (length - i - 1)) & 1));
+            }
+        },
+        putBit: function (bit) {
+            var bufIndex = Math.floor(this.length / 8);
+            if (this.buffer.length <= bufIndex) {
+                this.buffer.push(0);
+            }
+            if (bit) {
+                this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
+            }
+            this.length++;
+        }
+    };
+
+
+
+    // xzedit
+    let qrcodeAlgObjCache = [];
+    /**
+     * 二维码构造函数,主要用于绘制
+     * @param  {参数列表} opt 传递参数
+     * @return {}
+     */
+    QRCode = function (opt) {
+        //设置默认参数
+        this.options = {
+            text: '',
+            size: 256,
+            correctLevel: 3,
+            background: '#ffffff',
+            foreground: '#000000',
+            pdground: '#000000',
+            image: '',
+            imageSize: 30,
+            canvasId: opt.canvasId,
+            context: opt.context,
+            usingComponents: opt.usingComponents,
+            showLoading: opt.showLoading,
+            loadingText: opt.loadingText,
+        };
+        if (typeof opt === 'string') { // 只编码ASCII字符串
+            opt = {
+                text: opt
+            };
+        }
+        if (opt) {
+            for (var i in opt) {
+                this.options[i] = opt[i];
+            }
+        }
+        //使用QRCodeAlg创建二维码结构
+        var qrCodeAlg = null;
+        for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) {
+            if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) {
+                qrCodeAlg = qrcodeAlgObjCache[i].obj;
+                break;
+            }
+        }
+        if (i == l) {
+            qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
+            qrcodeAlgObjCache.push({
+                text: this.options.text,
+                correctLevel: this.options.correctLevel,
+                obj: qrCodeAlg
+            });
+        }
+        /**
+         * 计算矩阵点的前景色
+         * @param {Obj} config
+         * @param {Number} config.row 点x坐标
+         * @param {Number} config.col 点y坐标
+         * @param {Number} config.count 矩阵大小
+         * @param {Number} config.options 组件的options
+         * @return {String}
+         */
+        let getForeGround = function (config) {
+            var options = config.options;
+            if (options.pdground && (
+                (config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5) ||
+                (config.row > (config.count - 6) && config.row < (config.count - 2) && config.col > 1 && config.col < 5) ||
+                (config.row > 1 && config.row < 5 && config.col > (config.count - 6) && config.col < (config.count - 2))
+            )) {
+                return options.pdground;
+            }
+            return options.foreground;
+        }
+        // 创建canvas
+        let createCanvas = function (options) {
+            if (options.showLoading) {
+                uni.showLoading({
+                    title: options.loadingText,
+                    mask: true
+                });
+            }
+            var ctx = uni.createCanvasContext(options.canvasId, options.context);
+            var count = qrCodeAlg.getModuleCount();
+            var ratioSize = options.size;
+            var ratioImgSize = options.imageSize;
+            //计算每个点的长宽
+            var tileW = (ratioSize / count).toPrecision(4);
+            var tileH = (ratioSize / count).toPrecision(4);
+            //绘制
+            for (var row = 0; row < count; row++) {
+                for (var col = 0; col < count; col++) {
+                    var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW));
+                    var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW));
+                    var foreground = getForeGround({
+                        row: row,
+                        col: col,
+                        count: count,
+                        options: options
+                    });
+                    ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
+                    ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
+                }
+            }
+            if (options.image) {
+                var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
+                var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
+                drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
+                ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
+                // 画圆角矩形
+                function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
+                    ctxi.setLineWidth(lineWidth);
+                    ctxi.setFillStyle(options.background);
+                    ctxi.setStrokeStyle(options.background);
+                    ctxi.beginPath(); // draw top and top right corner 
+                    ctxi.moveTo(x + r, y);
+                    ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner 
+                    ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner 
+                    ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner 
+                    ctxi.arcTo(x, y, x + r, y, r);
+                    ctxi.closePath();
+                    if (fill) {
+                        ctxi.fill();
+                    }
+                    if (stroke) {
+                        ctxi.stroke();
+                    }
+                }
+            }
+            setTimeout(() => {
+                ctx.draw(true, () => {
+                    // 保存到临时区域
+                    setTimeout(() => {
+                        uni.canvasToTempFilePath({
+                            width: options.width,
+                            height: options.height,
+                            destWidth: options.width,
+                            destHeight: options.height,
+                            canvasId: options.canvasId,
+                            quality: Number(1),
+                            success: function (res) {
+                                if (options.cbResult) {
+                                    options.cbResult(res.tempFilePath)
+                                }
+                            },
+                            fail: function (res) {
+                                if (options.cbResult) {
+                                    options.cbResult(res)
+                                }
+                            },
+                            complete: function () {
+                                if (options.showLoading){
+                                    uni.hideLoading();
+                                }
+                            },
+                        }, options.context);
+                    }, options.text.length + 100);
+                });
+            }, options.usingComponents ? 0 : 150);
+        }
+        createCanvas(this.options);
+        // 空判定
+        let empty = function (v) {
+            let tp = typeof v,
+                rt = false;
+            if (tp == "number" && String(v) == "") {
+                rt = true
+            } else if (tp == "undefined") {
+                rt = true
+            } else if (tp == "object") {
+                if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+            } else if (tp == "string") {
+                if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+            } else if (tp == "function") {
+                rt = false
+            }
+            return rt
+        }
+    };
+    QRCode.prototype.clear = function (fn) {
+        var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context)
+        ctx.clearRect(0, 0, this.options.size, this.options.size)
+        ctx.draw(false, () => {
+            if (fn) {
+                fn()
+            }
+        })
+    };
+})()
+
+export default QRCode

+ 210 - 0
pagesB/comps/tki-qrcode/tki-qrcode.vue

@@ -0,0 +1,210 @@
+<template xlang="wxml" minapp="mpvue">
+	<view class="tki-qrcode">
+		<!-- #ifndef MP-ALIPAY -->
+		<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+		<!-- #endif -->
+		<!-- #ifdef MP-ALIPAY -->
+		<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
+		<!-- #endif -->
+		<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+	</view>
+</template>
+
+<script>
+import QRCode from "./qrcode.js"
+let qrcode
+export default {
+	name: "tki-qrcode",
+	props: {
+		cid: {
+			type: String,
+			default: 'tki-qrcode-canvas'
+		},
+		size: {
+			type: Number,
+			default: 200
+		},
+		unit: {
+			type: String,
+			default: 'upx'
+		},
+		show: {
+			type: Boolean,
+			default: true
+		},
+		val: {
+			type: String,
+			default: ''
+		},
+		background: {
+			type: String,
+			default: '#ffffff'
+		},
+		foreground: {
+			type: String,
+			default: '#000000'
+		},
+		pdground: {
+			type: String,
+			default: '#000000'
+		},
+		icon: {
+			type: String,
+			default: ''
+		},
+		iconSize: {
+			type: Number,
+			default: 40
+		},
+		lv: {
+			type: Number,
+			default: 3
+		},
+		onval: {
+			type: Boolean,
+			default: false
+		},
+		loadMake: {
+			type: Boolean,
+			default: false
+		},
+		usingComponents: {
+			type: Boolean,
+			default: true
+		},
+		showLoading: {
+			type: Boolean,
+			default: true
+		},
+		loadingText: {
+			type: String,
+			default: '二维码生成中'
+		},
+	},
+	data() {
+		return {
+			result: '',
+		}
+	},
+	methods: {
+		_makeCode() {
+			let that = this
+			if (!this._empty(this.val)) {
+				qrcode = new QRCode({
+					context: that, // 上下文环境
+					canvasId:that.cid, // canvas-id
+					usingComponents: that.usingComponents, // 是否是自定义组件
+					showLoading: that.showLoading, // 是否显示loading
+					loadingText: that.loadingText, // loading文字
+					text: that.val, // 生成内容
+					size: that.cpSize, // 二维码大小
+					background: that.background, // 背景色
+					foreground: that.foreground, // 前景色
+					pdground: that.pdground, // 定位角点颜色
+					correctLevel: that.lv, // 容错级别
+					image: that.icon, // 二维码图标
+					imageSize: that.iconSize,// 二维码图标大小
+					cbResult: function (res) { // 生成二维码的回调
+						that._result(res)
+					},
+				});
+			} else {
+				uni.showToast({
+					title: '二维码内容不能为空',
+					icon: 'none',
+					duration: 2000
+				});
+			}
+		},
+		_clearCode() {
+			this._result('')
+			qrcode.clear()
+		},
+		_saveCode() {
+			let that = this;
+			if (this.result != "") {
+				uni.saveImageToPhotosAlbum({
+					filePath: that.result,
+					success: function () {
+						uni.showToast({
+							title: '二维码保存成功',
+							icon: 'success',
+							duration: 2000
+						});
+					}
+				});
+			}
+		},
+		_result(res) {
+			this.result = res;
+			this.$emit('result', res)
+		},
+		_empty(v) {
+			let tp = typeof v,
+				rt = false;
+			if (tp == "number" && String(v) == "") {
+				rt = true
+			} else if (tp == "undefined") {
+				rt = true
+			} else if (tp == "object") {
+				if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+			} else if (tp == "string") {
+				if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+			} else if (tp == "function") {
+				rt = false
+			}
+			return rt
+		}
+	},
+	watch: {
+		size: function (n, o) {
+			if (n != o && !this._empty(n)) {
+				this.cSize = n
+				if (!this._empty(this.val)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 100);
+				}
+			}
+		},
+		val: function (n, o) {
+			if (this.onval) {
+				if (n != o && !this._empty(n)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 0);
+				}
+			}
+		}
+	},
+	computed: {
+		cpSize() {
+			if(this.unit == "upx"){
+				return uni.upx2px(this.size)
+			}else{
+				return this.size
+			}
+		}
+	},
+	mounted: function () {
+		if (this.loadMake) {
+			if (!this._empty(this.val)) {
+				setTimeout(() => {
+					this._makeCode()
+				}, 0);
+			}
+		}
+	},
+}
+</script>
+<style>
+.tki-qrcode {
+  position: relative;
+}
+.tki-qrcode-canvas {
+  position: fixed;
+  top: -99999upx;
+  left: -99999upx;
+  z-index: -99999;
+}
+</style>

+ 0 - 21
pagesB/comps/u-draw-poster/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/TuiMao233>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 230
pagesB/comps/u-draw-poster/README.md

@@ -1,230 +0,0 @@
-# 绘制海报工具简述
-
-- 创建绘制海报`canvas`矩形方法,内置了图片绘制,圆角矩形绘制,换行字体绘制等方法。
-- 接近原生开发体验,上手快,只需考虑业务逻辑,而不用考虑其他问题。
-- 拥有良好的语法架构,不会在绘制`uni/wx`矩形时陷入回调地狱。
-- 支持原生小程序,与`uniapp`多端应用。当是环境为原生小程序时,自动切换为性能更好的`type2d`绘制方式。
-- 将复杂的逻辑组合为简单的方法,扩展性强,可使用 `use|useCtx` 引入扩展。
-- 支持`typescript`,支持`vue3`模板,具体使用参考 [useDrawPoster](https://github.com/TuiMao233/u-draw-poster/tree/master/docs/use.md)。
-- 更加强大的图片绘制与裁剪方法(object-fit)
-- 支持声明式绘制扩展,自定义海报必备 具体使用参考 [draw-painter](https://tuimao233.gitee.io/mao-blog/wo-de-kuo-zhan/u-draw-poster/01-base-desc.html)
-
-api文档:[u-draw-poster](https://tuimao233.gitee.io/mao-blog/wo-de-kuo-zhan/u-draw-poster/01-base-desc.html)
-
-插件市场:[dcloud/u-draw-poster](https://ext.dcloud.net.cn/plugin?id=3237)
-
-**npm 安装插件**
-
-~~~
-npm i --save-dev u-draw-poster
-~~~
-
-## 1. 创建海报绘制工具
-
-~~~html
-<!-- #ifdef MP-WEIXIN -->
-<canvas id="canvas" type="2d" style="width:100px; height:100px" />
-<!-- #endif -->
-<!-- #ifndef MP-WEIXIN -->
-<canvas canvas-id="canvas" id="canvas" style="width:100px; height:100px" />
-<!-- #endif -->
-~~~
-
-~~~js
-// 注意:如果使用HBuilder引入, 需要引入 '@/js_sdk/u-draw-poster'
-import { useDrawPoster } from 'u-draw-poster'
-async onReady() {
- // 传入选择器, 初始化绘制工具, 当微信小程序时, 将自动启用type2d绘制
- const dp = await useDrawPoster("canvas", {
-   // 设置画布宽高
-   width: 100,
-   height: 100
- })   
-}
-~~~
-
-## 2. 绘制任意内容
-~~~js
-// 绘制背景与文字
-dp.draw((ctx) => {
-    ctx.fillStyle = "#F4F4F4";
-    ctx.fillRect(0, 0, dp.canvas.width, dp.canvas.height);
-    ctx.textBaseline = "top";
-    ctx.textAlign = "start";
-    ctx.fillStyle = "white";
-    ctx.font = `bold ${22}px sans-serif`;
-    ctx.fillText('周先生', dp.canvas.width/2, 38.5);
-})
-// 绘制图片内容
-dp.draw(async (ctx) => {
-    await ctx.drawImage('...')
-})
-~~~
-值得注意的是, `draw`方法会自动的执行`ctx.save/ctx.restore`, 不需要人为操纵绘画栈.
-~~~js
-dp.draw((ctx) => {/* ... */})
-// 相当于
-ctx.save()
-/* ... */
-ctx.restore()
-~~~
-
-## 4. 进行绘制
-
-`dp.draw`并不会马上绘制,只是将该任务添加到了任务栈,需要使用`dp.awaitCreate`函数进行绘制,该函数在绘制完毕后将弹出所有任务。
-`dp.render`在非`2d`绘画中,执行绘画任务完毕后,将自动执行`ctx.draw`方法,并在 draw 绘画才算异步结束。
-
-~~~js
-dp.draw((ctx) => {/* ... */})
-dp.draw(async (ctx) => {/* ... */})
-// 由于每个任务都有可能会有异步的绘制任务, 所以得需要使用await等待绘制
-console.log("draw绘制状况:", await dp.render()); // draw绘制状况: [true]
-~~~
-
-[^为什么这么做]: 当全部同步绘制时,将会出现绘制时间保持不一致的情况。这样就会导致一个问题,绘制图层覆盖导致显示未达到预期效果,之所以设计为异步等待,也是为了绘制图层能保持一致顺序。
-
-## 5. 生成图片本地地址
-
-如需要保存为图片时,可以使用`dp.createImagePath` 进行创建图片本地地址,在由`wx`或`uni`的`api`进行保存。
-~~~js
-dp.draw(async (ctx) => {/* ... */})
-const result = await dp.render();
-const posterImgUrl = await dp.createImagePath();
-console.log("draw绘制状况:", result); // [true]
-console.log("绘制生成本地地址:", posterImgUrl); // ...tmp...
-~~~
-你也可以不使用`dp.render`方法,当调用`dp.createImagePath`时会自动检测任务列表,如果有则执行绘制任务后在创建地址。
-
-~~~js
-dp.draw(async (ctx) => {/* ... */})
-// 跳过drawPoster.awaitCreate直接生成地址
-const posterImgUrl = await dp.createImagePath();
-console.log("绘制生成本地地址:", posterImgUrl);
-~~~
-
-# 绘制扩展 API
-
-DrawPoster 在创建时,会自动的向`ctx(画笔)`添加/覆盖扩展方法,以便构建海报矩形。
-
-目前支持绘制图片、圆角图片、绘制裁剪图片(object-fit)、换行字体、圆角矩形、圆角矩形边框、绘制二维码。
-
-~~~js
-dp.draw(async (ctx) => {
-  // ctx.drawImage | ctx.drawRoundImage | ctx.fillWarpText | ....
-})
-~~~
-
-具体查看API文档:[u-draw-poster](http://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poster/02-draw-extends.html)
-
-
-# 全局实例 API
-
-DrawPoster 的静态与扩展方法,除了最常用的:绘制节点、绘画构建、创建绘制、创建图片,以及还有另外的扩展功能:绘画构建、挂载全局扩展、挂载绘制扩展、全局画笔、等待绘制、停止绘画。
-
-具体查看API文档:[u-draw-poster](http://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poster/03-gbl-example.html)
-
-# 使用建议
-
-## canvas 当做为生成工具
-
-canvas在海报生成中请当做一个生成工具来看待,它的作用仅是绘制出海报。应把生成得到的资源保存并使用,显示用image图片组件,原因是方便操作,例如调整大小,或是H5端长按保存或识别,所以canvas应将它放在看不见的地方。不能用display:none;overflow:hidden;隐藏,否则生成空白。这里推荐canvas的隐藏样式代码,该说明为 [uQRCode](https://github.com/Sansnn/uQRCode) 提供的说明,同样`u-draw-poster`也适用
-
-~~~css
-.canvas-hide {
-	/* 1 */
-	position: fixed;
-	right: 100vw;
-	bottom: 100vh;
-	/* 2 */
-	z-index: -9999;
-	/* 3 */
-	opacity: 0;
-}
-~~~
-
-## 支持重复调用 (单例模式)
-需要注意的是,创建绘制工具支持重复调用,当构建第一次的绘制工具后,重复构建将自动获取第一次的实例。不需要存入`this`中,其实`vue3`也不提倡使用`this`这个黑盒,甚至抛弃了使用`this`。
-~~~js
-data: () => ({}),
-// 不存入实例(推荐)
-method: {
-  async draw() {
-    const dp = await useDrawPoster("canvas")
-    //...
-  }
-},
-onReady() {
- this.draw()
- // 重复调用....
- this.draw()
-}
-~~~
-~~~js
-// 存入实例(不推荐)
-data: () => ({
-  dp: null
-}),
-method: {
-  async draw() {
-    if (!this.dp) {
-      const dp = await useDrawPoster("canvas")
-      this.dp = dp
-    }
-    //...
-  }
-},
-onReady() {
- this.draw()
- // 重复调用....
- this.draw()
-}
-~~~
-
-# 常见问题
-
-## 微信小程序手机浏览空白
-
-微信小程序绘制如果有图片绘制,手机浏览需要在后台添加`downloadFile`域名,并需要重启开发者工具。
-
-## 微信小程序无法真机调试
-
-https://developers.weixin.qq.com/community/develop/doc/000eece1640d608df21bb19055b000
-
-## 绘制完毕后没有效果
-
-注意`DrawPoster.build`无法检测你所选择`canvasId`的是否正确,所以一定要确保与`canvas-id`和`html`中的`canvas`相同,在小程序端,由于会自动切换为`type2d`,必须得加上动态编译。
-
-~~~html
-<!-- #ifdef MP-WEIXIN -->
-<canvas id="canvas" type="2d" style="width: 300px; height: 300px" />
-<!-- #endif -->
-<!-- #ifndef MP-WEIXIN -->
-<canvas canvas-id="canvas" id="canvas" style="width: 300px; height: 300px" />
-<!-- #endif -->
-~~~
-
-## 绘制多个图片加载慢
-
-如果觉得多个图片绘制`await`加载慢,可以使用`Promise.all`将一部分不需要处理图层覆盖的图片进行同步绘制。
-
-~~~js
-dp.draw(async (ctx) => {
-  // // 用户头像
-  await ctx.drawRoundImage(headImgUrl, 39, 790, 90, 90, 100);
-  await Promise.all([
-    ctx.drawImage('/static/logo1.png', 20, 20, 35, 35),
-    ctx.drawImage('/static/tp.png', 19, 86, 612, 459),
-    ctx.drawImage('/static/bw.png', 188, 559, 274, 50),
-    // // 用户二维码
-    ctx.drawImage(codeImgUrl, 518, 780, 92, 92),
-  ]);
-});
-~~~
-
-需要注意的是:`ctx.drawRoundImage`不可以放在`Promise.all`当中,由于`ctx.drawRoundImage`内部会调用`ctx.clip`方法,在`Promise.all`中会与其他图片绘制产生冲突。从而导致圆角失效。
-
-我的博客:[Mr.Mao'blog](https://tuimao233.gitee.io/mao-blog/)
-
-联系方式(邮箱):951416545@qq.com
-
-海报绘制QQ群:936377537

+ 0 - 9
pagesB/comps/u-draw-poster/core/debugginglog.d.ts

@@ -1,9 +0,0 @@
-import { DrawPosterResult } from '.';
-export declare class DebuggingLog {
-    private dp;
-    private $color;
-    constructor(dp: Partial<DrawPosterResult>);
-    log: (message: string, color?: string, ...args: any[]) => void;
-    success: (message: string, ...args: any[]) => void;
-    error: (message: string, ...args: any[]) => void;
-}

+ 0 - 21
pagesB/comps/u-draw-poster/core/debugginglog.js

@@ -1,21 +0,0 @@
-// eslint-disable-next-line eslint-comments/disable-enable-pair
-/* eslint-disable no-console */
-export class DebuggingLog {
-    dp;
-    $color = '#3489fd';
-    constructor(dp) {
-        this.dp = dp;
-    }
-    log = (message, color = this.$color, ...args) => {
-        if (!this.dp?.$options?.debug)
-            return;
-        console.log(`%c${this.dp.id} -> ${message}`, `color: ${color}`, ...args);
-    };
-    success = (message, ...args) => {
-        this.log(`🎉 ${message}`, '#19be6b', ...args);
-    };
-    error = (message, ...args) => {
-        this.log(`🎉 ${message}`, '#fa3534', ...args);
-    };
-}
-//# sourceMappingURL=debugginglog.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/core/debugginglog.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"debugginglog.js","sourceRoot":"","sources":["../../packages/core/debugginglog.ts"],"names":[],"mappings":"AACA,+DAA+D;AAC/D,+BAA+B;AAC/B,MAAM,OAAO,YAAY;IAGH;IAFZ,MAAM,GAAG,SAAS,CAAA;IAE1B,YAAoB,EAA6B;QAA7B,OAAE,GAAF,EAAE,CAA2B;IAAG,CAAC;IACrD,GAAG,GAAG,CAAC,OAAe,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAW,EAAE,EAAE;QAC7D,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK;YAAE,OAAM;QACrC,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,OAAO,EAAE,EAAE,UAAU,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;IAC1E,CAAC,CAAA;IACD,OAAO,GAAG,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE;QAC5C,IAAI,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,CAAA;IAC/C,CAAC,CAAA;IACD,KAAK,GAAG,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE;QAC1C,IAAI,CAAC,GAAG,CAAC,MAAM,OAAO,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,CAAA;IAC/C,CAAC,CAAA;CACF"}

+ 0 - 97
pagesB/comps/u-draw-poster/core/index.d.ts

@@ -1,97 +0,0 @@
-/// <reference types="@dcloudio/types" />
-import { DrawPosterPlugin, DrawPosterUse } from './plugin';
-export declare type NonNullableCustom<T, N> = T extends N ? never : T;
-export declare type NonPick<T, K extends keyof T> = {
-    [P in NonNullableCustom<keyof T, K>]: T[P];
-};
-export interface DrawPosterOptions {
-    /** 查询字符串(必须), 注意不要写错对应canvas id */
-    selector: string;
-    /** 选取组件范围 */
-    componentThis?: any;
-    /** 绘制类型, 微信小程序自动切换为 '2d' */
-    type?: '2d' | 'context' | 'webgl';
-    /** 是否在绘制与创建时显示加载提示 */
-    loading?: boolean | {
-        /** 生成时加载文字 @default '绘制海报中...' */
-        render?: string;
-        /** 创建图片时加载文字 @default '生成图片中...' */
-        create?: string;
-    };
-    /** 是否开启调试模式 */
-    debug?: boolean;
-    /** 是否启动gcanvas(nvue) */
-    gcanvas?: boolean;
-    /** 画布宽度 */
-    width?: number;
-    /** 画布高度 */
-    height?: number;
-    /** 绘制扩展 */
-    plugins?: DrawPosterPlugin[];
-}
-export interface DrawPosterResult {
-    /** 绘制标识 */
-    readonly id: string;
-    /** 当前绘画插件 */
-    readonly plugins: DrawPosterPlugin[];
-    /** 源数据 */
-    readonly $options: DrawPosterOptions;
-    /** 画布(仅 2d 生效) */
-    readonly canvas: Canvas;
-    /** 画笔 */
-    readonly ctx: CanvasCtx;
-    /**
-     * 引入扩展
-     * 建议: 在构建配置中传入 `plugins`, 该引入方式无法触发 beforeMount
-     */
-    readonly use: DrawPosterUse;
-    /** 停止绘制(仅停止生成) */
-    readonly stop: () => void;
-    /** 创建一个绘制作用域 */
-    readonly draw: (func: (ctx: CanvasCtx) => Promise<void> | void) => void;
-    /** 将所有作用域渲染 */
-    readonly render: () => Promise<boolean[]>;
-    /** 生成图片地址 */
-    readonly createImagePath: (options?: CreateImagePathOptions) => Promise<string>;
-    /** 绘图原型(用于在 beforeMount 时自定义绘制原型) */
-    $drawPrototype?: {
-        canvas: Canvas;
-        ctx: CanvasCtx;
-    };
-    [key: string]: any;
-}
-export interface CanvasCtx extends UniApp.CanvasContext {
-    [key: string]: any;
-    createImageData: () => ImageData;
-    textAlign: CanvasTextDrawingStyles['textAlign'];
-    textBaseline: CanvasTextDrawingStyles['textBaseline'];
-    transform: CanvasTransform['transform'];
-}
-export interface Canvas {
-    width: number;
-    height: number;
-    getContext<K extends '2d' | 'webgl'>(contextType: K): K extends '2d' ? CanvasCtx : WebGLRenderingContext;
-    createImage(): {
-        src: string;
-        width: number;
-        height: number;
-        onload: () => void;
-        onerror: () => void;
-    };
-    requestAnimationFrame(callback: Function): number;
-    cancelAnimationFrame(requestID: number): void;
-    createImageData(): ImageData;
-    createPath2D(path: Path2D): Path2D;
-    toDataURL(type: string, encoderOptions: number): string;
-}
-export declare type Stacks = Array<() => Promise<boolean>>;
-export declare type CreateImagePathOptions = Partial<NonPick<UniApp.CanvasToTempFilePathOptions, 'canvasId' | 'complete' | 'success' | 'fail'>>;
-declare function useDrawPoster(selector: string, options?: Partial<NonPick<DrawPosterOptions, 'selector'>>): Promise<DrawPosterResult>;
-declare namespace useDrawPoster {
-    var use: DrawPosterUse;
-}
-declare function useDrawPoster(options: DrawPosterOptions): Promise<DrawPosterResult>;
-declare namespace useDrawPoster {
-    var use: DrawPosterUse;
-}
-export { useDrawPoster, DrawPosterPlugin };

+ 0 - 165
pagesB/comps/u-draw-poster/core/index.js

@@ -1,165 +0,0 @@
-import { isObject } from 'lodash';
-import { queryFields, UNI_PLATFORM } from '../utils';
-import { DebuggingLog } from './debugginglog';
-import { Plugins, globalUse } from './plugin';
-async function useDrawPoster(...args) {
-    const $options = (() => {
-        const _default = {
-            selector: '',
-            componentThis: undefined,
-            type: UNI_PLATFORM === 'mp-weixin' ? '2d' : 'context',
-            loading: false,
-            debug: false,
-            gcanvas: false
-        };
-        let _overrides;
-        if (isObject(args[0])) {
-            _overrides = args[0];
-        }
-        else if (isObject(args[1])) {
-            _overrides = args[1];
-            _overrides.selector = args[0];
-        }
-        else {
-            _overrides = { selector: args[0] };
-        }
-        const options = { ..._default, ..._overrides };
-        options.selector = options.selector.replace('#', '');
-        if (options.type === '2d') {
-            options.selector = `#${options.selector}`;
-        }
-        if (options.loading === true) {
-            options.loading = { render: '绘制海报中...', create: '生成图片中...' };
-        }
-        if (isObject(options.loading)) {
-            options.loading.render = options.loading?.render ?? '绘制海报中...';
-            options.loading.create = options.loading?.create ?? '生成图片中...';
-        }
-        if (!UNI_PLATFORM) {
-            console.warn('注意! draw-poster未开启uni条件编译! 当环境是微信小程序将不会动态切换为type=2d模式');
-            console.warn(`请在vue.config.js中的'transpileDependencies'中添加 'u-draw-poster' `);
-        }
-        return options;
-    })();
-    const pages = getCurrentPages();
-    const page = pages[pages.length - 1];
-    const dp = { $options };
-    const ps = new Plugins(dp);
-    const consola = new DebuggingLog(dp);
-    let stacks = [];
-    let isStop = false;
-    const build = async () => {
-        if (dp.$drawPrototype)
-            return dp.$drawPrototype;
-        const _nodeInfo = await queryFields($options.selector, $options.componentThis, {
-            node: true
-        });
-        const canvas = _nodeInfo?.node || {};
-        const ctx = canvas.getContext?.('2d') ||
-            uni.createCanvasContext($options.selector, $options.componentThis);
-        if (!canvas || !ctx || !$options.selector) {
-            throw new Error('DrawPoster Error: useDrawPoster to build drawPoster instance');
-        }
-        return { canvas, ctx };
-    };
-    const render = async () => {
-        if ($options.loading)
-            uni.showLoading({ title: $options.loading.render });
-        consola.log('绘制海报中...');
-        const tips = [];
-        for (const next of stacks) {
-            tips.push(await next());
-        }
-        stacks = [];
-        consola.log('绘制状况: ', undefined, tips);
-        if ($options.type === 'context') {
-            await new Promise((resolve) => {
-                dp.ctx.draw(true, resolve);
-            });
-        }
-        if ($options.loading)
-            uni.hideLoading();
-        return tips;
-    };
-    const createImagePath = async (_options_ = {}) => {
-        if (stacks.length > 0)
-            await dp.render();
-        if (isStop) {
-            isStop = false;
-            return Promise.reject();
-        }
-        if ($options.loading)
-            uni.showLoading({ title: $options.loading.create });
-        const options = _options_;
-        if ($options.type === '2d') {
-            ;
-            options.canvas = dp.canvas;
-        }
-        if ($options.type === 'context') {
-            ;
-            options.canvasId = dp.id;
-        }
-        return new Promise((resolve, reject) => {
-            options.success = (res) => {
-                resolve(res.tempFilePath);
-                $options.loading && uni.hideLoading();
-                consola.success('绘制成功', res);
-            };
-            options.fail = (err) => {
-                reject(err);
-                $options.loading && uni.hideLoading();
-                consola.success('绘制失败', err);
-            };
-            uni.canvasToTempFilePath(options);
-        });
-    };
-    const draw = async (func) => {
-        const length = stacks.length;
-        stacks.push(async () => {
-            try {
-                dp.ctx.save();
-                await func(dp.ctx);
-                dp.ctx.restore();
-                return true;
-            }
-            catch (error) {
-                if (!error?.message?.includes?.(`'nodeId' of undefined`))
-                    consola.error(`绘画栈(${length}),绘制错误:`, error);
-                return false;
-            }
-        });
-    };
-    const stop = () => {
-        stacks = [];
-        isStop = true;
-    };
-    if (page[`__dp_${dp.id}`])
-        return page[`__dp_${dp.id}`];
-    Object.defineProperty(dp, 'id', { get: () => $options.selector });
-    Object.defineProperty(dp, 'plugins', { get: () => ps.plugins });
-    ps.run('beforeMount');
-    const { canvas, ctx } = await build();
-    Object.defineProperty(dp, 'canvas', { get: () => canvas });
-    Object.defineProperty(dp, 'ctx', { get: () => ctx });
-    Object.defineProperty(dp, 'render', { get: () => render });
-    Object.defineProperty(dp, 'createImagePath', { get: () => createImagePath });
-    Object.defineProperty(dp, 'draw', { get: () => draw });
-    Object.defineProperty(dp, 'stop', { get: () => stop });
-    Object.defineProperty(dp, 'use', { get: () => ps.use });
-    dp.canvas.width = $options.width ?? 0;
-    dp.canvas.height = $options.height ?? 0;
-    ps.run('mounted');
-    $options.debug && consola.success('构建成功!', dp);
-    page[`__dp_${dp.id}`] = dp;
-    const _onUnload = page.onUnload;
-    page.onUnload = function () {
-        ps.run('beforeUnmount');
-        dp.stop();
-        _onUnload();
-        ps.run('unmounted');
-    };
-    return dp;
-}
-useDrawPoster.use = globalUse;
-export { useDrawPoster };
-//# sourceMappingURL=index.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/core/index.js.map


+ 0 - 37
pagesB/comps/u-draw-poster/core/plugin.d.ts

@@ -1,37 +0,0 @@
-import { DrawPosterResult, NonPick } from '.';
-export interface DrawPosterLifeCycle<I = DrawPosterResult, O = Record<string, any>> {
-    (instance: I, options?: O): void;
-}
-export interface DrawPosterLifeCycles {
-    /** 创建实例前 */
-    beforeMount?: DrawPosterLifeCycle<Partial<DrawPosterResult>>;
-    /** 创建实例后 */
-    mounted?: DrawPosterLifeCycle;
-    /** 卸载实例前 */
-    beforeUnmount?: DrawPosterLifeCycle;
-    /** 卸载实例后 */
-    unmounted?: DrawPosterLifeCycle;
-    /** 创建绘图前 */
-    beforeCreate?: DrawPosterLifeCycle;
-    /** 创建绘图后 */
-    created?: DrawPosterLifeCycle;
-}
-export interface DrawPosterPlugin extends DrawPosterLifeCycles {
-    /** 扩展名称 */
-    name: string;
-    [key: string]: any;
-}
-export interface DrawPosterUse {
-    (name: string, lifeCycle: DrawPosterLifeCycle): void;
-    (name: string, options: NonPick<DrawPosterPlugin, 'name'>): void;
-    (options: DrawPosterPlugin): void;
-}
-export declare const globalUse: DrawPosterUse;
-export declare class Plugins {
-    dp: Partial<DrawPosterResult>;
-    $plugins: DrawPosterPlugin[];
-    get plugins(): DrawPosterPlugin[];
-    constructor(dp: Partial<DrawPosterResult>);
-    use: (...args: any[]) => void;
-    run: (lifeCycleName: keyof DrawPosterLifeCycles) => void;
-}

+ 0 - 52
pagesB/comps/u-draw-poster/core/plugin.js

@@ -1,52 +0,0 @@
-import { isFunction, isObject, isString } from 'lodash';
-/**
- * 对插件参数进行处理并引入
- * @param plugins 插件列表
- * @param args 参数
- */
-const usePluginOptions = (plugins, ...args) => {
-    if (!args[0]) {
-        throw new Error('DrawPoster Error: plugins arguments required');
-    }
-    let _options = { name: '' };
-    if (isString(args[0]) && isFunction(args[1])) {
-        _options.name = args[0];
-        _options.mounted = args[1];
-    }
-    if (isString(args[0]) && isObject(args[1])) {
-        _options = { name: args[0], ...args[1] };
-    }
-    if (isObject(args[0])) {
-        _options = args[0];
-    }
-    if (![...globalPlugins, ...plugins].some((v) => _options.name === v.name)) {
-        plugins.push(_options);
-        return _options;
-    }
-    console.warn(`该扩展已存在: ${_options.name}`);
-};
-const globalPlugins = [];
-export const globalUse = (...args) => usePluginOptions(globalPlugins, ...args);
-export class Plugins {
-    dp;
-    $plugins = [];
-    get plugins() {
-        return [...globalPlugins, ...this.$plugins];
-    }
-    constructor(dp) {
-        this.dp = dp;
-        if (dp.$options?.plugins)
-            this.$plugins.push(...dp.$options?.plugins);
-    }
-    use = (...args) => {
-        const plugin = usePluginOptions(this.$plugins, ...args);
-        if (this.dp['canvas'])
-            plugin?.mounted?.(this.dp);
-    };
-    run = (lifeCycleName) => {
-        this.plugins.forEach((lifeCycle) => {
-            lifeCycle[lifeCycleName]?.(this.dp);
-        });
-    };
-}
-//# sourceMappingURL=plugin.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/core/plugin.js.map


+ 0 - 1
pagesB/comps/u-draw-poster/index.d.ts

@@ -1 +0,0 @@
-export * from './core';

+ 0 - 11
pagesB/comps/u-draw-poster/index.js

@@ -1,11 +0,0 @@
-import { useDrawPoster } from './core';
-import * as plugins from './plugins/preset';
-useDrawPoster.use(plugins.drawImage());
-useDrawPoster.use(plugins.drawImageFit());
-useDrawPoster.use(plugins.drawRoundImage());
-useDrawPoster.use(plugins.fillRoundRect());
-useDrawPoster.use(plugins.roundRect());
-useDrawPoster.use(plugins.strokeRoundRect());
-useDrawPoster.use(plugins.fillWarpText());
-export * from './core';
-//# sourceMappingURL=index.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAE3C,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;AACtC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;AACzC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;AAC3C,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,CAAA;AAC1C,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;AACtC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;AAC5C,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;AAEzC,cAAc,QAAQ,CAAA"}

+ 0 - 44
pagesB/comps/u-draw-poster/package.json

@@ -1,44 +0,0 @@
-{
-  "name": "u-draw-poster",
-  "version": "1.1.5",
-  "description": "绘制uniapp海报工具类",
-  "main": "dist/index.js",
-  "types": "dist/index.d.ts",
-  "scripts": {
-    "build": "esno scripts/build.ts",
-    "publish": "esno scripts/publish.ts",
-    "compress": "esno scripts/compress.ts",
-    "clean": "rimraf dcloud dist template/js_sdk"
-  },
-  "files": [
-    "dist",
-    "lib"
-  ],
-  "author": "Mr.Mao",
-  "license": "ISC",
-  "dependencies": {
-    "@dcloudio/types": "^2.5.1",
-    "@tuimao/uni-utils": "^0.3.0",
-    "@types/lodash-es": "^4.17.4",
-    "lodash": "^4.17.21",
-    "miniprogram-api-typings": "^3.1.3"
-  },
-  "prettier": "@tuimao/eslint/prettier.js",
-  "devDependencies": {
-    "@tuimao/eslint": "^1.2.0-bata.3",
-    "@types/archiver": "^5.1.1",
-    "@types/fs-extra": "^9.0.12",
-    "@types/node": "^14.14.9",
-    "archiver": "^5.3.0",
-    "assert": "^2.0.0",
-    "consola": "^2.15.3",
-    "eslint": "^7.32.0",
-    "esno": "^0.9.1",
-    "execa": "^5.1.1",
-    "fs-extra": "^10.0.0",
-    "rimraf": "^3.0.2",
-    "tern": "^0.24.3",
-    "typescript": "^4.0.5",
-    "vue": "^2.6.14"
-  }
-}

+ 0 - 17
pagesB/comps/u-draw-poster/plugins/drawImage/index.d.ts

@@ -1,17 +0,0 @@
-/// <reference types="@dcloudio/types" />
-import { DrawPosterPlugin } from '../../core/plugin';
-declare module '../../core' {
-    interface CanvasCtx {
-        /** 等待绘制图片
-         *
-         * 说明文档: https://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poste
-         */
-        drawImage(url: string, dx?: number | undefined, dy?: number | undefined, dWidth?: number | undefined, dHeigt?: number | undefined, sx?: number | undefined, sy?: number | undefined, sWidth?: number | undefined, sHeight?: number | undefined): Promise<boolean>;
-        /**
-         * 绘制图片原型
-         */
-        drawImageProto: UniApp.CanvasContext['drawImage'];
-    }
-}
-declare const _default: () => DrawPosterPlugin;
-export default _default;

+ 0 - 43
pagesB/comps/u-draw-poster/plugins/drawImage/index.js

@@ -1,43 +0,0 @@
-import { downloadImgUrl } from './utils';
-const plugin = {
-    name: '__ctx-drawImage__',
-    mounted: ({ ctx, $options, canvas }) => {
-        ctx.drawImageProto = ctx.drawImage;
-        ctx.drawImage = async (url, sx, sy, sh, sw, dx, dy, dh, dw) => {
-            // 下载路径
-            const path = await downloadImgUrl(url);
-            // 标记当前绘画存在图片绘制
-            let result = false;
-            // 基本绘制方法, 如果是 fit 方式, 则传入所有参数, 不然则只传入四个参数
-            const baseDrawImage = (imageResource) => {
-                const isFit = typeof dx === 'number' && typeof dw === 'number';
-                if (isFit) {
-                    ctx.drawImageProto(imageResource, sx, sy, sh, sw, dx, dy, dh, dw);
-                }
-                else {
-                    ctx.drawImageProto(imageResource, sx, sy, sh, sw);
-                }
-            };
-            // 如果是 context 绘制方式, 则直接绘制
-            if ($options.type === 'context') {
-                baseDrawImage(path);
-                result = true;
-            }
-            // 如果是 type2d 绘制方式, 则等待图片绘制完毕
-            if ($options.type === '2d') {
-                result = await new Promise((resolve) => {
-                    const image = canvas.createImage();
-                    image.src = path;
-                    image.addEventListener('load', () => {
-                        baseDrawImage(image);
-                        resolve(true);
-                    });
-                    image.addEventListener('error', () => resolve(false));
-                });
-            }
-            return result;
-        };
-    }
-};
-export default () => plugin;
-//# sourceMappingURL=index.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/drawImage/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/plugins/drawImage/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AA0BxC,MAAM,MAAM,GAAqB;IAC/B,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE;QACrC,GAAG,CAAC,cAAc,GAAG,GAAG,CAAC,SAAS,CAAA;QAClC,GAAG,CAAC,SAAS,GAAG,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;YAC5D,OAAO;YACP,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,CAAA;YACtC,eAAe;YACf,IAAI,MAAM,GAAG,KAAK,CAAA;YAClB,0CAA0C;YAC1C,MAAM,aAAa,GAAG,CAAC,aAAqB,EAAE,EAAE;gBAC9C,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,QAAQ,IAAI,OAAO,EAAE,KAAK,QAAQ,CAAA;gBAC9D,IAAI,KAAK,EAAE;oBACT,GAAG,CAAC,cAAc,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;iBAClE;qBAAM;oBACL,GAAG,CAAC,cAAc,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;iBAClD;YACH,CAAC,CAAA;YACD,0BAA0B;YAC1B,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;gBAC/B,aAAa,CAAC,IAAI,CAAC,CAAA;gBACnB,MAAM,GAAG,IAAI,CAAA;aACd;YACD,6BAA6B;YAC7B,IAAI,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE;gBAC1B,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBACrC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,EAAE,CAAA;oBAClC,KAAK,CAAC,GAAG,GAAG,IAAI,CACf;oBAAM,KAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;wBAC1C,aAAa,CAAM,KAAK,CAAC,CAAA;wBACzB,OAAO,CAAC,IAAI,CAAC,CAAA;oBACf,CAAC,CAAC,CACD;oBAAM,KAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;gBAC/D,CAAC,CAAC,CAAA;aACH;YACD,OAAO,MAAM,CAAA;QACf,CAAC,CAAA;IACH,CAAC;CACF,CAAA;AAED,eAAe,GAAG,EAAE,CAAC,MAAM,CAAA"}

+ 0 - 7
pagesB/comps/u-draw-poster/plugins/drawImage/utils.d.ts

@@ -1,7 +0,0 @@
-/** 是否是base64本地地址 */
-export declare const isBaseUrl: (str: string) => boolean;
-/** 是否是小程序本地地址 */
-export declare const isTmpUrl: (str: string) => boolean;
-/** 是否是网络地址 */
-export declare const isNetworkUrl: (str: string) => boolean;
-export declare const downloadImgUrl: (url: string) => Promise<string>;

+ 0 - 27
pagesB/comps/u-draw-poster/plugins/drawImage/utils.js

@@ -1,27 +0,0 @@
-/** 是否是base64本地地址 */
-export const isBaseUrl = (str) => {
-    return /^\s*data:(?:[a-z]+\/[\d+.a-z-]+(?:;[a-z-]+=[\da-z-]+)?)?(?:;base64)?,([\s\w!$%&'()*+,./:;=?@~-]*?)\s*$/i.test(str);
-};
-/** 是否是小程序本地地址 */
-export const isTmpUrl = (str) => {
-    return /http:\/\/temp\/wx/.test(str);
-};
-/** 是否是网络地址 */
-export const isNetworkUrl = (str) => {
-    return /^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w#%&+,./:=?@^~-]*[\w#%&+/=?@^~-])?$/.test(str);
-};
-// 下载指定地址图片, 如果不符合下载图片, 则直接返回
-export const downloadImgUrl = (url) => {
-    const isLocalFile = isBaseUrl(url) || isTmpUrl(url) || !isNetworkUrl(url);
-    return new Promise((resolve, reject) => {
-        if (isLocalFile) {
-            return resolve(url);
-        }
-        uni.downloadFile({
-            url,
-            success: (res) => resolve(res.tempFilePath),
-            fail: reject
-        });
-    });
-};
-//# sourceMappingURL=utils.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/drawImage/utils.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../packages/plugins/drawImage/utils.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,OAAO,yGAAyG,CAAC,IAAI,CACnH,GAAG,CACJ,CAAA;AACH,CAAC,CAAA;AACD,iBAAiB;AACjB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACtC,CAAC,CAAA;AACD,cAAc;AACd,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE;IAC1C,OAAO,8EAA8E,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjG,CAAC,CAAA;AAED,6BAA6B;AAC7B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAmB,EAAE;IAC7D,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IACzE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,WAAW,EAAE;YACf,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;SACpB;QACD,GAAG,CAAC,YAAY,CAAC;YACf,GAAG;YACH,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;YAC3C,IAAI,EAAE,MAAM;SACb,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}

+ 0 - 21
pagesB/comps/u-draw-poster/plugins/drawImageFit/index.d.ts

@@ -1,21 +0,0 @@
-import { DrawPosterPlugin } from '../../core/plugin';
-import { ObjectFit, ObjectPosition, Size } from './object-sizing';
-declare module '../../core' {
-    interface CanvasCtx {
-        /** 绘制 Object-Fit 模式图片
-         *
-         * 说明文档: https://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poste
-         */
-        drawImageFit(url: string, opts?: ImageFitOption): Promise<boolean>;
-    }
-}
-export interface ImageFitOption {
-    radius?: number;
-    objectFit?: ObjectFit;
-    intrinsicSize?: Size;
-    specifiedSize?: Size;
-    intrinsicPosition?: ObjectPosition;
-    specifiedPosition?: [number, number];
-}
-declare const _default: () => DrawPosterPlugin;
-export default _default;

+ 0 - 35
pagesB/comps/u-draw-poster/plugins/drawImageFit/index.js

@@ -1,35 +0,0 @@
-import { concreteRect } from './object-sizing';
-import { promisify } from '../../utils';
-const plugin = {
-    name: '__ctx-drawImageFit__',
-    mounted: ({ ctx }) => {
-        ctx.drawImageFit = async (url, options) => {
-            const imageInfo = await promisify(uni.getImageInfo)({ src: url });
-            const style = {
-                radius: 0,
-                objectFit: 'cover',
-                intrinsicSize: { width: imageInfo?.width ?? 100, height: imageInfo?.height ?? 100 },
-                specifiedSize: { width: 100, height: 100 },
-                intrinsicPosition: ['center', 'center'],
-                specifiedPosition: [0, 0],
-                ...options
-            };
-            // 计算图片尺寸
-            const drawInfo = concreteRect(style, style.intrinsicSize, style.specifiedSize);
-            // 如有圆角, 则进行裁剪
-            if (style.radius > 0) {
-                ctx.save();
-                ctx.setFillStyle?.('transparent');
-                ctx.fillStyle = 'transparent';
-                ctx.fillRoundRect(style.specifiedPosition[0], style.specifiedPosition[1], style.specifiedSize.width, style.specifiedSize.height, style.radius);
-                ctx.clip();
-            }
-            const result = await ctx.drawImage(url, ...Object.values(drawInfo));
-            if (style.radius > 0)
-                ctx.restore();
-            return result;
-        };
-    }
-};
-export default () => plugin;
-//# sourceMappingURL=index.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/drawImageFit/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/plugins/drawImageFit/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAmC,MAAM,iBAAiB,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAkBvC,MAAM,MAAM,GAAqB;IAC/B,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;QACnB,GAAG,CAAC,YAAY,GAAG,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;YACxC,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;YACjE,MAAM,KAAK,GAA6B;gBACtC,MAAM,EAAE,CAAC;gBACT,SAAS,EAAE,OAAO;gBAClB,aAAa,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,GAAG,EAAE;gBACnF,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;gBAC1C,iBAAiB,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;gBACvC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;gBACzB,GAAG,OAAO;aACX,CAAA;YACD,SAAS;YACT,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;YAC9E,cAAc;YACd,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBACpB,GAAG,CAAC,IAAI,EAAE,CAAA;gBACV,GAAG,CAAC,YAAY,EAAE,CAAC,aAAa,CAAC,CAAA;gBACjC,GAAG,CAAC,SAAS,GAAG,aAAa,CAAA;gBAC7B,GAAG,CAAC,aAAa,CACf,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAC1B,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAC1B,KAAK,CAAC,aAAa,CAAC,KAAK,EACzB,KAAK,CAAC,aAAa,CAAC,MAAM,EAC1B,KAAK,CAAC,MAAM,CACb,CAAA;gBACD,GAAG,CAAC,IAAI,EAAE,CAAA;aACX;YACD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;YACnE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,GAAG,CAAC,OAAO,EAAE,CAAA;YACnC,OAAO,MAAM,CAAA;QACf,CAAC,CAAA;IACH,CAAC;CACF,CAAA;AAED,eAAe,GAAG,EAAE,CAAC,MAAM,CAAA"}

+ 0 - 38
pagesB/comps/u-draw-poster/plugins/drawImageFit/object-sizing.d.ts

@@ -1,38 +0,0 @@
-export declare type ObjectFit = 'contain' | 'cover';
-export declare type ObjectPosition = ['left' | 'center' | 'right', 'top' | 'center' | 'bottom'];
-export interface Size {
-    width: number;
-    height: number;
-}
-/**
- * 用于计算图片的宽高比例
- * @see https://drafts.csswg.org/css-images-3/#sizing-terms
- *
- * ## 名词解释
- * ### intrinsic dimensions
- * 图片本身的尺寸
- *
- * ### specified size
- * 用户指定的元素尺寸
- *
- * ### concrete object size
- * 应用了 `objectFit` 之后图片的显示尺寸
- *
- * ### default object size
- */
-export declare function concreteRect(style: {
-    /** @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/object-fit */
-    objectFit?: ObjectFit;
-    /** @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/object-position */
-    intrinsicPosition?: ObjectPosition;
-    specifiedPosition?: [number, number];
-}, intrinsicSize: Size, specifiedSize: Size): {
-    sx: number;
-    sy: number;
-    sw: number;
-    sh: number;
-    dx: number;
-    dy: number;
-    dw: number;
-    dh: number;
-};

+ 0 - 78
pagesB/comps/u-draw-poster/plugins/drawImageFit/object-sizing.js

@@ -1,78 +0,0 @@
-/**
- * 用于计算图片的宽高比例
- * @see https://drafts.csswg.org/css-images-3/#sizing-terms
- *
- * ## 名词解释
- * ### intrinsic dimensions
- * 图片本身的尺寸
- *
- * ### specified size
- * 用户指定的元素尺寸
- *
- * ### concrete object size
- * 应用了 `objectFit` 之后图片的显示尺寸
- *
- * ### default object size
- */
-export function concreteRect(style, intrinsicSize, specifiedSize) {
-    const isContain = style.objectFit === 'contain';
-    const specifiedPosition = style.specifiedPosition || [0, 0];
-    // ratio 越大表示矩形越"扁"
-    const intrinsicRatio = intrinsicSize.width / intrinsicSize.height;
-    const specifiedRatio = specifiedSize.width / specifiedSize.height;
-    /** 图片原始尺寸与最终尺寸之比 */
-    let concreteScale = 1;
-    if ((intrinsicRatio > specifiedRatio && style.objectFit == 'contain') ||
-        (intrinsicRatio <= specifiedRatio && style.objectFit == 'cover'))
-        // 图片较"胖"时完整显示图片,图片较"瘦"时完全覆盖容器
-        // 这两种情况下有 concreteRect.width = specifiedSize.width
-        // 因为 concreteRect.width = intrinsicSize.width * concreteScale
-        // 所以:
-        concreteScale = specifiedSize.width / intrinsicSize.width;
-    else if ((intrinsicRatio > specifiedRatio && style.objectFit == 'cover') ||
-        (intrinsicRatio <= specifiedRatio && style.objectFit == 'contain'))
-        // 图片较"瘦"时完整显示图片,图片较"胖"时完全覆盖容器
-        // 这两种情况下有 concreteRect.height = specifiedSize.height
-        // 因为 concreteRect.height = intrinsicSize.height * concreteScale
-        // 所以:
-        concreteScale = specifiedSize.height / intrinsicSize.height;
-    else
-        throw new Error('Unkonwn concreteScale');
-    const concreteRectWidth = intrinsicSize.width * concreteScale;
-    const concreteRectHeight = intrinsicSize.height * concreteScale;
-    // 这里可以把 left top 的计算想象成投影
-    const xRelativeOrigin = { left: 0, center: 0.5, right: 1 }[style.intrinsicPosition?.[0] || 'center'];
-    const yRelativeOrigin = { top: 0, center: 0.5, bottom: 1 }[style.intrinsicPosition?.[1] || 'center'];
-    let concreteRectLeft = (specifiedSize.width - concreteRectWidth) * xRelativeOrigin;
-    let concreteRectTop = (specifiedSize.height - concreteRectHeight) * yRelativeOrigin;
-    if (isContain) {
-        concreteRectLeft += specifiedPosition[0];
-        concreteRectTop += specifiedPosition[1];
-    }
-    // 这里有两个坐标系,一个是 specified (dist) 的坐标系,一个是 intrinsic (src) 的坐标系
-    // 这里将两个坐标系的点位置进行变换
-    // 例: 带入 x=0, y=0, 得到的结果就是 specifiedRect 的左上角在 intrinsic 坐标系下的坐标位置
-    // 在 specified 坐标系下, intrinsic 的零点在 (concreteRectLeft, concreteRectTop), 缩放为 concreteScale
-    // 所以有 x_dist = x_src * concreteScale + concreteRectLeft
-    //        y_dist = y_src * concreteScale + concreteRectTop
-    const dist2src = (distX, distY) => [
-        /* srcX = */ (distX - concreteRectLeft) / concreteScale,
-        /* srcY = */ (distY - concreteRectTop) / concreteScale
-    ];
-    const [srcLeft, srcTop] = dist2src(0, 0);
-    // srcRight =  图片 specified 框右边在 src 坐标系下的 x 坐标
-    // srcBottom = 图片 specified 框下边在 src 坐标系下的 y 坐标
-    const [srcRight, srcBottom] = dist2src(specifiedSize.width, specifiedSize.height);
-    // 这里要对 src 和 disc 两个框进行约束
-    return {
-        sx: Math.max(srcLeft, 0),
-        sy: Math.max(srcTop, 0),
-        sw: Math.min(srcRight - srcLeft, intrinsicSize.width),
-        sh: Math.min(srcBottom - srcTop, intrinsicSize.height),
-        dx: isContain ? Math.max(concreteRectLeft, 0) : specifiedPosition[0],
-        dy: isContain ? Math.max(concreteRectTop, 0) : specifiedPosition[1],
-        dw: Math.min(concreteRectWidth, specifiedSize.width),
-        dh: Math.min(concreteRectHeight, specifiedSize.height)
-    };
-}
-//# sourceMappingURL=object-sizing.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/drawImageFit/object-sizing.js.map


+ 0 - 28
pagesB/comps/u-draw-poster/plugins/drawQrCode/index.d.ts

@@ -1,28 +0,0 @@
-import { DrawPosterPlugin } from '../../core/plugin';
-declare module '../../core' {
-    interface CanvasCtx {
-        /** 绘制二维码
-         *
-         * 说明文档: https://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poste
-         */
-        drawQrCode(options: DrawQrCodeOptions): void;
-    }
-}
-/** 绘制二维码配置 */
-export interface DrawQrCodeOptions {
-    text: string;
-    x?: number;
-    y?: number;
-    size?: number;
-    margin?: number;
-    backgroundColor?: string;
-    foregroundColor?: string;
-}
-export declare const errorCorrectLevel: {
-    L: number;
-    M: number;
-    Q: number;
-    H: number;
-};
-declare const _default: () => DrawPosterPlugin;
-export default _default;

+ 0 - 12
pagesB/comps/u-draw-poster/plugins/drawQrCode/index.js

@@ -1,12 +0,0 @@
-import uQRCode from './uQRCode';
-const plugin = {
-    name: '__ctx-drawQrCode__',
-    mounted: ({ ctx, canvas }) => {
-        ctx.drawQrCode = (options) => {
-            uQRCode.make.call(uQRCode, canvas, ctx, options);
-        };
-    }
-};
-export const errorCorrectLevel = uQRCode.errorCorrectLevel;
-export default () => plugin;
-//# sourceMappingURL=index.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/drawQrCode/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/plugins/drawQrCode/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,WAAW,CAAA;AAqB/B,MAAM,MAAM,GAAqB;IAC/B,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;QAC3B,GAAG,CAAC,UAAU,GAAG,CAAC,OAAO,EAAE,EAAE;YAC3B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QAClD,CAAC,CAAA;IACH,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAK1B,OAAO,CAAC,iBAAiB,CAAA;AAE7B,eAAe,GAAG,EAAE,CAAC,MAAM,CAAA"}

+ 0 - 2
pagesB/comps/u-draw-poster/plugins/drawQrCode/uQRCode.d.ts

@@ -1,2 +0,0 @@
-export default uQRCode;
-declare let uQRCode: {};

+ 0 - 1075
pagesB/comps/u-draw-poster/plugins/drawQrCode/uQRCode.js

@@ -1,1075 +0,0 @@
-/* eslint-disable */
-//---------------------------------------------------------------------
-// github https://github.com/Sansnn/uQRCode
-//---------------------------------------------------------------------
-let uQRCode = {};
-(function () {
-    //---------------------------------------------------------------------
-    // QRCode for JavaScript
-    //
-    // Copyright (c) 2009 Kazuhiko Arase
-    //
-    // URL: http://www.d-project.com/
-    //
-    // Licensed under the MIT license:
-    //   http://www.opensource.org/licenses/mit-license.php
-    //
-    // The word "QR Code" is registered trademark of 
-    // DENSO WAVE INCORPORATED
-    //   http://www.denso-wave.com/qrcode/faqpatent-e.html
-    //
-    //---------------------------------------------------------------------
-    //---------------------------------------------------------------------
-    // QR8bitByte
-    //---------------------------------------------------------------------
-    function QR8bitByte(data) {
-        this.mode = QRMode.MODE_8BIT_BYTE;
-        this.data = data;
-    }
-    QR8bitByte.prototype = {
-        getLength: function (buffer) {
-            return this.data.length;
-        },
-        write: function (buffer) {
-            for (var i = 0; i < this.data.length; i++) {
-                // not JIS ...
-                buffer.put(this.data.charCodeAt(i), 8);
-            }
-        }
-    };
-    //---------------------------------------------------------------------
-    // QRCode
-    //---------------------------------------------------------------------
-    function QRCode(typeNumber, errorCorrectLevel) {
-        this.typeNumber = typeNumber;
-        this.errorCorrectLevel = errorCorrectLevel;
-        this.modules = null;
-        this.moduleCount = 0;
-        this.dataCache = null;
-        this.dataList = new Array();
-    }
-    QRCode.prototype = {
-        addData: function (data) {
-            var newData = new QR8bitByte(data);
-            this.dataList.push(newData);
-            this.dataCache = null;
-        },
-        isDark: function (row, col) {
-            if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
-                throw new Error(row + "," + col);
-            }
-            return this.modules[row][col];
-        },
-        getModuleCount: function () {
-            return this.moduleCount;
-        },
-        make: function () {
-            // Calculate automatically typeNumber if provided is < 1
-            if (this.typeNumber < 1) {
-                var typeNumber = 1;
-                for (typeNumber = 1; typeNumber < 40; typeNumber++) {
-                    var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
-                    var buffer = new QRBitBuffer();
-                    var totalDataCount = 0;
-                    for (var i = 0; i < rsBlocks.length; i++) {
-                        totalDataCount += rsBlocks[i].dataCount;
-                    }
-                    for (var i = 0; i < this.dataList.length; i++) {
-                        var data = this.dataList[i];
-                        buffer.put(data.mode, 4);
-                        buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
-                        data.write(buffer);
-                    }
-                    if (buffer.getLengthInBits() <= totalDataCount * 8)
-                        break;
-                }
-                this.typeNumber = typeNumber;
-            }
-            this.makeImpl(false, this.getBestMaskPattern());
-        },
-        makeImpl: function (test, maskPattern) {
-            this.moduleCount = this.typeNumber * 4 + 17;
-            this.modules = new Array(this.moduleCount);
-            for (var row = 0; row < this.moduleCount; row++) {
-                this.modules[row] = new Array(this.moduleCount);
-                for (var col = 0; col < this.moduleCount; col++) {
-                    this.modules[row][col] = null; //(col + row) % 3;
-                }
-            }
-            this.setupPositionProbePattern(0, 0);
-            this.setupPositionProbePattern(this.moduleCount - 7, 0);
-            this.setupPositionProbePattern(0, this.moduleCount - 7);
-            this.setupPositionAdjustPattern();
-            this.setupTimingPattern();
-            this.setupTypeInfo(test, maskPattern);
-            if (this.typeNumber >= 7) {
-                this.setupTypeNumber(test);
-            }
-            if (this.dataCache == null) {
-                this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
-            }
-            this.mapData(this.dataCache, maskPattern);
-        },
-        setupPositionProbePattern: function (row, col) {
-            for (var r = -1; r <= 7; r++) {
-                if (row + r <= -1 || this.moduleCount <= row + r)
-                    continue;
-                for (var c = -1; c <= 7; c++) {
-                    if (col + c <= -1 || this.moduleCount <= col + c)
-                        continue;
-                    if ((0 <= r && r <= 6 && (c == 0 || c == 6)) ||
-                        (0 <= c && c <= 6 && (r == 0 || r == 6)) ||
-                        (2 <= r && r <= 4 && 2 <= c && c <= 4)) {
-                        this.modules[row + r][col + c] = true;
-                    }
-                    else {
-                        this.modules[row + r][col + c] = false;
-                    }
-                }
-            }
-        },
-        getBestMaskPattern: function () {
-            var minLostPoint = 0;
-            var pattern = 0;
-            for (var i = 0; i < 8; i++) {
-                this.makeImpl(true, i);
-                var lostPoint = QRUtil.getLostPoint(this);
-                if (i == 0 || minLostPoint > lostPoint) {
-                    minLostPoint = lostPoint;
-                    pattern = i;
-                }
-            }
-            return pattern;
-        },
-        createMovieClip: function (target_mc, instance_name, depth) {
-            var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
-            var cs = 1;
-            this.make();
-            for (var row = 0; row < this.modules.length; row++) {
-                var y = row * cs;
-                for (var col = 0; col < this.modules[row].length; col++) {
-                    var x = col * cs;
-                    var dark = this.modules[row][col];
-                    if (dark) {
-                        qr_mc.beginFill(0, 100);
-                        qr_mc.moveTo(x, y);
-                        qr_mc.lineTo(x + cs, y);
-                        qr_mc.lineTo(x + cs, y + cs);
-                        qr_mc.lineTo(x, y + cs);
-                        qr_mc.endFill();
-                    }
-                }
-            }
-            return qr_mc;
-        },
-        setupTimingPattern: function () {
-            for (var r = 8; r < this.moduleCount - 8; r++) {
-                if (this.modules[r][6] != null) {
-                    continue;
-                }
-                this.modules[r][6] = (r % 2 == 0);
-            }
-            for (var c = 8; c < this.moduleCount - 8; c++) {
-                if (this.modules[6][c] != null) {
-                    continue;
-                }
-                this.modules[6][c] = (c % 2 == 0);
-            }
-        },
-        setupPositionAdjustPattern: function () {
-            var pos = QRUtil.getPatternPosition(this.typeNumber);
-            for (var i = 0; i < pos.length; i++) {
-                for (var j = 0; j < pos.length; j++) {
-                    var row = pos[i];
-                    var col = pos[j];
-                    if (this.modules[row][col] != null) {
-                        continue;
-                    }
-                    for (var r = -2; r <= 2; r++) {
-                        for (var c = -2; c <= 2; c++) {
-                            if (r == -2 || r == 2 || c == -2 || c == 2 ||
-                                (r == 0 && c == 0)) {
-                                this.modules[row + r][col + c] = true;
-                            }
-                            else {
-                                this.modules[row + r][col + c] = false;
-                            }
-                        }
-                    }
-                }
-            }
-        },
-        setupTypeNumber: function (test) {
-            var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
-            for (var i = 0; i < 18; i++) {
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
-            }
-            for (var i = 0; i < 18; i++) {
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
-            }
-        },
-        setupTypeInfo: function (test, maskPattern) {
-            var data = (this.errorCorrectLevel << 3) | maskPattern;
-            var bits = QRUtil.getBCHTypeInfo(data);
-            // vertical		
-            for (var i = 0; i < 15; i++) {
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                if (i < 6) {
-                    this.modules[i][8] = mod;
-                }
-                else if (i < 8) {
-                    this.modules[i + 1][8] = mod;
-                }
-                else {
-                    this.modules[this.moduleCount - 15 + i][8] = mod;
-                }
-            }
-            // horizontal
-            for (var i = 0; i < 15; i++) {
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                if (i < 8) {
-                    this.modules[8][this.moduleCount - i - 1] = mod;
-                }
-                else if (i < 9) {
-                    this.modules[8][15 - i - 1 + 1] = mod;
-                }
-                else {
-                    this.modules[8][15 - i - 1] = mod;
-                }
-            }
-            // fixed module
-            this.modules[this.moduleCount - 8][8] = (!test);
-        },
-        mapData: function (data, maskPattern) {
-            var inc = -1;
-            var row = this.moduleCount - 1;
-            var bitIndex = 7;
-            var byteIndex = 0;
-            for (var col = this.moduleCount - 1; col > 0; col -= 2) {
-                if (col == 6)
-                    col--;
-                while (true) {
-                    for (var c = 0; c < 2; c++) {
-                        if (this.modules[row][col - c] == null) {
-                            var dark = false;
-                            if (byteIndex < data.length) {
-                                dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
-                            }
-                            var mask = QRUtil.getMask(maskPattern, row, col - c);
-                            if (mask) {
-                                dark = !dark;
-                            }
-                            this.modules[row][col - c] = dark;
-                            bitIndex--;
-                            if (bitIndex == -1) {
-                                byteIndex++;
-                                bitIndex = 7;
-                            }
-                        }
-                    }
-                    row += inc;
-                    if (row < 0 || this.moduleCount <= row) {
-                        row -= inc;
-                        inc = -inc;
-                        break;
-                    }
-                }
-            }
-        }
-    };
-    QRCode.PAD0 = 0xEC;
-    QRCode.PAD1 = 0x11;
-    QRCode.createData = function (typeNumber, errorCorrectLevel, dataList) {
-        var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
-        var buffer = new QRBitBuffer();
-        for (var i = 0; i < dataList.length; i++) {
-            var data = dataList[i];
-            buffer.put(data.mode, 4);
-            buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
-            data.write(buffer);
-        }
-        // calc num max data.
-        var totalDataCount = 0;
-        for (var i = 0; i < rsBlocks.length; i++) {
-            totalDataCount += rsBlocks[i].dataCount;
-        }
-        if (buffer.getLengthInBits() > totalDataCount * 8) {
-            throw new Error("code length overflow. (" +
-                buffer.getLengthInBits() +
-                ">" +
-                totalDataCount * 8 +
-                ")");
-        }
-        // end code
-        if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
-            buffer.put(0, 4);
-        }
-        // padding
-        while (buffer.getLengthInBits() % 8 != 0) {
-            buffer.putBit(false);
-        }
-        // padding
-        while (true) {
-            if (buffer.getLengthInBits() >= totalDataCount * 8) {
-                break;
-            }
-            buffer.put(QRCode.PAD0, 8);
-            if (buffer.getLengthInBits() >= totalDataCount * 8) {
-                break;
-            }
-            buffer.put(QRCode.PAD1, 8);
-        }
-        return QRCode.createBytes(buffer, rsBlocks);
-    };
-    QRCode.createBytes = function (buffer, rsBlocks) {
-        var offset = 0;
-        var maxDcCount = 0;
-        var maxEcCount = 0;
-        var dcdata = new Array(rsBlocks.length);
-        var ecdata = new Array(rsBlocks.length);
-        for (var r = 0; r < rsBlocks.length; r++) {
-            var dcCount = rsBlocks[r].dataCount;
-            var ecCount = rsBlocks[r].totalCount - dcCount;
-            maxDcCount = Math.max(maxDcCount, dcCount);
-            maxEcCount = Math.max(maxEcCount, ecCount);
-            dcdata[r] = new Array(dcCount);
-            for (var i = 0; i < dcdata[r].length; i++) {
-                dcdata[r][i] = 0xff & buffer.buffer[i + offset];
-            }
-            offset += dcCount;
-            var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
-            var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
-            var modPoly = rawPoly.mod(rsPoly);
-            ecdata[r] = new Array(rsPoly.getLength() - 1);
-            for (var i = 0; i < ecdata[r].length; i++) {
-                var modIndex = i + modPoly.getLength() - ecdata[r].length;
-                ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
-            }
-        }
-        var totalCodeCount = 0;
-        for (var i = 0; i < rsBlocks.length; i++) {
-            totalCodeCount += rsBlocks[i].totalCount;
-        }
-        var data = new Array(totalCodeCount);
-        var index = 0;
-        for (var i = 0; i < maxDcCount; i++) {
-            for (var r = 0; r < rsBlocks.length; r++) {
-                if (i < dcdata[r].length) {
-                    data[index++] = dcdata[r][i];
-                }
-            }
-        }
-        for (var i = 0; i < maxEcCount; i++) {
-            for (var r = 0; r < rsBlocks.length; r++) {
-                if (i < ecdata[r].length) {
-                    data[index++] = ecdata[r][i];
-                }
-            }
-        }
-        return data;
-    };
-    //---------------------------------------------------------------------
-    // QRMode
-    //---------------------------------------------------------------------
-    var QRMode = {
-        MODE_NUMBER: 1 << 0,
-        MODE_ALPHA_NUM: 1 << 1,
-        MODE_8BIT_BYTE: 1 << 2,
-        MODE_KANJI: 1 << 3
-    };
-    //---------------------------------------------------------------------
-    // QRErrorCorrectLevel
-    //---------------------------------------------------------------------
-    var QRErrorCorrectLevel = {
-        L: 1,
-        M: 0,
-        Q: 3,
-        H: 2
-    };
-    //---------------------------------------------------------------------
-    // QRMaskPattern
-    //---------------------------------------------------------------------
-    var QRMaskPattern = {
-        PATTERN000: 0,
-        PATTERN001: 1,
-        PATTERN010: 2,
-        PATTERN011: 3,
-        PATTERN100: 4,
-        PATTERN101: 5,
-        PATTERN110: 6,
-        PATTERN111: 7
-    };
-    //---------------------------------------------------------------------
-    // QRUtil
-    //---------------------------------------------------------------------
-    var QRUtil = {
-        PATTERN_POSITION_TABLE: [
-            [],
-            [6, 18],
-            [6, 22],
-            [6, 26],
-            [6, 30],
-            [6, 34],
-            [6, 22, 38],
-            [6, 24, 42],
-            [6, 26, 46],
-            [6, 28, 50],
-            [6, 30, 54],
-            [6, 32, 58],
-            [6, 34, 62],
-            [6, 26, 46, 66],
-            [6, 26, 48, 70],
-            [6, 26, 50, 74],
-            [6, 30, 54, 78],
-            [6, 30, 56, 82],
-            [6, 30, 58, 86],
-            [6, 34, 62, 90],
-            [6, 28, 50, 72, 94],
-            [6, 26, 50, 74, 98],
-            [6, 30, 54, 78, 102],
-            [6, 28, 54, 80, 106],
-            [6, 32, 58, 84, 110],
-            [6, 30, 58, 86, 114],
-            [6, 34, 62, 90, 118],
-            [6, 26, 50, 74, 98, 122],
-            [6, 30, 54, 78, 102, 126],
-            [6, 26, 52, 78, 104, 130],
-            [6, 30, 56, 82, 108, 134],
-            [6, 34, 60, 86, 112, 138],
-            [6, 30, 58, 86, 114, 142],
-            [6, 34, 62, 90, 118, 146],
-            [6, 30, 54, 78, 102, 126, 150],
-            [6, 24, 50, 76, 102, 128, 154],
-            [6, 28, 54, 80, 106, 132, 158],
-            [6, 32, 58, 84, 110, 136, 162],
-            [6, 26, 54, 82, 110, 138, 166],
-            [6, 30, 58, 86, 114, 142, 170]
-        ],
-        G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
-        G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
-        G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
-        getBCHTypeInfo: function (data) {
-            var d = data << 10;
-            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
-                d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
-            }
-            return ((data << 10) | d) ^ QRUtil.G15_MASK;
-        },
-        getBCHTypeNumber: function (data) {
-            var d = data << 12;
-            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
-                d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
-            }
-            return (data << 12) | d;
-        },
-        getBCHDigit: function (data) {
-            var digit = 0;
-            while (data != 0) {
-                digit++;
-                data >>>= 1;
-            }
-            return digit;
-        },
-        getPatternPosition: function (typeNumber) {
-            return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
-        },
-        getMask: function (maskPattern, i, j) {
-            switch (maskPattern) {
-                case QRMaskPattern.PATTERN000:
-                    return (i + j) % 2 == 0;
-                case QRMaskPattern.PATTERN001:
-                    return i % 2 == 0;
-                case QRMaskPattern.PATTERN010:
-                    return j % 3 == 0;
-                case QRMaskPattern.PATTERN011:
-                    return (i + j) % 3 == 0;
-                case QRMaskPattern.PATTERN100:
-                    return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
-                case QRMaskPattern.PATTERN101:
-                    return (i * j) % 2 + (i * j) % 3 == 0;
-                case QRMaskPattern.PATTERN110:
-                    return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
-                case QRMaskPattern.PATTERN111:
-                    return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
-                default:
-                    throw new Error("bad maskPattern:" + maskPattern);
-            }
-        },
-        getErrorCorrectPolynomial: function (errorCorrectLength) {
-            var a = new QRPolynomial([1], 0);
-            for (var i = 0; i < errorCorrectLength; i++) {
-                a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
-            }
-            return a;
-        },
-        getLengthInBits: function (mode, type) {
-            if (1 <= type && type < 10) {
-                // 1 - 9
-                switch (mode) {
-                    case QRMode.MODE_NUMBER:
-                        return 10;
-                    case QRMode.MODE_ALPHA_NUM:
-                        return 9;
-                    case QRMode.MODE_8BIT_BYTE:
-                        return 8;
-                    case QRMode.MODE_KANJI:
-                        return 8;
-                    default:
-                        throw new Error("mode:" + mode);
-                }
-            }
-            else if (type < 27) {
-                // 10 - 26
-                switch (mode) {
-                    case QRMode.MODE_NUMBER:
-                        return 12;
-                    case QRMode.MODE_ALPHA_NUM:
-                        return 11;
-                    case QRMode.MODE_8BIT_BYTE:
-                        return 16;
-                    case QRMode.MODE_KANJI:
-                        return 10;
-                    default:
-                        throw new Error("mode:" + mode);
-                }
-            }
-            else if (type < 41) {
-                // 27 - 40
-                switch (mode) {
-                    case QRMode.MODE_NUMBER:
-                        return 14;
-                    case QRMode.MODE_ALPHA_NUM:
-                        return 13;
-                    case QRMode.MODE_8BIT_BYTE:
-                        return 16;
-                    case QRMode.MODE_KANJI:
-                        return 12;
-                    default:
-                        throw new Error("mode:" + mode);
-                }
-            }
-            else {
-                throw new Error("type:" + type);
-            }
-        },
-        getLostPoint: function (qrCode) {
-            var moduleCount = qrCode.getModuleCount();
-            var lostPoint = 0;
-            // LEVEL1
-            for (var row = 0; row < moduleCount; row++) {
-                for (var col = 0; col < moduleCount; col++) {
-                    var sameCount = 0;
-                    var dark = qrCode.isDark(row, col);
-                    for (var r = -1; r <= 1; r++) {
-                        if (row + r < 0 || moduleCount <= row + r) {
-                            continue;
-                        }
-                        for (var c = -1; c <= 1; c++) {
-                            if (col + c < 0 || moduleCount <= col + c) {
-                                continue;
-                            }
-                            if (r == 0 && c == 0) {
-                                continue;
-                            }
-                            if (dark == qrCode.isDark(row + r, col + c)) {
-                                sameCount++;
-                            }
-                        }
-                    }
-                    if (sameCount > 5) {
-                        lostPoint += (3 + sameCount - 5);
-                    }
-                }
-            }
-            // LEVEL2
-            for (var row = 0; row < moduleCount - 1; row++) {
-                for (var col = 0; col < moduleCount - 1; col++) {
-                    var count = 0;
-                    if (qrCode.isDark(row, col))
-                        count++;
-                    if (qrCode.isDark(row + 1, col))
-                        count++;
-                    if (qrCode.isDark(row, col + 1))
-                        count++;
-                    if (qrCode.isDark(row + 1, col + 1))
-                        count++;
-                    if (count == 0 || count == 4) {
-                        lostPoint += 3;
-                    }
-                }
-            }
-            // LEVEL3
-            for (var row = 0; row < moduleCount; row++) {
-                for (var col = 0; col < moduleCount - 6; col++) {
-                    if (qrCode.isDark(row, col) &&
-                        !qrCode.isDark(row, col + 1) &&
-                        qrCode.isDark(row, col + 2) &&
-                        qrCode.isDark(row, col + 3) &&
-                        qrCode.isDark(row, col + 4) &&
-                        !qrCode.isDark(row, col + 5) &&
-                        qrCode.isDark(row, col + 6)) {
-                        lostPoint += 40;
-                    }
-                }
-            }
-            for (var col = 0; col < moduleCount; col++) {
-                for (var row = 0; row < moduleCount - 6; row++) {
-                    if (qrCode.isDark(row, col) &&
-                        !qrCode.isDark(row + 1, col) &&
-                        qrCode.isDark(row + 2, col) &&
-                        qrCode.isDark(row + 3, col) &&
-                        qrCode.isDark(row + 4, col) &&
-                        !qrCode.isDark(row + 5, col) &&
-                        qrCode.isDark(row + 6, col)) {
-                        lostPoint += 40;
-                    }
-                }
-            }
-            // LEVEL4
-            var darkCount = 0;
-            for (var col = 0; col < moduleCount; col++) {
-                for (var row = 0; row < moduleCount; row++) {
-                    if (qrCode.isDark(row, col)) {
-                        darkCount++;
-                    }
-                }
-            }
-            var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
-            lostPoint += ratio * 10;
-            return lostPoint;
-        }
-    };
-    //---------------------------------------------------------------------
-    // QRMath
-    //---------------------------------------------------------------------
-    var QRMath = {
-        glog: function (n) {
-            if (n < 1) {
-                throw new Error("glog(" + n + ")");
-            }
-            return QRMath.LOG_TABLE[n];
-        },
-        gexp: function (n) {
-            while (n < 0) {
-                n += 255;
-            }
-            while (n >= 256) {
-                n -= 255;
-            }
-            return QRMath.EXP_TABLE[n];
-        },
-        EXP_TABLE: new Array(256),
-        LOG_TABLE: new Array(256)
-    };
-    for (var i = 0; i < 8; i++) {
-        QRMath.EXP_TABLE[i] = 1 << i;
-    }
-    for (var i = 8; i < 256; i++) {
-        QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^
-            QRMath.EXP_TABLE[i - 5] ^
-            QRMath.EXP_TABLE[i - 6] ^
-            QRMath.EXP_TABLE[i - 8];
-    }
-    for (var i = 0; i < 255; i++) {
-        QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
-    }
-    //---------------------------------------------------------------------
-    // QRPolynomial
-    //---------------------------------------------------------------------
-    function QRPolynomial(num, shift) {
-        if (num.length == undefined) {
-            throw new Error(num.length + "/" + shift);
-        }
-        var offset = 0;
-        while (offset < num.length && num[offset] == 0) {
-            offset++;
-        }
-        this.num = new Array(num.length - offset + shift);
-        for (var i = 0; i < num.length - offset; i++) {
-            this.num[i] = num[i + offset];
-        }
-    }
-    QRPolynomial.prototype = {
-        get: function (index) {
-            return this.num[index];
-        },
-        getLength: function () {
-            return this.num.length;
-        },
-        multiply: function (e) {
-            var num = new Array(this.getLength() + e.getLength() - 1);
-            for (var i = 0; i < this.getLength(); i++) {
-                for (var j = 0; j < e.getLength(); j++) {
-                    num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
-                }
-            }
-            return new QRPolynomial(num, 0);
-        },
-        mod: function (e) {
-            if (this.getLength() - e.getLength() < 0) {
-                return this;
-            }
-            var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));
-            var num = new Array(this.getLength());
-            for (var i = 0; i < this.getLength(); i++) {
-                num[i] = this.get(i);
-            }
-            for (var i = 0; i < e.getLength(); i++) {
-                num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
-            }
-            // recursive call
-            return new QRPolynomial(num, 0).mod(e);
-        }
-    };
-    //---------------------------------------------------------------------
-    // QRRSBlock
-    //---------------------------------------------------------------------
-    function QRRSBlock(totalCount, dataCount) {
-        this.totalCount = totalCount;
-        this.dataCount = dataCount;
-    }
-    QRRSBlock.RS_BLOCK_TABLE = [
-        // L
-        // M
-        // Q
-        // H
-        // 1
-        [1, 26, 19],
-        [1, 26, 16],
-        [1, 26, 13],
-        [1, 26, 9],
-        // 2
-        [1, 44, 34],
-        [1, 44, 28],
-        [1, 44, 22],
-        [1, 44, 16],
-        // 3
-        [1, 70, 55],
-        [1, 70, 44],
-        [2, 35, 17],
-        [2, 35, 13],
-        // 4		
-        [1, 100, 80],
-        [2, 50, 32],
-        [2, 50, 24],
-        [4, 25, 9],
-        // 5
-        [1, 134, 108],
-        [2, 67, 43],
-        [2, 33, 15, 2, 34, 16],
-        [2, 33, 11, 2, 34, 12],
-        // 6
-        [2, 86, 68],
-        [4, 43, 27],
-        [4, 43, 19],
-        [4, 43, 15],
-        // 7		
-        [2, 98, 78],
-        [4, 49, 31],
-        [2, 32, 14, 4, 33, 15],
-        [4, 39, 13, 1, 40, 14],
-        // 8
-        [2, 121, 97],
-        [2, 60, 38, 2, 61, 39],
-        [4, 40, 18, 2, 41, 19],
-        [4, 40, 14, 2, 41, 15],
-        // 9
-        [2, 146, 116],
-        [3, 58, 36, 2, 59, 37],
-        [4, 36, 16, 4, 37, 17],
-        [4, 36, 12, 4, 37, 13],
-        // 10		
-        [2, 86, 68, 2, 87, 69],
-        [4, 69, 43, 1, 70, 44],
-        [6, 43, 19, 2, 44, 20],
-        [6, 43, 15, 2, 44, 16],
-        // 11
-        [4, 101, 81],
-        [1, 80, 50, 4, 81, 51],
-        [4, 50, 22, 4, 51, 23],
-        [3, 36, 12, 8, 37, 13],
-        // 12
-        [2, 116, 92, 2, 117, 93],
-        [6, 58, 36, 2, 59, 37],
-        [4, 46, 20, 6, 47, 21],
-        [7, 42, 14, 4, 43, 15],
-        // 13
-        [4, 133, 107],
-        [8, 59, 37, 1, 60, 38],
-        [8, 44, 20, 4, 45, 21],
-        [12, 33, 11, 4, 34, 12],
-        // 14
-        [3, 145, 115, 1, 146, 116],
-        [4, 64, 40, 5, 65, 41],
-        [11, 36, 16, 5, 37, 17],
-        [11, 36, 12, 5, 37, 13],
-        // 15
-        [5, 109, 87, 1, 110, 88],
-        [5, 65, 41, 5, 66, 42],
-        [5, 54, 24, 7, 55, 25],
-        [11, 36, 12],
-        // 16
-        [5, 122, 98, 1, 123, 99],
-        [7, 73, 45, 3, 74, 46],
-        [15, 43, 19, 2, 44, 20],
-        [3, 45, 15, 13, 46, 16],
-        // 17
-        [1, 135, 107, 5, 136, 108],
-        [10, 74, 46, 1, 75, 47],
-        [1, 50, 22, 15, 51, 23],
-        [2, 42, 14, 17, 43, 15],
-        // 18
-        [5, 150, 120, 1, 151, 121],
-        [9, 69, 43, 4, 70, 44],
-        [17, 50, 22, 1, 51, 23],
-        [2, 42, 14, 19, 43, 15],
-        // 19
-        [3, 141, 113, 4, 142, 114],
-        [3, 70, 44, 11, 71, 45],
-        [17, 47, 21, 4, 48, 22],
-        [9, 39, 13, 16, 40, 14],
-        // 20
-        [3, 135, 107, 5, 136, 108],
-        [3, 67, 41, 13, 68, 42],
-        [15, 54, 24, 5, 55, 25],
-        [15, 43, 15, 10, 44, 16],
-        // 21
-        [4, 144, 116, 4, 145, 117],
-        [17, 68, 42],
-        [17, 50, 22, 6, 51, 23],
-        [19, 46, 16, 6, 47, 17],
-        // 22
-        [2, 139, 111, 7, 140, 112],
-        [17, 74, 46],
-        [7, 54, 24, 16, 55, 25],
-        [34, 37, 13],
-        // 23
-        [4, 151, 121, 5, 152, 122],
-        [4, 75, 47, 14, 76, 48],
-        [11, 54, 24, 14, 55, 25],
-        [16, 45, 15, 14, 46, 16],
-        // 24
-        [6, 147, 117, 4, 148, 118],
-        [6, 73, 45, 14, 74, 46],
-        [11, 54, 24, 16, 55, 25],
-        [30, 46, 16, 2, 47, 17],
-        // 25
-        [8, 132, 106, 4, 133, 107],
-        [8, 75, 47, 13, 76, 48],
-        [7, 54, 24, 22, 55, 25],
-        [22, 45, 15, 13, 46, 16],
-        // 26
-        [10, 142, 114, 2, 143, 115],
-        [19, 74, 46, 4, 75, 47],
-        [28, 50, 22, 6, 51, 23],
-        [33, 46, 16, 4, 47, 17],
-        // 27
-        [8, 152, 122, 4, 153, 123],
-        [22, 73, 45, 3, 74, 46],
-        [8, 53, 23, 26, 54, 24],
-        [12, 45, 15, 28, 46, 16],
-        // 28
-        [3, 147, 117, 10, 148, 118],
-        [3, 73, 45, 23, 74, 46],
-        [4, 54, 24, 31, 55, 25],
-        [11, 45, 15, 31, 46, 16],
-        // 29
-        [7, 146, 116, 7, 147, 117],
-        [21, 73, 45, 7, 74, 46],
-        [1, 53, 23, 37, 54, 24],
-        [19, 45, 15, 26, 46, 16],
-        // 30
-        [5, 145, 115, 10, 146, 116],
-        [19, 75, 47, 10, 76, 48],
-        [15, 54, 24, 25, 55, 25],
-        [23, 45, 15, 25, 46, 16],
-        // 31
-        [13, 145, 115, 3, 146, 116],
-        [2, 74, 46, 29, 75, 47],
-        [42, 54, 24, 1, 55, 25],
-        [23, 45, 15, 28, 46, 16],
-        // 32
-        [17, 145, 115],
-        [10, 74, 46, 23, 75, 47],
-        [10, 54, 24, 35, 55, 25],
-        [19, 45, 15, 35, 46, 16],
-        // 33
-        [17, 145, 115, 1, 146, 116],
-        [14, 74, 46, 21, 75, 47],
-        [29, 54, 24, 19, 55, 25],
-        [11, 45, 15, 46, 46, 16],
-        // 34
-        [13, 145, 115, 6, 146, 116],
-        [14, 74, 46, 23, 75, 47],
-        [44, 54, 24, 7, 55, 25],
-        [59, 46, 16, 1, 47, 17],
-        // 35
-        [12, 151, 121, 7, 152, 122],
-        [12, 75, 47, 26, 76, 48],
-        [39, 54, 24, 14, 55, 25],
-        [22, 45, 15, 41, 46, 16],
-        // 36
-        [6, 151, 121, 14, 152, 122],
-        [6, 75, 47, 34, 76, 48],
-        [46, 54, 24, 10, 55, 25],
-        [2, 45, 15, 64, 46, 16],
-        // 37
-        [17, 152, 122, 4, 153, 123],
-        [29, 74, 46, 14, 75, 47],
-        [49, 54, 24, 10, 55, 25],
-        [24, 45, 15, 46, 46, 16],
-        // 38
-        [4, 152, 122, 18, 153, 123],
-        [13, 74, 46, 32, 75, 47],
-        [48, 54, 24, 14, 55, 25],
-        [42, 45, 15, 32, 46, 16],
-        // 39
-        [20, 147, 117, 4, 148, 118],
-        [40, 75, 47, 7, 76, 48],
-        [43, 54, 24, 22, 55, 25],
-        [10, 45, 15, 67, 46, 16],
-        // 40
-        [19, 148, 118, 6, 149, 119],
-        [18, 75, 47, 31, 76, 48],
-        [34, 54, 24, 34, 55, 25],
-        [20, 45, 15, 61, 46, 16]
-    ];
-    QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {
-        var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
-        if (rsBlock == undefined) {
-            throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
-        }
-        var length = rsBlock.length / 3;
-        var list = new Array();
-        for (var i = 0; i < length; i++) {
-            var count = rsBlock[i * 3 + 0];
-            var totalCount = rsBlock[i * 3 + 1];
-            var dataCount = rsBlock[i * 3 + 2];
-            for (var j = 0; j < count; j++) {
-                list.push(new QRRSBlock(totalCount, dataCount));
-            }
-        }
-        return list;
-    };
-    QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) {
-        switch (errorCorrectLevel) {
-            case QRErrorCorrectLevel.L:
-                return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
-            case QRErrorCorrectLevel.M:
-                return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
-            case QRErrorCorrectLevel.Q:
-                return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
-            case QRErrorCorrectLevel.H:
-                return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
-            default:
-                return undefined;
-        }
-    };
-    //---------------------------------------------------------------------
-    // QRBitBuffer
-    //---------------------------------------------------------------------
-    function QRBitBuffer() {
-        this.buffer = new Array();
-        this.length = 0;
-    }
-    QRBitBuffer.prototype = {
-        get: function (index) {
-            var bufIndex = Math.floor(index / 8);
-            return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1;
-        },
-        put: function (num, length) {
-            for (var i = 0; i < length; i++) {
-                this.putBit(((num >>> (length - i - 1)) & 1) == 1);
-            }
-        },
-        getLengthInBits: function () {
-            return this.length;
-        },
-        putBit: function (bit) {
-            var bufIndex = Math.floor(this.length / 8);
-            if (this.buffer.length <= bufIndex) {
-                this.buffer.push(0);
-            }
-            if (bit) {
-                this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
-            }
-            this.length++;
-        }
-    };
-    //---------------------------------------------------------------------
-    // Support Chinese
-    //---------------------------------------------------------------------
-    function utf16To8(text) {
-        var result = '';
-        var c;
-        for (var i = 0; i < text.length; i++) {
-            c = text.charCodeAt(i);
-            if (c >= 0x0001 && c <= 0x007F) {
-                result += text.charAt(i);
-            }
-            else if (c > 0x07FF) {
-                result += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
-                result += String.fromCharCode(0x80 | c >> 6 & 0x3F);
-                result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
-            }
-            else {
-                result += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
-                result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
-            }
-        }
-        return result;
-    }
-    uQRCode = {
-        errorCorrectLevel: QRErrorCorrectLevel,
-        defaults: {
-            size: 354,
-            margin: 0,
-            backgroundColor: '#ffffff',
-            foregroundColor: '#000000',
-            errorCorrectLevel: QRErrorCorrectLevel.H,
-            typeNumber: -1
-        },
-        make: function (canvas, ctx, options) {
-            var defaultOptions = {
-                x: 0,
-                y: 0,
-                text: options.text,
-                size: this.defaults.size,
-                margin: this.defaults.margin,
-                backgroundColor: this.defaults.backgroundColor,
-                foregroundColor: this.defaults.foregroundColor,
-                errorCorrectLevel: this.defaults.errorCorrectLevel,
-                typeNumber: this.defaults.typeNumber
-            };
-            if (options) {
-                for (var i in options) {
-                    defaultOptions[i] = options[i];
-                }
-            }
-            options = defaultOptions;
-            var qrcode = new QRCode(options.typeNumber, options.errorCorrectLevel);
-            qrcode.addData(utf16To8(options.text));
-            qrcode.make();
-            ctx.fill;
-            ctx.fillStyle = options.backgroundColor;
-            ctx.fillRect(options.x, options.y, options.size, options.size);
-            var tileW = (options.size - options.margin * 2) / qrcode.getModuleCount();
-            var tileH = tileW;
-            for (var row = 0; row < qrcode.getModuleCount(); row++) {
-                for (var col = 0; col < qrcode.getModuleCount(); col++) {
-                    var style = qrcode.isDark(row, col) ? options.foregroundColor : options.backgroundColor;
-                    ctx.fillStyle = style;
-                    var x = Math.round(col * tileW) + options.margin;
-                    var y = Math.round(row * tileH) + options.margin;
-                    var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
-                    var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW);
-                    ctx.fillRect(options.x + x, options.y + y, w, h);
-                }
-            }
-        }
-    };
-})();
-export default uQRCode;
-//# sourceMappingURL=uQRCode.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/drawQrCode/uQRCode.js.map


+ 0 - 12
pagesB/comps/u-draw-poster/plugins/drawRoundImage/index.d.ts

@@ -1,12 +0,0 @@
-import { DrawPosterPlugin } from '../../core/plugin';
-declare module '../../core' {
-    interface CanvasCtx {
-        /** 绘制圆角图片
-         *
-         * 说明文档: https://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poste
-         */
-        drawRoundImage(url: string, x: number, y: number, w: number, h: number, r?: number): Promise<boolean>;
-    }
-}
-declare const _default: () => DrawPosterPlugin;
-export default _default;

+ 0 - 17
pagesB/comps/u-draw-poster/plugins/drawRoundImage/index.js

@@ -1,17 +0,0 @@
-const plugin = {
-    name: '__ctx-drawRoundImage__',
-    mounted: ({ ctx }) => {
-        ctx.drawRoundImage = async (url, x, y, w, h, r = 15) => {
-            ctx.save();
-            ctx.setFillStyle?.('transparent');
-            ctx.fillStyle = 'transparent';
-            ctx.fillRoundRect(x, y, w, h, r);
-            ctx.clip();
-            const result = await ctx.drawImage(url, x, y, w, h);
-            ctx.restore();
-            return result;
-        };
-    }
-};
-export default () => plugin;
-//# sourceMappingURL=index.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/drawRoundImage/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/plugins/drawRoundImage/index.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,GAAqB;IAC/B,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;QACnB,GAAG,CAAC,cAAc,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE;YACrD,GAAG,CAAC,IAAI,EAAE,CAAA;YACV,GAAG,CAAC,YAAY,EAAE,CAAC,aAAa,CAAC,CAAA;YACjC,GAAG,CAAC,SAAS,GAAG,aAAa,CAAA;YAC7B,GAAG,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YAChC,GAAG,CAAC,IAAI,EAAE,CAAA;YACV,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YACnD,GAAG,CAAC,OAAO,EAAE,CAAA;YACb,OAAO,MAAM,CAAA;QACf,CAAC,CAAA;IACH,CAAC;CACF,CAAA;AAED,eAAe,GAAG,EAAE,CAAC,MAAM,CAAA"}

+ 0 - 12
pagesB/comps/u-draw-poster/plugins/fillRoundRect/index.d.ts

@@ -1,12 +0,0 @@
-import { DrawPosterPlugin } from '../../core/plugin';
-declare module '../../core' {
-    interface CanvasCtx {
-        /** 绘制圆角矩形(填充)
-         *
-         * 说明文档: https://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poste
-         */
-        fillRoundRect(x: number, y: number, w: number, h: number, r: number): void;
-    }
-}
-declare const _default: () => DrawPosterPlugin;
-export default _default;

+ 0 - 8
pagesB/comps/u-draw-poster/plugins/fillRoundRect/index.js

@@ -1,8 +0,0 @@
-const plugin = {
-    name: '__ctx-fillRoundRect__',
-    mounted: ({ ctx }) => {
-        ctx.fillRoundRect = (x, y, w, h, r) => ctx.roundRect(x, y, w, h, r, true);
-    }
-};
-export default () => plugin;
-//# sourceMappingURL=index.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/fillRoundRect/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/plugins/fillRoundRect/index.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,GAAqB;IAC/B,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;QACnB,GAAG,CAAC,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IAC3E,CAAC;CACF,CAAA;AAED,eAAe,GAAG,EAAE,CAAC,MAAM,CAAA"}

+ 0 - 27
pagesB/comps/u-draw-poster/plugins/fillWarpText/index.d.ts

@@ -1,27 +0,0 @@
-import { DrawPosterPlugin } from '../../core/plugin';
-declare module '../../core' {
-    interface CanvasCtx {
-        /** 绘制二维码
-         *
-         * 说明文档: https://tuimao233.gitee.io/mao-blog/my-extends/u-draw-poste
-         */
-        fillWarpText(options: FillWarpTextOptions): {
-            text: string;
-            y: number;
-            x: number;
-        }[];
-    }
-}
-/** 绘制换行配置 */
-export interface FillWarpTextOptions {
-    content: string;
-    maxWidth?: number;
-    lineHeight?: number;
-    layer?: number;
-    x?: number;
-    y?: number;
-    separator?: string;
-    draw?: boolean;
-}
-declare const _default: () => DrawPosterPlugin;
-export default _default;

+ 0 - 82
pagesB/comps/u-draw-poster/plugins/fillWarpText/index.js

@@ -1,82 +0,0 @@
-const plugin = {
-    name: '__ctx-fillWarpText__',
-    mounted: ({ ctx }) => {
-        ctx.fillWarpText = (config) => {
-            const _config = (config = {
-                maxWidth: 100,
-                layer: 2,
-                lineHeight: +ctx.font.replace(/[^\d.]/g, ''),
-                x: 0,
-                y: +ctx.font.replace(/[^\d.]/g, '') / 1.2,
-                separator: '',
-                draw: true,
-                ...config
-            });
-            const { content, separator, maxWidth, layer, lineHeight, draw, x, y } = _config;
-            // 当字符串为空时, 抛出错误
-            if (!content) {
-                throw new Error('warpFillText Error: text is empty string');
-            }
-            // 分割所有单个字符串
-            const chr = content.split(separator);
-            // 存入的每行字体的容器
-            let row = [];
-            // 判断字符串
-            let timp = '';
-            if (separator) {
-                row = chr;
-            }
-            else {
-                // 遍历所有字符串, 填充行容器
-                for (let i = 0; i < chr.length; i++) {
-                    // 当超出行列时, 停止执行遍历, 节省计算时间
-                    if (row.length > layer) {
-                        break;
-                    }
-                    if (ctx.measureText(timp).width < maxWidth) {
-                        // 如果超出长度, 添加进row数组
-                        timp += chr[i];
-                    }
-                    else {
-                        // 如超出一行长度, 则换行, 并清除容器
-                        i--;
-                        row.push(timp);
-                        timp = '';
-                    }
-                }
-                // 如有剩下字体, 则在最后时添加一行
-                if (timp) {
-                    row.push(timp);
-                }
-                // 如果数组长度大于指定行数
-                if (row.length > layer) {
-                    row = row.slice(0, layer);
-                    // 结束的索引
-                    const end = layer - 1;
-                    for (let i = 0; i < row[end].length; i++) {
-                        const currentWidth = ctx.measureText(`${row[end]}...`).width;
-                        if (currentWidth > maxWidth) {
-                            // 加上... 当前宽度大于最大宽度时, 去除一位字符串
-                            const strEnd = row[end].length - 1;
-                            row[end] = row[end].slice(0, strEnd);
-                        }
-                        else {
-                            row[end] += '...';
-                            break;
-                        }
-                    }
-                }
-            }
-            // 储存并返回绘制信息
-            return row.map((item, index) => {
-                const info = { text: item, y: y + index * lineHeight, x };
-                // 默认执行绘制信息
-                if (draw)
-                    ctx.fillText(info.text, info.x, info.y);
-                return info;
-            });
-        };
-    }
-};
-export default () => plugin;
-//# sourceMappingURL=index.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/fillWarpText/index.js.map


+ 0 - 29
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/bridge/bridge-weex.d.ts

@@ -1,29 +0,0 @@
-export default GBridge;
-declare namespace GBridge {
-    function callEnable(ref: any, configArray: any): any;
-    function callEnableDebug(): void;
-    function callEnableDisableCombo(): void;
-    function callSetContextType(componentId: any, context_type: any): void;
-    function callReset(id: any): void;
-    function render(componentId: any): any;
-    function render2d(componentId: any, commands: any, callback: any): void;
-    function callExtendCallNative(componentId: any, cmdArgs: any): never;
-    function flushNative(componentId: any): any;
-    function callNative(componentId: any, cmdArgs: any, cache: any): any;
-    function texImage2D(componentId: any, ...args: any[]): void;
-    function texImage2D(componentId: any, ...args: any[]): void;
-    function texSubImage2D(componentId: any, target: any, level: any, xoffset: any, yoffset: any, format: any, type: any, image: any, ...args: any[]): void;
-    function texSubImage2D(componentId: any, target: any, level: any, xoffset: any, yoffset: any, format: any, type: any, image: any, ...args: any[]): void;
-    function bindImageTexture(componentId: any, src: any, imageId: any): void;
-    function bindImageTexture(componentId: any, src: any, imageId: any): void;
-    function perloadImage([url, id]: [any, any], callback: any): void;
-    function perloadImage([url, id]: [any, any], callback: any): void;
-    function measureText(text: any, fontStyle: any, componentId: any): any;
-    function measureText(text: any, fontStyle: any, componentId: any): any;
-    function getImageData(componentId: any, x: any, y: any, w: any, h: any, callback: any): void;
-    function getImageData(componentId: any, x: any, y: any, w: any, h: any, callback: any): void;
-    function putImageData(componentId: any, data: any, x: any, y: any, w: any, h: any, callback: any): void;
-    function putImageData(componentId: any, data: any, x: any, y: any, w: any, h: any, callback: any): void;
-    function toTempFilePath(componentId: any, x: any, y: any, width: any, height: any, destWidth: any, destHeight: any, fileType: any, quality: any, callback: any): void;
-    function toTempFilePath(componentId: any, x: any, y: any, width: any, height: any, destWidth: any, destHeight: any, fileType: any, quality: any, callback: any): void;
-}

+ 0 - 183
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/bridge/bridge-weex.js

@@ -1,183 +0,0 @@
-const isWeex = typeof WXEnvironment !== 'undefined';
-const isWeexIOS = isWeex && /ios/i.test(WXEnvironment.platform);
-const isWeexAndroid = isWeex && !isWeexIOS;
-import GLmethod from '../context-webgl/GLmethod';
-const GCanvasModule = (typeof weex !== 'undefined' && weex.requireModule) ? (weex.requireModule('gcanvas')) :
-    (typeof __weex_require__ !== 'undefined') ? (__weex_require__('@weex-module/gcanvas')) : {};
-let isDebugging = false;
-let isComboDisabled = false;
-const logCommand = (function () {
-    const methodQuery = [];
-    Object.keys(GLmethod).forEach(key => {
-        methodQuery[GLmethod[key]] = key;
-    });
-    const queryMethod = (id) => {
-        return methodQuery[parseInt(id)] || 'NotFoundMethod';
-    };
-    const logCommand = (id, cmds) => {
-        const mId = cmds.split(',')[0];
-        const mName = queryMethod(mId);
-        console.log(`=== callNative - componentId:${id}; method: ${mName}; cmds: ${cmds}`);
-    };
-    return logCommand;
-})();
-function joinArray(arr, sep) {
-    let res = '';
-    for (let i = 0; i < arr.length; i++) {
-        if (i !== 0) {
-            res += sep;
-        }
-        res += arr[i];
-    }
-    return res;
-}
-const commandsCache = {};
-const GBridge = {
-    callEnable: (ref, configArray) => {
-        commandsCache[ref] = [];
-        return GCanvasModule.enable({
-            componentId: ref,
-            config: configArray
-        });
-    },
-    callEnableDebug: () => {
-        isDebugging = true;
-    },
-    callEnableDisableCombo: () => {
-        isComboDisabled = true;
-    },
-    callSetContextType: function (componentId, context_type) {
-        GCanvasModule.setContextType(context_type, componentId);
-    },
-    callReset: function (id) {
-        GCanvasModule.resetComponent && canvasModule.resetComponent(componentId);
-    },
-    render: isWeexIOS ? function (componentId) {
-        return GCanvasModule.extendCallNative({
-            contextId: componentId,
-            type: 0x60000001
-        });
-    } : function (componentId) {
-        return callGCanvasLinkNative(componentId, 0x60000001, 'render');
-    },
-    render2d: isWeexIOS ? function (componentId, commands, callback) {
-        if (isDebugging) {
-            console.log('>>> >>> render2d ===');
-            console.log('>>> commands: ' + commands);
-        }
-        GCanvasModule.render([commands, callback ? true : false], componentId, callback);
-    } : function (componentId, commands, callback) {
-        if (isDebugging) {
-            console.log('>>> >>> render2d ===');
-            console.log('>>> commands: ' + commands);
-        }
-        callGCanvasLinkNative(componentId, 0x20000001, commands);
-        if (callback) {
-            callback();
-        }
-    },
-    callExtendCallNative: isWeexIOS ? function (componentId, cmdArgs) {
-        throw 'should not be here anymore ' + cmdArgs;
-    } : function (componentId, cmdArgs) {
-        throw 'should not be here anymore ' + cmdArgs;
-    },
-    flushNative: isWeexIOS ? function (componentId) {
-        const cmdArgs = joinArray(commandsCache[componentId], ';');
-        commandsCache[componentId] = [];
-        if (isDebugging) {
-            console.log('>>> >>> flush native ===');
-            console.log('>>> commands: ' + cmdArgs);
-        }
-        const result = GCanvasModule.extendCallNative({
-            "contextId": componentId,
-            "type": 0x60000000,
-            "args": cmdArgs
-        });
-        const res = result && result.result;
-        if (isDebugging) {
-            console.log('>>> result: ' + res);
-        }
-        return res;
-    } : function (componentId) {
-        const cmdArgs = joinArray(commandsCache[componentId], ';');
-        commandsCache[componentId] = [];
-        if (isDebugging) {
-            console.log('>>> >>> flush native ===');
-            console.log('>>> commands: ' + cmdArgs);
-        }
-        const result = callGCanvasLinkNative(componentId, 0x60000000, cmdArgs);
-        if (isDebugging) {
-            console.log('>>> result: ' + result);
-        }
-        return result;
-    },
-    callNative: function (componentId, cmdArgs, cache) {
-        if (isDebugging) {
-            logCommand(componentId, cmdArgs);
-        }
-        commandsCache[componentId].push(cmdArgs);
-        if (!cache || isComboDisabled) {
-            return GBridge.flushNative(componentId);
-        }
-        else {
-            return undefined;
-        }
-    },
-    texImage2D(componentId, ...args) {
-        if (isWeexIOS) {
-            if (args.length === 6) {
-                const [target, level, internalformat, format, type, image] = args;
-                GBridge.callNative(componentId, GLmethod.texImage2D + ',' + 6 + ',' + target + ',' + level + ',' + internalformat + ',' + format + ',' + type + ',' + image.src);
-            }
-            else if (args.length === 9) {
-                const [target, level, internalformat, width, height, border, format, type, image] = args;
-                GBridge.callNative(componentId, GLmethod.texImage2D + ',' + 9 + ',' + target + ',' + level + ',' + internalformat + ',' + width + ',' + height + ',' + border + ',' +
-                    +format + ',' + type + ',' + (image ? image.src : 0));
-            }
-        }
-        else if (isWeexAndroid) {
-            if (args.length === 6) {
-                const [target, level, internalformat, format, type, image] = args;
-                GCanvasModule.texImage2D(componentId, target, level, internalformat, format, type, image.src);
-            }
-            else if (args.length === 9) {
-                const [target, level, internalformat, width, height, border, format, type, image] = args;
-                GCanvasModule.texImage2D(componentId, target, level, internalformat, width, height, border, format, type, (image ? image.src : 0));
-            }
-        }
-    },
-    texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image) {
-        if (isWeexIOS) {
-            if (arguments.length === 8) {
-                GBridge.callNative(componentId, GLmethod.texSubImage2D + ',' + 6 + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset, +',' + format + ',' + type + ',' + image.src);
-            }
-        }
-        else if (isWeexAndroid) {
-            GCanvasModule.texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image.src);
-        }
-    },
-    bindImageTexture(componentId, src, imageId) {
-        GCanvasModule.bindImageTexture([src, imageId], componentId);
-    },
-    perloadImage([url, id], callback) {
-        GCanvasModule.preLoadImage([url, id], function (image) {
-            image.url = url;
-            image.id = id;
-            callback(image);
-        });
-    },
-    measureText(text, fontStyle, componentId) {
-        return GCanvasModule.measureText([text, fontStyle], componentId);
-    },
-    getImageData(componentId, x, y, w, h, callback) {
-        GCanvasModule.getImageData([x, y, w, h], componentId, callback);
-    },
-    putImageData(componentId, data, x, y, w, h, callback) {
-        GCanvasModule.putImageData([x, y, w, h, data], componentId, callback);
-    },
-    toTempFilePath(componentId, x, y, width, height, destWidth, destHeight, fileType, quality, callback) {
-        GCanvasModule.toTempFilePath([x, y, width, height, destWidth, destHeight, fileType, quality], componentId, callback);
-    }
-};
-export default GBridge;
-//# sourceMappingURL=bridge-weex.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/bridge/bridge-weex.js.map


+ 0 - 15
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.d.ts

@@ -1,15 +0,0 @@
-export default FillStyleLinearGradient;
-declare class FillStyleLinearGradient {
-    constructor(x0: any, y0: any, x1: any, y1: any);
-    _start_pos: {
-        _x: any;
-        _y: any;
-    };
-    _end_pos: {
-        _x: any;
-        _y: any;
-    };
-    _stop_count: number;
-    _stops: number[];
-    addColorStop: (pos: any, color: any) => void;
-}

+ 0 - 16
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.js

@@ -1,16 +0,0 @@
-class FillStyleLinearGradient {
-    constructor(x0, y0, x1, y1) {
-        this._start_pos = { _x: x0, _y: y0 };
-        this._end_pos = { _x: x1, _y: y1 };
-        this._stop_count = 0;
-        this._stops = [0, 0, 0, 0, 0];
-    }
-    addColorStop = function (pos, color) {
-        if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
-            this._stops[this._stop_count] = { _pos: pos, _color: color };
-            this._stop_count++;
-        }
-    };
-}
-export default FillStyleLinearGradient;
-//# sourceMappingURL=FillStyleLinearGradient.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"FillStyleLinearGradient.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-2d/FillStyleLinearGradient.js"],"names":[],"mappings":"AAAA,MAAM,uBAAuB;IAEzB,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACtB,IAAI,CAAC,UAAU,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,YAAY,GAAG,UAAU,GAAG,EAAE,KAAK;QAC/B,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YAC7D,IAAI,CAAC,WAAW,EAAE,CAAC;SACtB;IACL,CAAC,CAAA;CACJ;AAED,eAAe,uBAAuB,CAAC"}

+ 0 - 6
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.d.ts

@@ -1,6 +0,0 @@
-export default FillStylePattern;
-declare class FillStylePattern {
-    constructor(img: any, pattern: any);
-    _style: any;
-    _img: any;
-}

+ 0 - 8
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.js

@@ -1,8 +0,0 @@
-class FillStylePattern {
-    constructor(img, pattern) {
-        this._style = pattern;
-        this._img = img;
-    }
-}
-export default FillStylePattern;
-//# sourceMappingURL=FillStylePattern.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"FillStylePattern.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-2d/FillStylePattern.js"],"names":[],"mappings":"AAAA,MAAM,gBAAgB;IAClB,YAAY,GAAG,EAAE,OAAO;QACpB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACpB,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC"}

+ 0 - 17
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.d.ts

@@ -1,17 +0,0 @@
-export default FillStyleRadialGradient;
-declare class FillStyleRadialGradient {
-    constructor(x0: any, y0: any, r0: any, x1: any, y1: any, r1: any);
-    _start_pos: {
-        _x: any;
-        _y: any;
-        _r: any;
-    };
-    _end_pos: {
-        _x: any;
-        _y: any;
-        _r: any;
-    };
-    _stop_count: number;
-    _stops: number[];
-    addColorStop(pos: any, color: any): void;
-}

+ 0 - 16
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.js

@@ -1,16 +0,0 @@
-class FillStyleRadialGradient {
-    constructor(x0, y0, r0, x1, y1, r1) {
-        this._start_pos = { _x: x0, _y: y0, _r: r0 };
-        this._end_pos = { _x: x1, _y: y1, _r: r1 };
-        this._stop_count = 0;
-        this._stops = [0, 0, 0, 0, 0];
-    }
-    addColorStop(pos, color) {
-        if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) {
-            this._stops[this._stop_count] = { _pos: pos, _color: color };
-            this._stop_count++;
-        }
-    }
-}
-export default FillStyleRadialGradient;
-//# sourceMappingURL=FillStyleRadialGradient.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"FillStyleRadialGradient.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-2d/FillStyleRadialGradient.js"],"names":[],"mappings":"AAAA,MAAM,uBAAuB;IACzB,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QAC9B,IAAI,CAAC,UAAU,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,YAAY,CAAC,GAAG,EAAE,KAAK;QACnB,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;YAC7D,IAAI,CAAC,WAAW,EAAE,CAAC;SACtB;IACL,CAAC;CACJ;AAED,eAAe,uBAAuB,CAAC"}

+ 0 - 98
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/RenderingContext.d.ts

@@ -1,98 +0,0 @@
-export default class CanvasRenderingContext2D {
-    _drawCommands: string;
-    _globalAlpha: number;
-    _fillStyle: string;
-    _strokeStyle: string;
-    _lineWidth: number;
-    _lineCap: string;
-    _lineJoin: string;
-    _miterLimit: number;
-    _globalCompositeOperation: string;
-    _textAlign: string;
-    _textBaseline: string;
-    _font: string;
-    _savedGlobalAlpha: any[];
-    timer: any;
-    componentId: any;
-    _notCommitDrawImageCache: any[];
-    _needRedrawImageCache: any[];
-    _redrawCommands: string;
-    _autoSaveContext: boolean;
-    className: string;
-    setFillStyle(value: any): void;
-    set fillStyle(arg: string);
-    get fillStyle(): string;
-    set globalAlpha(arg: number);
-    get globalAlpha(): number;
-    setGlobalAlpha(value: any): void;
-    set strokeStyle(arg: string);
-    get strokeStyle(): string;
-    setStrokeStyle(value: any): void;
-    set lineWidth(arg: number);
-    get lineWidth(): number;
-    setLineWidth(value: any): void;
-    set lineCap(arg: string);
-    get lineCap(): string;
-    setLineCap(value: any): void;
-    set lineJoin(arg: string);
-    get lineJoin(): string;
-    setLineJoin(value: any): void;
-    set miterLimit(arg: number);
-    get miterLimit(): number;
-    setMiterLimit(value: any): void;
-    set globalCompositeOperation(arg: string);
-    get globalCompositeOperation(): string;
-    set textAlign(arg: string);
-    get textAlign(): string;
-    setTextAlign(value: any): void;
-    set textBaseline(arg: string);
-    get textBaseline(): string;
-    setTextBaseline(value: any): void;
-    set font(arg: string);
-    get font(): string;
-    setFontSize(size: any): void;
-    setTransform(a: any, b: any, c: any, d: any, tx: any, ty: any): void;
-    transform(a: any, b: any, c: any, d: any, tx: any, ty: any): void;
-    resetTransform(): void;
-    scale(a: any, d: any): void;
-    rotate(angle: any): void;
-    translate(tx: any, ty: any): void;
-    save(): void;
-    restore(): void;
-    createPattern(img: any, pattern: any): FillStylePattern;
-    createLinearGradient(x0: any, y0: any, x1: any, y1: any): FillStyleLinearGradient;
-    createRadialGradient: (x0: any, y0: any, r0: any, x1: any, y1: any, r1: any) => FillStyleRadialGradient;
-    createCircularGradient: (x0: any, y0: any, r0: any) => FillStyleRadialGradient;
-    strokeRect(x: any, y: any, w: any, h: any): void;
-    clearRect(x: any, y: any, w: any, h: any): void;
-    clip(): void;
-    resetClip(): void;
-    closePath(): void;
-    moveTo(x: any, y: any): void;
-    lineTo(x: any, y: any): void;
-    quadraticCurveTo(cpx: any, cpy: any, x: any, y: any): void;
-    bezierCurveTo(cp1x: any, cp1y: any, cp2x: any, cp2y: any, x: any, y: any): void;
-    arcTo(x1: any, y1: any, x2: any, y2: any, radius: any): void;
-    beginPath(): void;
-    fillRect(x: any, y: any, w: any, h: any): void;
-    rect(x: any, y: any, w: any, h: any): void;
-    fill(): void;
-    stroke(path: any): void;
-    arc(x: any, y: any, radius: any, startAngle: any, endAngle: any, anticlockwise: any): void;
-    fillText(text: any, x: any, y: any): void;
-    strokeText(text: any, x: any, y: any): void;
-    measureText(text: any): any;
-    isPointInPath: (x: any, y: any) => never;
-    drawImage(image: any, sx: any, sy: any, sw: any, sh: any, dx: any, dy: any, dw: any, dh: any): void;
-    __drawImage(image: any, sx: any, sy: any, sw: any, sh: any, dx: any, dy: any, dw: any, dh: any, ...args: any[]): void;
-    _flush(reserve: any, callback: any): void;
-    _needRender: boolean | undefined;
-    _redrawflush(reserve: any, callback: any): void;
-    draw(reserve: any, callback: any): void;
-    getImageData(x: any, y: any, w: any, h: any, callback: any): void;
-    putImageData(data: any, x: any, y: any, w: any, h: any, callback: any): void;
-    toTempFilePath(x: any, y: any, width: any, height: any, destWidth: any, destHeight: any, fileType: any, quality: any, callback: any): void;
-}
-import FillStylePattern from "./FillStylePattern";
-import FillStyleLinearGradient from "./FillStyleLinearGradient";
-import FillStyleRadialGradient from "./FillStyleRadialGradient";

+ 0 - 565
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/RenderingContext.js

@@ -1,565 +0,0 @@
-import FillStylePattern from './FillStylePattern';
-import FillStyleLinearGradient from './FillStyleLinearGradient';
-import FillStyleRadialGradient from './FillStyleRadialGradient';
-import GImage from '../env/image.js';
-import { ArrayBufferToBase64, Base64ToUint8ClampedArray } from '../env/tool.js';
-export default class CanvasRenderingContext2D {
-    _drawCommands = '';
-    _globalAlpha = 1.0;
-    _fillStyle = 'rgb(0,0,0)';
-    _strokeStyle = 'rgb(0,0,0)';
-    _lineWidth = 1;
-    _lineCap = 'butt';
-    _lineJoin = 'miter';
-    _miterLimit = 10;
-    _globalCompositeOperation = 'source-over';
-    _textAlign = 'start';
-    _textBaseline = 'alphabetic';
-    _font = '10px sans-serif';
-    _savedGlobalAlpha = [];
-    timer = null;
-    componentId = null;
-    _notCommitDrawImageCache = [];
-    _needRedrawImageCache = [];
-    _redrawCommands = '';
-    _autoSaveContext = true;
-    // _imageMap = new GHashMap();
-    // _textureMap = new GHashMap();
-    constructor() {
-        this.className = 'CanvasRenderingContext2D';
-        //this.save()
-    }
-    setFillStyle(value) {
-        this.fillStyle = value;
-    }
-    set fillStyle(value) {
-        this._fillStyle = value;
-        if (typeof (value) == 'string') {
-            this._drawCommands = this._drawCommands.concat("F" + value + ";");
-        }
-        else if (value instanceof FillStylePattern) {
-            const image = value._img;
-            if (!image.complete) {
-                image.onload = () => {
-                    var index = this._needRedrawImageCache.indexOf(image);
-                    if (index > -1) {
-                        this._needRedrawImageCache.splice(index, 1);
-                        CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
-                        this._redrawflush(true);
-                    }
-                };
-                this._notCommitDrawImageCache.push(image);
-            }
-            else {
-                CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
-            }
-            //CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
-            this._drawCommands = this._drawCommands.concat("G" + image._id + "," + value._style + ";");
-        }
-        else if (value instanceof FillStyleLinearGradient) {
-            var command = "D" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," +
-                value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," +
-                value._stop_count;
-            for (var i = 0; i < value._stop_count; ++i) {
-                command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
-            }
-            this._drawCommands = this._drawCommands.concat(command + ";");
-        }
-        else if (value instanceof FillStyleRadialGradient) {
-            var command = "H" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + value._start_pos._r
-                .toFixed(2) + "," +
-                value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," + value._end_pos._r.toFixed(2) + "," +
-                value._stop_count;
-            for (var i = 0; i < value._stop_count; ++i) {
-                command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
-            }
-            this._drawCommands = this._drawCommands.concat(command + ";");
-        }
-    }
-    get fillStyle() {
-        return this._fillStyle;
-    }
-    get globalAlpha() {
-        return this._globalAlpha;
-    }
-    setGlobalAlpha(value) {
-        this.globalAlpha = value;
-    }
-    set globalAlpha(value) {
-        this._globalAlpha = value;
-        this._drawCommands = this._drawCommands.concat("a" + value.toFixed(2) + ";");
-    }
-    get strokeStyle() {
-        return this._strokeStyle;
-    }
-    setStrokeStyle(value) {
-        this.strokeStyle = value;
-    }
-    set strokeStyle(value) {
-        this._strokeStyle = value;
-        if (typeof (value) == 'string') {
-            this._drawCommands = this._drawCommands.concat("S" + value + ";");
-        }
-        else if (value instanceof FillStylePattern) {
-            CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
-            this._drawCommands = this._drawCommands.concat("G" + image._id + "," + value._style + ";");
-        }
-        else if (value instanceof FillStyleLinearGradient) {
-            var command = "D" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," +
-                value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," +
-                value._stop_count;
-            for (var i = 0; i < value._stop_count; ++i) {
-                command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
-            }
-            this._drawCommands = this._drawCommands.concat(command + ";");
-        }
-        else if (value instanceof FillStyleRadialGradient) {
-            var command = "H" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + value._start_pos._r
-                .toFixed(2) + "," +
-                value._end_pos._x.toFixed(2) + "," + value._end_pos._y + ",".toFixed(2) + value._end_pos._r.toFixed(2) + "," +
-                value._stop_count;
-            for (var i = 0; i < value._stop_count; ++i) {
-                command += ("," + value._stops[i]._pos + "," + value._stops[i]._color);
-            }
-            this._drawCommands = this._drawCommands.concat(command + ";");
-        }
-    }
-    get lineWidth() {
-        return this._lineWidth;
-    }
-    setLineWidth(value) {
-        this.lineWidth = value;
-    }
-    set lineWidth(value) {
-        this._lineWidth = value;
-        this._drawCommands = this._drawCommands.concat("W" + value + ";");
-    }
-    get lineCap() {
-        return this._lineCap;
-    }
-    setLineCap(value) {
-        this.lineCap = value;
-    }
-    set lineCap(value) {
-        this._lineCap = value;
-        this._drawCommands = this._drawCommands.concat("C" + value + ";");
-    }
-    get lineJoin() {
-        return this._lineJoin;
-    }
-    setLineJoin(value) {
-        this.lineJoin = value;
-    }
-    set lineJoin(value) {
-        this._lineJoin = value;
-        this._drawCommands = this._drawCommands.concat("J" + value + ";");
-    }
-    get miterLimit() {
-        return this._miterLimit;
-    }
-    setMiterLimit(value) {
-        this.miterLimit = value;
-    }
-    set miterLimit(value) {
-        this._miterLimit = value;
-        this._drawCommands = this._drawCommands.concat("M" + value + ";");
-    }
-    get globalCompositeOperation() {
-        return this._globalCompositeOperation;
-    }
-    set globalCompositeOperation(value) {
-        this._globalCompositeOperation = value;
-        let mode = 0;
-        switch (value) {
-            case "source-over":
-                mode = 0;
-                break;
-            case "source-atop":
-                mode = 5;
-                break;
-            case "source-in":
-                mode = 0;
-                break;
-            case "source-out":
-                mode = 2;
-                break;
-            case "destination-over":
-                mode = 4;
-                break;
-            case "destination-atop":
-                mode = 4;
-                break;
-            case "destination-in":
-                mode = 4;
-                break;
-            case "destination-out":
-                mode = 3;
-                break;
-            case "lighter":
-                mode = 1;
-                break;
-            case "copy":
-                mode = 2;
-                break;
-            case "xor":
-                mode = 6;
-                break;
-            default:
-                mode = 0;
-        }
-        this._drawCommands = this._drawCommands.concat("B" + mode + ";");
-    }
-    get textAlign() {
-        return this._textAlign;
-    }
-    setTextAlign(value) {
-        this.textAlign = value;
-    }
-    set textAlign(value) {
-        this._textAlign = value;
-        let Align = 0;
-        switch (value) {
-            case "start":
-                Align = 0;
-                break;
-            case "end":
-                Align = 1;
-                break;
-            case "left":
-                Align = 2;
-                break;
-            case "center":
-                Align = 3;
-                break;
-            case "right":
-                Align = 4;
-                break;
-            default:
-                Align = 0;
-        }
-        this._drawCommands = this._drawCommands.concat("A" + Align + ";");
-    }
-    get textBaseline() {
-        return this._textBaseline;
-    }
-    setTextBaseline(value) {
-        this.textBaseline = value;
-    }
-    set textBaseline(value) {
-        this._textBaseline = value;
-        let baseline = 0;
-        switch (value) {
-            case "alphabetic":
-                baseline = 0;
-                break;
-            case "middle":
-                baseline = 1;
-                break;
-            case "top":
-                baseline = 2;
-                break;
-            case "hanging":
-                baseline = 3;
-                break;
-            case "bottom":
-                baseline = 4;
-                break;
-            case "ideographic":
-                baseline = 5;
-                break;
-            default:
-                baseline = 0;
-                break;
-        }
-        this._drawCommands = this._drawCommands.concat("E" + baseline + ";");
-    }
-    get font() {
-        return this._font;
-    }
-    setFontSize(size) {
-        var str = this._font;
-        var strs = str.trim().split(/\s+/);
-        for (var i = 0; i < strs.length; i++) {
-            var values = ["normal", "italic", "oblique", "normal", "small-caps", "normal", "bold",
-                "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900",
-                "normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed",
-                "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"
-            ];
-            if (-1 == values.indexOf(strs[i].trim())) {
-                if (typeof size === 'string') {
-                    strs[i] = size;
-                }
-                else if (typeof size === 'number') {
-                    strs[i] = String(size) + 'px';
-                }
-                break;
-            }
-        }
-        this.font = strs.join(" ");
-    }
-    set font(value) {
-        this._font = value;
-        this._drawCommands = this._drawCommands.concat("j" + value + ";");
-    }
-    setTransform(a, b, c, d, tx, ty) {
-        this._drawCommands = this._drawCommands.concat("t" +
-            (a === 1 ? "1" : a.toFixed(2)) + "," +
-            (b === 0 ? "0" : b.toFixed(2)) + "," +
-            (c === 0 ? "0" : c.toFixed(2)) + "," +
-            (d === 1 ? "1" : d.toFixed(2)) + "," + tx.toFixed(2) + "," + ty.toFixed(2) + ";");
-    }
-    transform(a, b, c, d, tx, ty) {
-        this._drawCommands = this._drawCommands.concat("f" +
-            (a === 1 ? "1" : a.toFixed(2)) + "," +
-            (b === 0 ? "0" : b.toFixed(2)) + "," +
-            (c === 0 ? "0" : c.toFixed(2)) + "," +
-            (d === 1 ? "1" : d.toFixed(2)) + "," + tx + "," + ty + ";");
-    }
-    resetTransform() {
-        this._drawCommands = this._drawCommands.concat("m;");
-    }
-    scale(a, d) {
-        this._drawCommands = this._drawCommands.concat("k" + a.toFixed(2) + "," +
-            d.toFixed(2) + ";");
-    }
-    rotate(angle) {
-        this._drawCommands = this._drawCommands
-            .concat("r" + angle.toFixed(6) + ";");
-    }
-    translate(tx, ty) {
-        this._drawCommands = this._drawCommands.concat("l" + tx.toFixed(2) + "," + ty.toFixed(2) + ";");
-    }
-    save() {
-        this._savedGlobalAlpha.push(this._globalAlpha);
-        this._drawCommands = this._drawCommands.concat("v;");
-    }
-    restore() {
-        this._drawCommands = this._drawCommands.concat("e;");
-        this._globalAlpha = this._savedGlobalAlpha.pop();
-    }
-    createPattern(img, pattern) {
-        if (typeof img === 'string') {
-            var imgObj = new GImage();
-            imgObj.src = img;
-            img = imgObj;
-        }
-        return new FillStylePattern(img, pattern);
-    }
-    createLinearGradient(x0, y0, x1, y1) {
-        return new FillStyleLinearGradient(x0, y0, x1, y1);
-    }
-    createRadialGradient = function (x0, y0, r0, x1, y1, r1) {
-        return new FillStyleRadialGradient(x0, y0, r0, x1, y1, r1);
-    };
-    createCircularGradient = function (x0, y0, r0) {
-        return new FillStyleRadialGradient(x0, y0, 0, x0, y0, r0);
-    };
-    strokeRect(x, y, w, h) {
-        this._drawCommands = this._drawCommands.concat("s" + x + "," + y + "," + w + "," + h + ";");
-    }
-    clearRect(x, y, w, h) {
-        this._drawCommands = this._drawCommands.concat("c" + x + "," + y + "," + w +
-            "," + h + ";");
-    }
-    clip() {
-        this._drawCommands = this._drawCommands.concat("p;");
-    }
-    resetClip() {
-        this._drawCommands = this._drawCommands.concat("q;");
-    }
-    closePath() {
-        this._drawCommands = this._drawCommands.concat("o;");
-    }
-    moveTo(x, y) {
-        this._drawCommands = this._drawCommands.concat("g" + x.toFixed(2) + "," + y.toFixed(2) + ";");
-    }
-    lineTo(x, y) {
-        this._drawCommands = this._drawCommands.concat("i" + x.toFixed(2) + "," + y.toFixed(2) + ";");
-    }
-    quadraticCurveTo(cpx, cpy, x, y) {
-        this._drawCommands = this._drawCommands.concat("u" + cpx + "," + cpy + "," + x + "," + y + ";");
-    }
-    bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
-        this._drawCommands = this._drawCommands.concat("z" + cp1x.toFixed(2) + "," + cp1y.toFixed(2) + "," + cp2x.toFixed(2) + "," + cp2y.toFixed(2) + "," +
-            x.toFixed(2) + "," + y.toFixed(2) + ";");
-    }
-    arcTo(x1, y1, x2, y2, radius) {
-        this._drawCommands = this._drawCommands.concat("h" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + radius + ";");
-    }
-    beginPath() {
-        this._drawCommands = this._drawCommands.concat("b;");
-    }
-    fillRect(x, y, w, h) {
-        this._drawCommands = this._drawCommands.concat("n" + x + "," + y + "," + w +
-            "," + h + ";");
-    }
-    rect(x, y, w, h) {
-        this._drawCommands = this._drawCommands.concat("w" + x + "," + y + "," + w + "," + h + ";");
-    }
-    fill() {
-        this._drawCommands = this._drawCommands.concat("L;");
-    }
-    stroke(path) {
-        this._drawCommands = this._drawCommands.concat("x;");
-    }
-    arc(x, y, radius, startAngle, endAngle, anticlockwise) {
-        let ianticlockwise = 0;
-        if (anticlockwise) {
-            ianticlockwise = 1;
-        }
-        this._drawCommands = this._drawCommands.concat("y" + x.toFixed(2) + "," + y.toFixed(2) + "," +
-            radius.toFixed(2) + "," + startAngle + "," + endAngle + "," + ianticlockwise +
-            ";");
-    }
-    fillText(text, x, y) {
-        let tmptext = text.replace(/!/g, "!!");
-        tmptext = tmptext.replace(/,/g, "!,");
-        tmptext = tmptext.replace(/;/g, "!;");
-        this._drawCommands = this._drawCommands.concat("T" + tmptext + "," + x + "," + y + ",0.0;");
-    }
-    strokeText(text, x, y) {
-        let tmptext = text.replace(/!/g, "!!");
-        tmptext = tmptext.replace(/,/g, "!,");
-        tmptext = tmptext.replace(/;/g, "!;");
-        this._drawCommands = this._drawCommands.concat("U" + tmptext + "," + x + "," + y + ",0.0;");
-    }
-    measureText(text) {
-        return CanvasRenderingContext2D.GBridge.measureText(text, this.font, this.componentId);
-    }
-    isPointInPath = function (x, y) {
-        throw new Error('GCanvas not supported yet');
-    };
-    drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
-        if (typeof image === 'string') {
-            var imgObj = new GImage();
-            imgObj.src = image;
-            image = imgObj;
-        }
-        if (image instanceof GImage) {
-            if (!image.complete) {
-                imgObj.onload = () => {
-                    var index = this._needRedrawImageCache.indexOf(image);
-                    if (index > -1) {
-                        this._needRedrawImageCache.splice(index, 1);
-                        CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
-                        this._redrawflush(true);
-                    }
-                };
-                this._notCommitDrawImageCache.push(image);
-            }
-            else {
-                CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id);
-            }
-            var srcArgs = [image, sx, sy, sw, sh, dx, dy, dw, dh];
-            var args = [];
-            for (var arg in srcArgs) {
-                if (typeof (srcArgs[arg]) != 'undefined') {
-                    args.push(srcArgs[arg]);
-                }
-            }
-            this.__drawImage.apply(this, args);
-            //this.__drawImage(image,sx, sy, sw, sh, dx, dy, dw, dh);
-        }
-    }
-    __drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) {
-        const numArgs = arguments.length;
-        function drawImageCommands() {
-            if (numArgs === 3) {
-                const x = parseFloat(sx) || 0.0;
-                const y = parseFloat(sy) || 0.0;
-                return ("d" + image._id + ",0,0," +
-                    image.width + "," + image.height + "," +
-                    x + "," + y + "," + image.width + "," + image.height + ";");
-            }
-            else if (numArgs === 5) {
-                const x = parseFloat(sx) || 0.0;
-                const y = parseFloat(sy) || 0.0;
-                const width = parseInt(sw) || image.width;
-                const height = parseInt(sh) || image.height;
-                return ("d" + image._id + ",0,0," +
-                    image.width + "," + image.height + "," +
-                    x + "," + y + "," + width + "," + height + ";");
-            }
-            else if (numArgs === 9) {
-                sx = parseFloat(sx) || 0.0;
-                sy = parseFloat(sy) || 0.0;
-                sw = parseInt(sw) || image.width;
-                sh = parseInt(sh) || image.height;
-                dx = parseFloat(dx) || 0.0;
-                dy = parseFloat(dy) || 0.0;
-                dw = parseInt(dw) || image.width;
-                dh = parseInt(dh) || image.height;
-                return ("d" + image._id + "," +
-                    sx + "," + sy + "," + sw + "," + sh + "," +
-                    dx + "," + dy + "," + dw + "," + dh + ";");
-            }
-        }
-        this._drawCommands += drawImageCommands();
-    }
-    _flush(reserve, callback) {
-        const commands = this._drawCommands;
-        this._drawCommands = '';
-        CanvasRenderingContext2D.GBridge.render2d(this.componentId, commands, callback);
-        this._needRender = false;
-    }
-    _redrawflush(reserve, callback) {
-        const commands = this._redrawCommands;
-        CanvasRenderingContext2D.GBridge.render2d(this.componentId, commands, callback);
-        if (this._needRedrawImageCache.length == 0) {
-            this._redrawCommands = '';
-        }
-    }
-    draw(reserve, callback) {
-        if (!reserve) {
-            this._globalAlpha = this._savedGlobalAlpha.pop();
-            this._savedGlobalAlpha.push(this._globalAlpha);
-            this._redrawCommands = this._drawCommands;
-            this._needRedrawImageCache = this._notCommitDrawImageCache;
-            if (this._autoSaveContext) {
-                this._drawCommands = ("v;" + this._drawCommands);
-                this._autoSaveContext = false;
-            }
-            else {
-                this._drawCommands = ("e;X;v;" + this._drawCommands);
-            }
-        }
-        else {
-            this._needRedrawImageCache = this._needRedrawImageCache.concat(this._notCommitDrawImageCache);
-            this._redrawCommands += this._drawCommands;
-            if (this._autoSaveContext) {
-                this._drawCommands = ("v;" + this._drawCommands);
-                this._autoSaveContext = false;
-            }
-        }
-        this._notCommitDrawImageCache = [];
-        if (this._flush) {
-            this._flush(reserve, callback);
-        }
-    }
-    getImageData(x, y, w, h, callback) {
-        CanvasRenderingContext2D.GBridge.getImageData(this.componentId, x, y, w, h, function (res) {
-            res.data = Base64ToUint8ClampedArray(res.data);
-            if (typeof (callback) == 'function') {
-                callback(res);
-            }
-        });
-    }
-    putImageData(data, x, y, w, h, callback) {
-        if (data instanceof Uint8ClampedArray) {
-            data = ArrayBufferToBase64(data);
-            CanvasRenderingContext2D.GBridge.putImageData(this.componentId, data, x, y, w, h, function (res) {
-                if (typeof (callback) == 'function') {
-                    callback(res);
-                }
-            });
-        }
-    }
-    toTempFilePath(x, y, width, height, destWidth, destHeight, fileType, quality, callback) {
-        CanvasRenderingContext2D.GBridge.toTempFilePath(this.componentId, x, y, width, height, destWidth, destHeight, fileType, quality, function (res) {
-            if (typeof (callback) == 'function') {
-                callback(res);
-            }
-        });
-    }
-}
-//# sourceMappingURL=RenderingContext.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-2d/RenderingContext.js.map


+ 0 - 11
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.d.ts

@@ -1,11 +0,0 @@
-export default class WebGLActiveInfo {
-    constructor({ type, name, size }: {
-        type: any;
-        name: any;
-        size: any;
-    });
-    className: string;
-    type: any;
-    name: any;
-    size: any;
-}

+ 0 - 9
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.js

@@ -1,9 +0,0 @@
-export default class WebGLActiveInfo {
-    className = 'WebGLActiveInfo';
-    constructor({ type, name, size }) {
-        this.type = type;
-        this.name = name;
-        this.size = size;
-    }
-}
-//# sourceMappingURL=ActiveInfo.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"ActiveInfo.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-webgl/ActiveInfo.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,eAAe;IAChC,SAAS,GAAG,iBAAiB,CAAC;IAE9B,YAAY,EACR,IAAI,EAAE,IAAI,EAAE,IAAI,EACnB;QACG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ"}

+ 0 - 9
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Buffer.d.ts

@@ -1,9 +0,0 @@
-export default class WebGLBuffer {
-    static uuid: typeof uuid;
-    constructor(id: any);
-    className: string;
-    id: any;
-    uuid(): string;
-}
-declare function uuid(id: any): string;
-export {};

+ 0 - 16
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Buffer.js

@@ -1,16 +0,0 @@
-import { getTransferedObjectUUID } from './classUtils';
-const name = 'WebGLBuffer';
-function uuid(id) {
-    return getTransferedObjectUUID(name, id);
-}
-export default class WebGLBuffer {
-    className = name;
-    constructor(id) {
-        this.id = id;
-    }
-    static uuid = uuid;
-    uuid() {
-        return uuid(this.id);
-    }
-}
-//# sourceMappingURL=Buffer.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Buffer.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Buffer.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-webgl/Buffer.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAErD,MAAM,IAAI,GAAG,aAAa,CAAC;AAE3B,SAAS,IAAI,CAAC,EAAE;IACZ,OAAO,uBAAuB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,SAAS,GAAG,IAAI,CAAC;IAEjB,YAAY,EAAE;QACV,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IAEnB,IAAI;QACA,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC"}

+ 0 - 9
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.d.ts

@@ -1,9 +0,0 @@
-export default class WebGLFramebuffer {
-    static uuid: typeof uuid;
-    constructor(id: any);
-    className: string;
-    id: any;
-    uuid(): string;
-}
-declare function uuid(id: any): string;
-export {};

+ 0 - 16
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.js

@@ -1,16 +0,0 @@
-import { getTransferedObjectUUID } from './classUtils';
-const name = 'WebGLFrameBuffer';
-function uuid(id) {
-    return getTransferedObjectUUID(name, id);
-}
-export default class WebGLFramebuffer {
-    className = name;
-    constructor(id) {
-        this.id = id;
-    }
-    static uuid = uuid;
-    uuid() {
-        return uuid(this.id);
-    }
-}
-//# sourceMappingURL=Framebuffer.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Framebuffer.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-webgl/Framebuffer.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAErD,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAEhC,SAAS,IAAI,CAAC,EAAE;IACZ,OAAO,uBAAuB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACjC,SAAS,GAAG,IAAI,CAAC;IAEjB,YAAY,EAAE;QACV,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IAEnB,IAAI;QACA,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC"}

+ 0 - 299
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLenum.d.ts

@@ -1,299 +0,0 @@
-declare namespace _default {
-    const DEPTH_BUFFER_BIT: number;
-    const STENCIL_BUFFER_BIT: number;
-    const COLOR_BUFFER_BIT: number;
-    const POINTS: number;
-    const LINES: number;
-    const LINE_LOOP: number;
-    const LINE_STRIP: number;
-    const TRIANGLES: number;
-    const TRIANGLE_STRIP: number;
-    const TRIANGLE_FAN: number;
-    const ZERO: number;
-    const ONE: number;
-    const SRC_COLOR: number;
-    const ONE_MINUS_SRC_COLOR: number;
-    const SRC_ALPHA: number;
-    const ONE_MINUS_SRC_ALPHA: number;
-    const DST_ALPHA: number;
-    const ONE_MINUS_DST_ALPHA: number;
-    const DST_COLOR: number;
-    const ONE_MINUS_DST_COLOR: number;
-    const SRC_ALPHA_SATURATE: number;
-    const FUNC_ADD: number;
-    const BLEND_EQUATION: number;
-    const BLEND_EQUATION_RGB: number;
-    const BLEND_EQUATION_ALPHA: number;
-    const FUNC_SUBTRACT: number;
-    const FUNC_REVERSE_SUBTRACT: number;
-    const BLEND_DST_RGB: number;
-    const BLEND_SRC_RGB: number;
-    const BLEND_DST_ALPHA: number;
-    const BLEND_SRC_ALPHA: number;
-    const CONSTANT_COLOR: number;
-    const ONE_MINUS_CONSTANT_COLOR: number;
-    const CONSTANT_ALPHA: number;
-    const ONE_MINUS_CONSTANT_ALPHA: number;
-    const BLEND_COLOR: number;
-    const ARRAY_BUFFER: number;
-    const ELEMENT_ARRAY_BUFFER: number;
-    const ARRAY_BUFFER_BINDING: number;
-    const ELEMENT_ARRAY_BUFFER_BINDING: number;
-    const STREAM_DRAW: number;
-    const STATIC_DRAW: number;
-    const DYNAMIC_DRAW: number;
-    const BUFFER_SIZE: number;
-    const BUFFER_USAGE: number;
-    const CURRENT_VERTEX_ATTRIB: number;
-    const FRONT: number;
-    const BACK: number;
-    const FRONT_AND_BACK: number;
-    const TEXTURE_2D: number;
-    const CULL_FACE: number;
-    const BLEND: number;
-    const DITHER: number;
-    const STENCIL_TEST: number;
-    const DEPTH_TEST: number;
-    const SCISSOR_TEST: number;
-    const POLYGON_OFFSET_FILL: number;
-    const SAMPLE_ALPHA_TO_COVERAGE: number;
-    const SAMPLE_COVERAGE: number;
-    const NO_ERROR: number;
-    const INVALID_ENUM: number;
-    const INVALID_VALUE: number;
-    const INVALID_OPERATION: number;
-    const OUT_OF_MEMORY: number;
-    const CW: number;
-    const CCW: number;
-    const LINE_WIDTH: number;
-    const ALIASED_POINT_SIZE_RANGE: number;
-    const ALIASED_LINE_WIDTH_RANGE: number;
-    const CULL_FACE_MODE: number;
-    const FRONT_FACE: number;
-    const DEPTH_RANGE: number;
-    const DEPTH_WRITEMASK: number;
-    const DEPTH_CLEAR_VALUE: number;
-    const DEPTH_FUNC: number;
-    const STENCIL_CLEAR_VALUE: number;
-    const STENCIL_FUNC: number;
-    const STENCIL_FAIL: number;
-    const STENCIL_PASS_DEPTH_FAIL: number;
-    const STENCIL_PASS_DEPTH_PASS: number;
-    const STENCIL_REF: number;
-    const STENCIL_VALUE_MASK: number;
-    const STENCIL_WRITEMASK: number;
-    const STENCIL_BACK_FUNC: number;
-    const STENCIL_BACK_FAIL: number;
-    const STENCIL_BACK_PASS_DEPTH_FAIL: number;
-    const STENCIL_BACK_PASS_DEPTH_PASS: number;
-    const STENCIL_BACK_REF: number;
-    const STENCIL_BACK_VALUE_MASK: number;
-    const STENCIL_BACK_WRITEMASK: number;
-    const VIEWPORT: number;
-    const SCISSOR_BOX: number;
-    const COLOR_CLEAR_VALUE: number;
-    const COLOR_WRITEMASK: number;
-    const UNPACK_ALIGNMENT: number;
-    const PACK_ALIGNMENT: number;
-    const MAX_TEXTURE_SIZE: number;
-    const MAX_VIEWPORT_DIMS: number;
-    const SUBPIXEL_BITS: number;
-    const RED_BITS: number;
-    const GREEN_BITS: number;
-    const BLUE_BITS: number;
-    const ALPHA_BITS: number;
-    const DEPTH_BITS: number;
-    const STENCIL_BITS: number;
-    const POLYGON_OFFSET_UNITS: number;
-    const POLYGON_OFFSET_FACTOR: number;
-    const TEXTURE_BINDING_2D: number;
-    const SAMPLE_BUFFERS: number;
-    const SAMPLES: number;
-    const SAMPLE_COVERAGE_VALUE: number;
-    const SAMPLE_COVERAGE_INVERT: number;
-    const COMPRESSED_TEXTURE_FORMATS: number;
-    const DONT_CARE: number;
-    const FASTEST: number;
-    const NICEST: number;
-    const GENERATE_MIPMAP_HINT: number;
-    const BYTE: number;
-    const UNSIGNED_BYTE: number;
-    const SHORT: number;
-    const UNSIGNED_SHORT: number;
-    const INT: number;
-    const UNSIGNED_INT: number;
-    const FLOAT: number;
-    const DEPTH_COMPONENT: number;
-    const ALPHA: number;
-    const RGB: number;
-    const RGBA: number;
-    const LUMINANCE: number;
-    const LUMINANCE_ALPHA: number;
-    const UNSIGNED_SHORT_4_4_4_4: number;
-    const UNSIGNED_SHORT_5_5_5_1: number;
-    const UNSIGNED_SHORT_5_6_5: number;
-    const FRAGMENT_SHADER: number;
-    const VERTEX_SHADER: number;
-    const MAX_VERTEX_ATTRIBS: number;
-    const MAX_VERTEX_UNIFORM_VECTORS: number;
-    const MAX_VARYING_VECTORS: number;
-    const MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
-    const MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
-    const MAX_TEXTURE_IMAGE_UNITS: number;
-    const MAX_FRAGMENT_UNIFORM_VECTORS: number;
-    const SHADER_TYPE: number;
-    const DELETE_STATUS: number;
-    const LINK_STATUS: number;
-    const VALIDATE_STATUS: number;
-    const ATTACHED_SHADERS: number;
-    const ACTIVE_UNIFORMS: number;
-    const ACTIVE_ATTRIBUTES: number;
-    const SHADING_LANGUAGE_VERSION: number;
-    const CURRENT_PROGRAM: number;
-    const NEVER: number;
-    const LESS: number;
-    const EQUAL: number;
-    const LEQUAL: number;
-    const GREATER: number;
-    const NOTEQUAL: number;
-    const GEQUAL: number;
-    const ALWAYS: number;
-    const KEEP: number;
-    const REPLACE: number;
-    const INCR: number;
-    const DECR: number;
-    const INVERT: number;
-    const INCR_WRAP: number;
-    const DECR_WRAP: number;
-    const VENDOR: number;
-    const RENDERER: number;
-    const VERSION: number;
-    const NEAREST: number;
-    const LINEAR: number;
-    const NEAREST_MIPMAP_NEAREST: number;
-    const LINEAR_MIPMAP_NEAREST: number;
-    const NEAREST_MIPMAP_LINEAR: number;
-    const LINEAR_MIPMAP_LINEAR: number;
-    const TEXTURE_MAG_FILTER: number;
-    const TEXTURE_MIN_FILTER: number;
-    const TEXTURE_WRAP_S: number;
-    const TEXTURE_WRAP_T: number;
-    const TEXTURE: number;
-    const TEXTURE_CUBE_MAP: number;
-    const TEXTURE_BINDING_CUBE_MAP: number;
-    const TEXTURE_CUBE_MAP_POSITIVE_X: number;
-    const TEXTURE_CUBE_MAP_NEGATIVE_X: number;
-    const TEXTURE_CUBE_MAP_POSITIVE_Y: number;
-    const TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
-    const TEXTURE_CUBE_MAP_POSITIVE_Z: number;
-    const TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
-    const MAX_CUBE_MAP_TEXTURE_SIZE: number;
-    const TEXTURE0: number;
-    const TEXTURE1: number;
-    const TEXTURE2: number;
-    const TEXTURE3: number;
-    const TEXTURE4: number;
-    const TEXTURE5: number;
-    const TEXTURE6: number;
-    const TEXTURE7: number;
-    const TEXTURE8: number;
-    const TEXTURE9: number;
-    const TEXTURE10: number;
-    const TEXTURE11: number;
-    const TEXTURE12: number;
-    const TEXTURE13: number;
-    const TEXTURE14: number;
-    const TEXTURE15: number;
-    const TEXTURE16: number;
-    const TEXTURE17: number;
-    const TEXTURE18: number;
-    const TEXTURE19: number;
-    const TEXTURE20: number;
-    const TEXTURE21: number;
-    const TEXTURE22: number;
-    const TEXTURE23: number;
-    const TEXTURE24: number;
-    const TEXTURE25: number;
-    const TEXTURE26: number;
-    const TEXTURE27: number;
-    const TEXTURE28: number;
-    const TEXTURE29: number;
-    const TEXTURE30: number;
-    const TEXTURE31: number;
-    const ACTIVE_TEXTURE: number;
-    const REPEAT: number;
-    const CLAMP_TO_EDGE: number;
-    const MIRRORED_REPEAT: number;
-    const FLOAT_VEC2: number;
-    const FLOAT_VEC3: number;
-    const FLOAT_VEC4: number;
-    const INT_VEC2: number;
-    const INT_VEC3: number;
-    const INT_VEC4: number;
-    const BOOL: number;
-    const BOOL_VEC2: number;
-    const BOOL_VEC3: number;
-    const BOOL_VEC4: number;
-    const FLOAT_MAT2: number;
-    const FLOAT_MAT3: number;
-    const FLOAT_MAT4: number;
-    const SAMPLER_2D: number;
-    const SAMPLER_CUBE: number;
-    const VERTEX_ATTRIB_ARRAY_ENABLED: number;
-    const VERTEX_ATTRIB_ARRAY_SIZE: number;
-    const VERTEX_ATTRIB_ARRAY_STRIDE: number;
-    const VERTEX_ATTRIB_ARRAY_TYPE: number;
-    const VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
-    const VERTEX_ATTRIB_ARRAY_POINTER: number;
-    const VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
-    const IMPLEMENTATION_COLOR_READ_TYPE: number;
-    const IMPLEMENTATION_COLOR_READ_FORMAT: number;
-    const COMPILE_STATUS: number;
-    const LOW_FLOAT: number;
-    const MEDIUM_FLOAT: number;
-    const HIGH_FLOAT: number;
-    const LOW_INT: number;
-    const MEDIUM_INT: number;
-    const HIGH_INT: number;
-    const FRAMEBUFFER: number;
-    const RENDERBUFFER: number;
-    const RGBA4: number;
-    const RGB5_A1: number;
-    const RGB565: number;
-    const DEPTH_COMPONENT16: number;
-    const STENCIL_INDEX8: number;
-    const DEPTH_STENCIL: number;
-    const RENDERBUFFER_WIDTH: number;
-    const RENDERBUFFER_HEIGHT: number;
-    const RENDERBUFFER_INTERNAL_FORMAT: number;
-    const RENDERBUFFER_RED_SIZE: number;
-    const RENDERBUFFER_GREEN_SIZE: number;
-    const RENDERBUFFER_BLUE_SIZE: number;
-    const RENDERBUFFER_ALPHA_SIZE: number;
-    const RENDERBUFFER_DEPTH_SIZE: number;
-    const RENDERBUFFER_STENCIL_SIZE: number;
-    const FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
-    const FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
-    const FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
-    const FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
-    const COLOR_ATTACHMENT0: number;
-    const DEPTH_ATTACHMENT: number;
-    const STENCIL_ATTACHMENT: number;
-    const DEPTH_STENCIL_ATTACHMENT: number;
-    const NONE: number;
-    const FRAMEBUFFER_COMPLETE: number;
-    const FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
-    const FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
-    const FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
-    const FRAMEBUFFER_UNSUPPORTED: number;
-    const FRAMEBUFFER_BINDING: number;
-    const RENDERBUFFER_BINDING: number;
-    const MAX_RENDERBUFFER_SIZE: number;
-    const INVALID_FRAMEBUFFER_OPERATION: number;
-    const UNPACK_FLIP_Y_WEBGL: number;
-    const UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
-    const CONTEXT_LOST_WEBGL: number;
-    const UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
-    const BROWSER_DEFAULT_WEBGL: number;
-}
-export default _default;

+ 0 - 299
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLenum.js

@@ -1,299 +0,0 @@
-export default {
-    "DEPTH_BUFFER_BIT": 256,
-    "STENCIL_BUFFER_BIT": 1024,
-    "COLOR_BUFFER_BIT": 16384,
-    "POINTS": 0,
-    "LINES": 1,
-    "LINE_LOOP": 2,
-    "LINE_STRIP": 3,
-    "TRIANGLES": 4,
-    "TRIANGLE_STRIP": 5,
-    "TRIANGLE_FAN": 6,
-    "ZERO": 0,
-    "ONE": 1,
-    "SRC_COLOR": 768,
-    "ONE_MINUS_SRC_COLOR": 769,
-    "SRC_ALPHA": 770,
-    "ONE_MINUS_SRC_ALPHA": 771,
-    "DST_ALPHA": 772,
-    "ONE_MINUS_DST_ALPHA": 773,
-    "DST_COLOR": 774,
-    "ONE_MINUS_DST_COLOR": 775,
-    "SRC_ALPHA_SATURATE": 776,
-    "FUNC_ADD": 32774,
-    "BLEND_EQUATION": 32777,
-    "BLEND_EQUATION_RGB": 32777,
-    "BLEND_EQUATION_ALPHA": 34877,
-    "FUNC_SUBTRACT": 32778,
-    "FUNC_REVERSE_SUBTRACT": 32779,
-    "BLEND_DST_RGB": 32968,
-    "BLEND_SRC_RGB": 32969,
-    "BLEND_DST_ALPHA": 32970,
-    "BLEND_SRC_ALPHA": 32971,
-    "CONSTANT_COLOR": 32769,
-    "ONE_MINUS_CONSTANT_COLOR": 32770,
-    "CONSTANT_ALPHA": 32771,
-    "ONE_MINUS_CONSTANT_ALPHA": 32772,
-    "BLEND_COLOR": 32773,
-    "ARRAY_BUFFER": 34962,
-    "ELEMENT_ARRAY_BUFFER": 34963,
-    "ARRAY_BUFFER_BINDING": 34964,
-    "ELEMENT_ARRAY_BUFFER_BINDING": 34965,
-    "STREAM_DRAW": 35040,
-    "STATIC_DRAW": 35044,
-    "DYNAMIC_DRAW": 35048,
-    "BUFFER_SIZE": 34660,
-    "BUFFER_USAGE": 34661,
-    "CURRENT_VERTEX_ATTRIB": 34342,
-    "FRONT": 1028,
-    "BACK": 1029,
-    "FRONT_AND_BACK": 1032,
-    "TEXTURE_2D": 3553,
-    "CULL_FACE": 2884,
-    "BLEND": 3042,
-    "DITHER": 3024,
-    "STENCIL_TEST": 2960,
-    "DEPTH_TEST": 2929,
-    "SCISSOR_TEST": 3089,
-    "POLYGON_OFFSET_FILL": 32823,
-    "SAMPLE_ALPHA_TO_COVERAGE": 32926,
-    "SAMPLE_COVERAGE": 32928,
-    "NO_ERROR": 0,
-    "INVALID_ENUM": 1280,
-    "INVALID_VALUE": 1281,
-    "INVALID_OPERATION": 1282,
-    "OUT_OF_MEMORY": 1285,
-    "CW": 2304,
-    "CCW": 2305,
-    "LINE_WIDTH": 2849,
-    "ALIASED_POINT_SIZE_RANGE": 33901,
-    "ALIASED_LINE_WIDTH_RANGE": 33902,
-    "CULL_FACE_MODE": 2885,
-    "FRONT_FACE": 2886,
-    "DEPTH_RANGE": 2928,
-    "DEPTH_WRITEMASK": 2930,
-    "DEPTH_CLEAR_VALUE": 2931,
-    "DEPTH_FUNC": 2932,
-    "STENCIL_CLEAR_VALUE": 2961,
-    "STENCIL_FUNC": 2962,
-    "STENCIL_FAIL": 2964,
-    "STENCIL_PASS_DEPTH_FAIL": 2965,
-    "STENCIL_PASS_DEPTH_PASS": 2966,
-    "STENCIL_REF": 2967,
-    "STENCIL_VALUE_MASK": 2963,
-    "STENCIL_WRITEMASK": 2968,
-    "STENCIL_BACK_FUNC": 34816,
-    "STENCIL_BACK_FAIL": 34817,
-    "STENCIL_BACK_PASS_DEPTH_FAIL": 34818,
-    "STENCIL_BACK_PASS_DEPTH_PASS": 34819,
-    "STENCIL_BACK_REF": 36003,
-    "STENCIL_BACK_VALUE_MASK": 36004,
-    "STENCIL_BACK_WRITEMASK": 36005,
-    "VIEWPORT": 2978,
-    "SCISSOR_BOX": 3088,
-    "COLOR_CLEAR_VALUE": 3106,
-    "COLOR_WRITEMASK": 3107,
-    "UNPACK_ALIGNMENT": 3317,
-    "PACK_ALIGNMENT": 3333,
-    "MAX_TEXTURE_SIZE": 3379,
-    "MAX_VIEWPORT_DIMS": 3386,
-    "SUBPIXEL_BITS": 3408,
-    "RED_BITS": 3410,
-    "GREEN_BITS": 3411,
-    "BLUE_BITS": 3412,
-    "ALPHA_BITS": 3413,
-    "DEPTH_BITS": 3414,
-    "STENCIL_BITS": 3415,
-    "POLYGON_OFFSET_UNITS": 10752,
-    "POLYGON_OFFSET_FACTOR": 32824,
-    "TEXTURE_BINDING_2D": 32873,
-    "SAMPLE_BUFFERS": 32936,
-    "SAMPLES": 32937,
-    "SAMPLE_COVERAGE_VALUE": 32938,
-    "SAMPLE_COVERAGE_INVERT": 32939,
-    "COMPRESSED_TEXTURE_FORMATS": 34467,
-    "DONT_CARE": 4352,
-    "FASTEST": 4353,
-    "NICEST": 4354,
-    "GENERATE_MIPMAP_HINT": 33170,
-    "BYTE": 5120,
-    "UNSIGNED_BYTE": 5121,
-    "SHORT": 5122,
-    "UNSIGNED_SHORT": 5123,
-    "INT": 5124,
-    "UNSIGNED_INT": 5125,
-    "FLOAT": 5126,
-    "DEPTH_COMPONENT": 6402,
-    "ALPHA": 6406,
-    "RGB": 6407,
-    "RGBA": 6408,
-    "LUMINANCE": 6409,
-    "LUMINANCE_ALPHA": 6410,
-    "UNSIGNED_SHORT_4_4_4_4": 32819,
-    "UNSIGNED_SHORT_5_5_5_1": 32820,
-    "UNSIGNED_SHORT_5_6_5": 33635,
-    "FRAGMENT_SHADER": 35632,
-    "VERTEX_SHADER": 35633,
-    "MAX_VERTEX_ATTRIBS": 34921,
-    "MAX_VERTEX_UNIFORM_VECTORS": 36347,
-    "MAX_VARYING_VECTORS": 36348,
-    "MAX_COMBINED_TEXTURE_IMAGE_UNITS": 35661,
-    "MAX_VERTEX_TEXTURE_IMAGE_UNITS": 35660,
-    "MAX_TEXTURE_IMAGE_UNITS": 34930,
-    "MAX_FRAGMENT_UNIFORM_VECTORS": 36349,
-    "SHADER_TYPE": 35663,
-    "DELETE_STATUS": 35712,
-    "LINK_STATUS": 35714,
-    "VALIDATE_STATUS": 35715,
-    "ATTACHED_SHADERS": 35717,
-    "ACTIVE_UNIFORMS": 35718,
-    "ACTIVE_ATTRIBUTES": 35721,
-    "SHADING_LANGUAGE_VERSION": 35724,
-    "CURRENT_PROGRAM": 35725,
-    "NEVER": 512,
-    "LESS": 513,
-    "EQUAL": 514,
-    "LEQUAL": 515,
-    "GREATER": 516,
-    "NOTEQUAL": 517,
-    "GEQUAL": 518,
-    "ALWAYS": 519,
-    "KEEP": 7680,
-    "REPLACE": 7681,
-    "INCR": 7682,
-    "DECR": 7683,
-    "INVERT": 5386,
-    "INCR_WRAP": 34055,
-    "DECR_WRAP": 34056,
-    "VENDOR": 7936,
-    "RENDERER": 7937,
-    "VERSION": 7938,
-    "NEAREST": 9728,
-    "LINEAR": 9729,
-    "NEAREST_MIPMAP_NEAREST": 9984,
-    "LINEAR_MIPMAP_NEAREST": 9985,
-    "NEAREST_MIPMAP_LINEAR": 9986,
-    "LINEAR_MIPMAP_LINEAR": 9987,
-    "TEXTURE_MAG_FILTER": 10240,
-    "TEXTURE_MIN_FILTER": 10241,
-    "TEXTURE_WRAP_S": 10242,
-    "TEXTURE_WRAP_T": 10243,
-    "TEXTURE": 5890,
-    "TEXTURE_CUBE_MAP": 34067,
-    "TEXTURE_BINDING_CUBE_MAP": 34068,
-    "TEXTURE_CUBE_MAP_POSITIVE_X": 34069,
-    "TEXTURE_CUBE_MAP_NEGATIVE_X": 34070,
-    "TEXTURE_CUBE_MAP_POSITIVE_Y": 34071,
-    "TEXTURE_CUBE_MAP_NEGATIVE_Y": 34072,
-    "TEXTURE_CUBE_MAP_POSITIVE_Z": 34073,
-    "TEXTURE_CUBE_MAP_NEGATIVE_Z": 34074,
-    "MAX_CUBE_MAP_TEXTURE_SIZE": 34076,
-    "TEXTURE0": 33984,
-    "TEXTURE1": 33985,
-    "TEXTURE2": 33986,
-    "TEXTURE3": 33987,
-    "TEXTURE4": 33988,
-    "TEXTURE5": 33989,
-    "TEXTURE6": 33990,
-    "TEXTURE7": 33991,
-    "TEXTURE8": 33992,
-    "TEXTURE9": 33993,
-    "TEXTURE10": 33994,
-    "TEXTURE11": 33995,
-    "TEXTURE12": 33996,
-    "TEXTURE13": 33997,
-    "TEXTURE14": 33998,
-    "TEXTURE15": 33999,
-    "TEXTURE16": 34000,
-    "TEXTURE17": 34001,
-    "TEXTURE18": 34002,
-    "TEXTURE19": 34003,
-    "TEXTURE20": 34004,
-    "TEXTURE21": 34005,
-    "TEXTURE22": 34006,
-    "TEXTURE23": 34007,
-    "TEXTURE24": 34008,
-    "TEXTURE25": 34009,
-    "TEXTURE26": 34010,
-    "TEXTURE27": 34011,
-    "TEXTURE28": 34012,
-    "TEXTURE29": 34013,
-    "TEXTURE30": 34014,
-    "TEXTURE31": 34015,
-    "ACTIVE_TEXTURE": 34016,
-    "REPEAT": 10497,
-    "CLAMP_TO_EDGE": 33071,
-    "MIRRORED_REPEAT": 33648,
-    "FLOAT_VEC2": 35664,
-    "FLOAT_VEC3": 35665,
-    "FLOAT_VEC4": 35666,
-    "INT_VEC2": 35667,
-    "INT_VEC3": 35668,
-    "INT_VEC4": 35669,
-    "BOOL": 35670,
-    "BOOL_VEC2": 35671,
-    "BOOL_VEC3": 35672,
-    "BOOL_VEC4": 35673,
-    "FLOAT_MAT2": 35674,
-    "FLOAT_MAT3": 35675,
-    "FLOAT_MAT4": 35676,
-    "SAMPLER_2D": 35678,
-    "SAMPLER_CUBE": 35680,
-    "VERTEX_ATTRIB_ARRAY_ENABLED": 34338,
-    "VERTEX_ATTRIB_ARRAY_SIZE": 34339,
-    "VERTEX_ATTRIB_ARRAY_STRIDE": 34340,
-    "VERTEX_ATTRIB_ARRAY_TYPE": 34341,
-    "VERTEX_ATTRIB_ARRAY_NORMALIZED": 34922,
-    "VERTEX_ATTRIB_ARRAY_POINTER": 34373,
-    "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 34975,
-    "IMPLEMENTATION_COLOR_READ_TYPE": 35738,
-    "IMPLEMENTATION_COLOR_READ_FORMAT": 35739,
-    "COMPILE_STATUS": 35713,
-    "LOW_FLOAT": 36336,
-    "MEDIUM_FLOAT": 36337,
-    "HIGH_FLOAT": 36338,
-    "LOW_INT": 36339,
-    "MEDIUM_INT": 36340,
-    "HIGH_INT": 36341,
-    "FRAMEBUFFER": 36160,
-    "RENDERBUFFER": 36161,
-    "RGBA4": 32854,
-    "RGB5_A1": 32855,
-    "RGB565": 36194,
-    "DEPTH_COMPONENT16": 33189,
-    "STENCIL_INDEX8": 36168,
-    "DEPTH_STENCIL": 34041,
-    "RENDERBUFFER_WIDTH": 36162,
-    "RENDERBUFFER_HEIGHT": 36163,
-    "RENDERBUFFER_INTERNAL_FORMAT": 36164,
-    "RENDERBUFFER_RED_SIZE": 36176,
-    "RENDERBUFFER_GREEN_SIZE": 36177,
-    "RENDERBUFFER_BLUE_SIZE": 36178,
-    "RENDERBUFFER_ALPHA_SIZE": 36179,
-    "RENDERBUFFER_DEPTH_SIZE": 36180,
-    "RENDERBUFFER_STENCIL_SIZE": 36181,
-    "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE": 36048,
-    "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME": 36049,
-    "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL": 36050,
-    "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE": 36051,
-    "COLOR_ATTACHMENT0": 36064,
-    "DEPTH_ATTACHMENT": 36096,
-    "STENCIL_ATTACHMENT": 36128,
-    "DEPTH_STENCIL_ATTACHMENT": 33306,
-    "NONE": 0,
-    "FRAMEBUFFER_COMPLETE": 36053,
-    "FRAMEBUFFER_INCOMPLETE_ATTACHMENT": 36054,
-    "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT": 36055,
-    "FRAMEBUFFER_INCOMPLETE_DIMENSIONS": 36057,
-    "FRAMEBUFFER_UNSUPPORTED": 36061,
-    "FRAMEBUFFER_BINDING": 36006,
-    "RENDERBUFFER_BINDING": 36007,
-    "MAX_RENDERBUFFER_SIZE": 34024,
-    "INVALID_FRAMEBUFFER_OPERATION": 1286,
-    "UNPACK_FLIP_Y_WEBGL": 37440,
-    "UNPACK_PREMULTIPLY_ALPHA_WEBGL": 37441,
-    "CONTEXT_LOST_WEBGL": 37442,
-    "UNPACK_COLORSPACE_CONVERSION_WEBGL": 37443,
-    "BROWSER_DEFAULT_WEBGL": 37444
-};
-//# sourceMappingURL=GLenum.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLenum.js.map


+ 0 - 139
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLmethod.d.ts

@@ -1,139 +0,0 @@
-export default GLmethod;
-declare namespace GLmethod {
-    const activeTexture: number;
-    const attachShader: number;
-    const bindAttribLocation: number;
-    const bindBuffer: number;
-    const bindFramebuffer: number;
-    const bindRenderbuffer: number;
-    const bindTexture: number;
-    const blendColor: number;
-    const blendEquation: number;
-    const blendEquationSeparate: number;
-    const blendFunc: number;
-    const blendFuncSeparate: number;
-    const bufferData: number;
-    const bufferSubData: number;
-    const checkFramebufferStatus: number;
-    const clear: number;
-    const clearColor: number;
-    const clearDepth: number;
-    const clearStencil: number;
-    const colorMask: number;
-    const compileShader: number;
-    const compressedTexImage2D: number;
-    const compressedTexSubImage2D: number;
-    const copyTexImage2D: number;
-    const copyTexSubImage2D: number;
-    const createBuffer: number;
-    const createFramebuffer: number;
-    const createProgram: number;
-    const createRenderbuffer: number;
-    const createShader: number;
-    const createTexture: number;
-    const cullFace: number;
-    const deleteBuffer: number;
-    const deleteFramebuffer: number;
-    const deleteProgram: number;
-    const deleteRenderbuffer: number;
-    const deleteShader: number;
-    const deleteTexture: number;
-    const depthFunc: number;
-    const depthMask: number;
-    const depthRange: number;
-    const detachShader: number;
-    const disable: number;
-    const disableVertexAttribArray: number;
-    const drawArrays: number;
-    const drawArraysInstancedANGLE: number;
-    const drawElements: number;
-    const drawElementsInstancedANGLE: number;
-    const enable: number;
-    const enableVertexAttribArray: number;
-    const flush: number;
-    const framebufferRenderbuffer: number;
-    const framebufferTexture2D: number;
-    const frontFace: number;
-    const generateMipmap: number;
-    const getActiveAttrib: number;
-    const getActiveUniform: number;
-    const getAttachedShaders: number;
-    const getAttribLocation: number;
-    const getBufferParameter: number;
-    const getContextAttributes: number;
-    const getError: number;
-    const getExtension: number;
-    const getFramebufferAttachmentParameter: number;
-    const getParameter: number;
-    const getProgramInfoLog: number;
-    const getProgramParameter: number;
-    const getRenderbufferParameter: number;
-    const getShaderInfoLog: number;
-    const getShaderParameter: number;
-    const getShaderPrecisionFormat: number;
-    const getShaderSource: number;
-    const getSupportedExtensions: number;
-    const getTexParameter: number;
-    const getUniform: number;
-    const getUniformLocation: number;
-    const getVertexAttrib: number;
-    const getVertexAttribOffset: number;
-    const isBuffer: number;
-    const isContextLost: number;
-    const isEnabled: number;
-    const isFramebuffer: number;
-    const isProgram: number;
-    const isRenderbuffer: number;
-    const isShader: number;
-    const isTexture: number;
-    const lineWidth: number;
-    const linkProgram: number;
-    const pixelStorei: number;
-    const polygonOffset: number;
-    const readPixels: number;
-    const renderbufferStorage: number;
-    const sampleCoverage: number;
-    const scissor: number;
-    const shaderSource: number;
-    const stencilFunc: number;
-    const stencilFuncSeparate: number;
-    const stencilMask: number;
-    const stencilMaskSeparate: number;
-    const stencilOp: number;
-    const stencilOpSeparate: number;
-    const texImage2D: number;
-    const texParameterf: number;
-    const texParameteri: number;
-    const texSubImage2D: number;
-    const uniform1f: number;
-    const uniform1fv: number;
-    const uniform1i: number;
-    const uniform1iv: number;
-    const uniform2f: number;
-    const uniform2fv: number;
-    const uniform2i: number;
-    const uniform2iv: number;
-    const uniform3f: number;
-    const uniform3fv: number;
-    const uniform3i: number;
-    const uniform3iv: number;
-    const uniform4f: number;
-    const uniform4fv: number;
-    const uniform4i: number;
-    const uniform4iv: number;
-    const uniformMatrix2fv: number;
-    const uniformMatrix3fv: number;
-    const uniformMatrix4fv: number;
-    const useProgram: number;
-    const validateProgram: number;
-    const vertexAttrib1f: number;
-    const vertexAttrib2f: number;
-    const vertexAttrib3f: number;
-    const vertexAttrib4f: number;
-    const vertexAttrib1fv: number;
-    const vertexAttrib2fv: number;
-    const vertexAttrib3fv: number;
-    const vertexAttrib4fv: number;
-    const vertexAttribPointer: number;
-    const viewport: number;
-}

+ 0 - 140
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLmethod.js

@@ -1,140 +0,0 @@
-let i = 1;
-const GLmethod = {};
-GLmethod.activeTexture = i++; //1
-GLmethod.attachShader = i++;
-GLmethod.bindAttribLocation = i++;
-GLmethod.bindBuffer = i++;
-GLmethod.bindFramebuffer = i++;
-GLmethod.bindRenderbuffer = i++;
-GLmethod.bindTexture = i++;
-GLmethod.blendColor = i++;
-GLmethod.blendEquation = i++;
-GLmethod.blendEquationSeparate = i++; //10
-GLmethod.blendFunc = i++;
-GLmethod.blendFuncSeparate = i++;
-GLmethod.bufferData = i++;
-GLmethod.bufferSubData = i++;
-GLmethod.checkFramebufferStatus = i++;
-GLmethod.clear = i++;
-GLmethod.clearColor = i++;
-GLmethod.clearDepth = i++;
-GLmethod.clearStencil = i++;
-GLmethod.colorMask = i++; //20
-GLmethod.compileShader = i++;
-GLmethod.compressedTexImage2D = i++;
-GLmethod.compressedTexSubImage2D = i++;
-GLmethod.copyTexImage2D = i++;
-GLmethod.copyTexSubImage2D = i++;
-GLmethod.createBuffer = i++;
-GLmethod.createFramebuffer = i++;
-GLmethod.createProgram = i++;
-GLmethod.createRenderbuffer = i++;
-GLmethod.createShader = i++; //30
-GLmethod.createTexture = i++;
-GLmethod.cullFace = i++;
-GLmethod.deleteBuffer = i++;
-GLmethod.deleteFramebuffer = i++;
-GLmethod.deleteProgram = i++;
-GLmethod.deleteRenderbuffer = i++;
-GLmethod.deleteShader = i++;
-GLmethod.deleteTexture = i++;
-GLmethod.depthFunc = i++;
-GLmethod.depthMask = i++; //40
-GLmethod.depthRange = i++;
-GLmethod.detachShader = i++;
-GLmethod.disable = i++;
-GLmethod.disableVertexAttribArray = i++;
-GLmethod.drawArrays = i++;
-GLmethod.drawArraysInstancedANGLE = i++;
-GLmethod.drawElements = i++;
-GLmethod.drawElementsInstancedANGLE = i++;
-GLmethod.enable = i++;
-GLmethod.enableVertexAttribArray = i++; //50
-GLmethod.flush = i++;
-GLmethod.framebufferRenderbuffer = i++;
-GLmethod.framebufferTexture2D = i++;
-GLmethod.frontFace = i++;
-GLmethod.generateMipmap = i++;
-GLmethod.getActiveAttrib = i++;
-GLmethod.getActiveUniform = i++;
-GLmethod.getAttachedShaders = i++;
-GLmethod.getAttribLocation = i++;
-GLmethod.getBufferParameter = i++; //60
-GLmethod.getContextAttributes = i++;
-GLmethod.getError = i++;
-GLmethod.getExtension = i++;
-GLmethod.getFramebufferAttachmentParameter = i++;
-GLmethod.getParameter = i++;
-GLmethod.getProgramInfoLog = i++;
-GLmethod.getProgramParameter = i++;
-GLmethod.getRenderbufferParameter = i++;
-GLmethod.getShaderInfoLog = i++;
-GLmethod.getShaderParameter = i++; //70
-GLmethod.getShaderPrecisionFormat = i++;
-GLmethod.getShaderSource = i++;
-GLmethod.getSupportedExtensions = i++;
-GLmethod.getTexParameter = i++;
-GLmethod.getUniform = i++;
-GLmethod.getUniformLocation = i++;
-GLmethod.getVertexAttrib = i++;
-GLmethod.getVertexAttribOffset = i++;
-GLmethod.isBuffer = i++;
-GLmethod.isContextLost = i++; //80
-GLmethod.isEnabled = i++;
-GLmethod.isFramebuffer = i++;
-GLmethod.isProgram = i++;
-GLmethod.isRenderbuffer = i++;
-GLmethod.isShader = i++;
-GLmethod.isTexture = i++;
-GLmethod.lineWidth = i++;
-GLmethod.linkProgram = i++;
-GLmethod.pixelStorei = i++;
-GLmethod.polygonOffset = i++; //90
-GLmethod.readPixels = i++;
-GLmethod.renderbufferStorage = i++;
-GLmethod.sampleCoverage = i++;
-GLmethod.scissor = i++;
-GLmethod.shaderSource = i++;
-GLmethod.stencilFunc = i++;
-GLmethod.stencilFuncSeparate = i++;
-GLmethod.stencilMask = i++;
-GLmethod.stencilMaskSeparate = i++;
-GLmethod.stencilOp = i++; //100
-GLmethod.stencilOpSeparate = i++;
-GLmethod.texImage2D = i++;
-GLmethod.texParameterf = i++;
-GLmethod.texParameteri = i++;
-GLmethod.texSubImage2D = i++;
-GLmethod.uniform1f = i++;
-GLmethod.uniform1fv = i++;
-GLmethod.uniform1i = i++;
-GLmethod.uniform1iv = i++;
-GLmethod.uniform2f = i++; //110
-GLmethod.uniform2fv = i++;
-GLmethod.uniform2i = i++;
-GLmethod.uniform2iv = i++;
-GLmethod.uniform3f = i++;
-GLmethod.uniform3fv = i++;
-GLmethod.uniform3i = i++;
-GLmethod.uniform3iv = i++;
-GLmethod.uniform4f = i++;
-GLmethod.uniform4fv = i++;
-GLmethod.uniform4i = i++; //120
-GLmethod.uniform4iv = i++;
-GLmethod.uniformMatrix2fv = i++;
-GLmethod.uniformMatrix3fv = i++;
-GLmethod.uniformMatrix4fv = i++;
-GLmethod.useProgram = i++;
-GLmethod.validateProgram = i++;
-GLmethod.vertexAttrib1f = i++; //new
-GLmethod.vertexAttrib2f = i++; //new
-GLmethod.vertexAttrib3f = i++; //new
-GLmethod.vertexAttrib4f = i++; //new       //130
-GLmethod.vertexAttrib1fv = i++; //new
-GLmethod.vertexAttrib2fv = i++; //new
-GLmethod.vertexAttrib3fv = i++; //new
-GLmethod.vertexAttrib4fv = i++; //new
-GLmethod.vertexAttribPointer = i++;
-GLmethod.viewport = i++;
-export default GLmethod;
-//# sourceMappingURL=GLmethod.js.map

Plik diff jest za duży
+ 0 - 0
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLmethod.js.map


+ 0 - 2
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLtype.d.ts

@@ -1,2 +0,0 @@
-export default GLtype;
-declare const GLtype: {};

+ 0 - 19
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLtype.js

@@ -1,19 +0,0 @@
-const GLtype = {};
-[
-    "GLbitfield",
-    "GLboolean",
-    "GLbyte",
-    "GLclampf",
-    "GLenum",
-    "GLfloat",
-    "GLint",
-    "GLintptr",
-    "GLsizei",
-    "GLsizeiptr",
-    "GLshort",
-    "GLubyte",
-    "GLuint",
-    "GLushort"
-].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1));
-export default GLtype;
-//# sourceMappingURL=GLtype.js.map

+ 0 - 1
pagesB/comps/u-draw-poster/plugins/gcanvas/gcanvas/context-webgl/GLtype.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"GLtype.js","sourceRoot":"","sources":["../../../../../packages/plugins/gcanvas/gcanvas/context-webgl/GLtype.js"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,EAAE,CAAC;AAElB;IACI,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,UAAU;IACV,SAAS;IACT,YAAY;IACZ,SAAS;IACT,SAAS;IACT,QAAQ;IACR,UAAU;CACb,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAE/D,eAAe,MAAM,CAAC"}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików