Commit 61ad7ab13c1bafc77d78687e1d053afb5b2aa790
1 parent
789fb21c
resolved issues
Showing
1 changed file
with
28 additions
and
3 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -4757,11 +4757,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4757 | 4757 | } |
4758 | 4758 | } |
4759 | 4759 | else { |
4760 | - imageData[i] = ((255) * (parseInt(transNumber))) / 100; | |
4760 | + | |
4761 | + imageData[i] = ((255) * (parseInt(transNumber))) / 100; | |
4761 | 4762 | } |
4762 | - } | |
4763 | - | |
4764 | 4763 | |
4764 | + | |
4765 | + } | |
4766 | + | |
4765 | 4767 | tempCtx.putImageData(imageD, 0, 0); |
4766 | 4768 | |
4767 | 4769 | |
... | ... | @@ -4788,6 +4790,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4788 | 4790 | // var ctx = transparencyCanvas.getContext('2d'); |
4789 | 4791 | ctx.drawImage(tmpCanvasContext, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage) |
4790 | 4792 | |
4793 | + | |
4794 | + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { | |
4795 | + | |
4796 | + var imageD1 = ctx.getImageData(0, 0, Width, Height); | |
4797 | + var imageData1 = imageD1.data; | |
4798 | + var length1 = imageData1.length; | |
4799 | + | |
4800 | + | |
4801 | + // set every fourth value to the desired number of transparency | |
4802 | + for (var i = 0; i < imageData1.length; i += 4) { | |
4803 | + if (imageData1[i] == imageData1[i + 1] && imageData1[i + 1] == imageData1[i + 2] && imageData1[i + 2] === 0) { | |
4804 | + imageData1[i + 3] = 0; | |
4805 | + } | |
4806 | + | |
4807 | + } | |
4808 | + | |
4809 | + | |
4810 | + ctx.putImageData(imageD1, 0, 0); | |
4811 | + | |
4812 | + } | |
4813 | + | |
4814 | + | |
4815 | + | |
4791 | 4816 | // $scope.transparencyDrawnRegions.push(bodyRegionId); |
4792 | 4817 | $scope.transparencyDrawnRegions.push({ 'BRID': bodyRegionId }); |
4793 | 4818 | ... | ... |