commit
afde885ae1
|
@ -14,8 +14,8 @@
|
|||
*/
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
||||
import { ImageKnifeOption, ImageKnifeRequest } from '@ohos/imageknife/Index';
|
||||
import { DefaultJobQueue } from '@ohos/imageknife/src/main/ets/utils/DefaultJobQueue';
|
||||
import { IJobQueue } from '@ohos/imageknife/src/main/ets/utils/IJobQueue';
|
||||
import { DefaultJobQueue } from '@ohos/imageknife/src/main/ets/queue/DefaultJobQueue';
|
||||
import { IJobQueue } from '@ohos/imageknife/src/main/ets/queue/IJobQueue';
|
||||
import taskpool from '@ohos.taskpool';
|
||||
import common from '@ohos.app.ability.common';
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
|
|||
import Constants from '../../../main/ets/common/Constants';
|
||||
import taskpool from '@ohos.taskpool';
|
||||
import { GlobalContext } from '../../../main/ets/common/GlobalContext';
|
||||
import { FileCache } from '@ohos/imageknife/src/main/ets/utils/FileCache';
|
||||
import { FileCache } from '@ohos/imageknife/src/main/ets/cache/FileCache';
|
||||
import { IEngineKey, ImageKnifeOption } from '@ohos/imageknife';
|
||||
import { DefaultEngineKey } from '@ohos/imageknife/src/main/ets/key/DefaultEngineKey';
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ export default function ImageKnifeOptionTest() {
|
|||
imageWidth: 0,
|
||||
imageHeight: 0,
|
||||
}
|
||||
let ImageKnifeOption: ImageKnifeOption = {
|
||||
let imageKnifeOption: ImageKnifeOption = new ImageKnifeOption({
|
||||
loadSrc: $r("app.media.rabbit"),
|
||||
onLoadListener: {
|
||||
onLoadFailed: (err) => {
|
||||
|
@ -58,10 +58,10 @@ export default function ImageKnifeOptionTest() {
|
|||
return data;
|
||||
},
|
||||
},
|
||||
}
|
||||
if (ImageKnifeOption.onLoadListener && ImageKnifeOption.onLoadListener.onLoadSuccess && ImageKnifeOption.onLoadListener.onLoadFailed) {
|
||||
ImageKnifeOption.onLoadListener.onLoadSuccess(a,imageData);
|
||||
ImageKnifeOption.onLoadListener.onLoadFailed(a);
|
||||
})
|
||||
if (imageKnifeOption.onLoadListener && imageKnifeOption.onLoadListener.onLoadSuccess && imageKnifeOption.onLoadListener.onLoadFailed) {
|
||||
imageKnifeOption.onLoadListener.onLoadSuccess(a,imageData);
|
||||
imageKnifeOption.onLoadListener.onLoadFailed(a);
|
||||
}
|
||||
expect(a).assertEqual(b);
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ import image from '@ohos.multimedia.image';
|
|||
|
||||
|
||||
import Constants from '../../../main/ets/common/Constants';
|
||||
import { MemoryLruCache } from '@ohos/imageknife/src/main/ets/utils/MemoryLruCache';
|
||||
import { MemoryLruCache } from '@ohos/imageknife/src/main/ets/cache/MemoryLruCache';
|
||||
import { ImageKnifeData } from '@ohos/imageknife/src/main/ets/model/ImageKnifeData';
|
||||
import { IEngineKey, ImageKnifeOption,ImageKnifeRequestSource } from '@ohos/imageknife';
|
||||
import { DefaultEngineKey } from '@ohos/imageknife/src/main/ets/key/DefaultEngineKey';
|
||||
|
|
|
@ -18,9 +18,9 @@ export { ImageKnifeAnimatorComponent } from './src/main/ets/components/ImageKnif
|
|||
|
||||
export { ImageKnife } from './src/main/ets/ImageKnife'
|
||||
|
||||
export { ImageKnifeOption , AnimatorOption } from './src/main/ets/ImageKnifeOption'
|
||||
export { ImageKnifeOption , AnimatorOption } from './src/main/ets/model/ImageKnifeOption'
|
||||
|
||||
export { ImageKnifeRequest } from './src/main/ets/ImageKnifeRequest'
|
||||
export { ImageKnifeRequest } from './src/main/ets/model/ImageKnifeRequest'
|
||||
|
||||
export { FileUtils } from './src/main/ets/utils/FileUtils'
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeRequest } from './ImageKnifeRequest';
|
||||
import { ImageKnifeRequest } from './model/ImageKnifeRequest';
|
||||
import { CacheStrategy, ImageKnifeData, ImageKnifeRequestSource } from './model/ImageKnifeData';
|
||||
import { MemoryLruCache } from './utils/MemoryLruCache';
|
||||
import { IMemoryCache } from './utils/IMemoryCache'
|
||||
import { FileCache } from './utils/FileCache';
|
||||
import { MemoryLruCache } from './cache/MemoryLruCache';
|
||||
import { IMemoryCache } from './cache/IMemoryCache'
|
||||
import { FileCache } from './cache/FileCache';
|
||||
import { ImageKnifeDispatcher } from './ImageKnifeDispatcher';
|
||||
import { IEngineKey } from './key/IEngineKey';
|
||||
import { HeaderOptions, ImageKnifeOption } from './ImageKnifeOption';
|
||||
import { HeaderOptions, ImageKnifeOption } from './model/ImageKnifeOption';
|
||||
import { FileTypeUtil } from './utils/FileTypeUtil';
|
||||
import { util } from '@kit.ArkTS';
|
||||
import { image } from '@kit.ImageKit';
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeRequest, ImageKnifeRequestState } from './ImageKnifeRequest'
|
||||
import { DefaultJobQueue } from './utils/DefaultJobQueue'
|
||||
import { IJobQueue } from './utils/IJobQueue'
|
||||
import { ImageKnifeRequest, ImageKnifeRequestState } from './model/ImageKnifeRequest'
|
||||
import { DefaultJobQueue } from './queue/DefaultJobQueue'
|
||||
import { IJobQueue } from './queue/IJobQueue'
|
||||
import List from '@ohos.util.List';
|
||||
import LightWeightMap from '@ohos.util.LightWeightMap';
|
||||
import { LogUtil } from './utils/LogUtil';
|
||||
|
|
|
@ -17,11 +17,11 @@ import {
|
|||
ImageKnifeRequestSource,
|
||||
ImageKnifeRequestWithSource, RequestJobRequest } from './model/ImageKnifeData';
|
||||
import List from '@ohos.util.List'
|
||||
import { FileCache } from './utils/FileCache';
|
||||
import { FileCache } from './cache/FileCache';
|
||||
import { LogUtil } from './utils/LogUtil';
|
||||
import { Constants } from './utils/Constants';
|
||||
import http from '@ohos.net.http';
|
||||
import { combineArrayBuffers } from './model/utils';
|
||||
import { combineArrayBuffers } from './utils/ArrayBufferUtils';
|
||||
import { BusinessError } from '@kit.BasicServicesKit';
|
||||
import fs from '@ohos.file.fs';
|
||||
import emitter from '@ohos.events.emitter';
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import util from '@ohos.util';
|
||||
import { FileUtils } from './FileUtils';
|
||||
import { FileUtils } from '../utils/FileUtils';
|
||||
import fs from '@ohos.file.fs';
|
||||
import { LogUtil } from './LogUtil';
|
||||
import { LogUtil } from '../utils/LogUtil';
|
||||
import { SparkMD5 } from '../3rd_party/sparkmd5/spark-md5';
|
||||
|
||||
const INT_MAX = 2147483647
|
|
@ -12,8 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { AnimatorOption, ImageKnifeOption } from '../ImageKnifeOption';
|
||||
import { ImageKnifeRequest, ImageKnifeRequestState } from '../ImageKnifeRequest';
|
||||
import { AnimatorOption, ImageKnifeOption } from '../model/ImageKnifeOption';
|
||||
import { ImageKnifeRequest, ImageKnifeRequestState } from '../model/ImageKnifeRequest';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { ImageKnife } from '../ImageKnife';
|
||||
import { LogUtil } from '../utils/LogUtil';
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeOption } from '../ImageKnifeOption';
|
||||
import { ImageKnifeRequest, ImageKnifeRequestState } from '../ImageKnifeRequest';
|
||||
import { ImageKnifeOption } from '../model/ImageKnifeOption';
|
||||
import { ImageKnifeRequest, ImageKnifeRequestState } from '../model/ImageKnifeRequest';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { ImageKnife } from '../ImageKnife';
|
||||
import { LogUtil } from '../utils/LogUtil';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import { SparkMD5 } from '../3rd_party/sparkmd5/spark-md5';
|
||||
import { ImageKnifeOption } from '../ImageKnifeOption';
|
||||
import { ImageKnifeOption } from '../model/ImageKnifeOption';
|
||||
import { IEngineKey } from './IEngineKey';
|
||||
import { PixelMapTransformation } from '../transform/PixelMapTransformation';
|
||||
import { ImageKnifeRequestSource } from '../model/ImageKnifeData';
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeOption } from '../ImageKnifeOption'
|
||||
import { ImageKnifeOption } from '../model/ImageKnifeOption'
|
||||
import { ImageKnifeRequestSource } from '../model/ImageKnifeData'
|
||||
|
||||
export interface IEngineKey {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { HeaderOptions } from '../ImageKnifeOption'
|
||||
import { ImageKnifeRequest } from '../ImageKnifeRequest'
|
||||
import { HeaderOptions } from './ImageKnifeOption'
|
||||
import { ImageKnifeRequest } from './ImageKnifeRequest'
|
||||
import { IEngineKey } from '../key/IEngineKey'
|
||||
import { PixelMapTransformation } from '../transform/PixelMapTransformation'
|
||||
import common from '@ohos.app.ability.common';
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
*/
|
||||
import taskpool from '@ohos.taskpool';
|
||||
import common from '@ohos.app.ability.common'
|
||||
import { CacheStrategy, ImageKnifeData,EventImage } from './model/ImageKnifeData';
|
||||
import { PixelMapTransformation } from './transform/PixelMapTransformation';
|
||||
import { CacheStrategy, ImageKnifeData,EventImage } from './ImageKnifeData';
|
||||
import { PixelMapTransformation } from '../transform/PixelMapTransformation';
|
||||
import { drawing } from '@kit.ArkGraphics2D';
|
||||
|
||||
export interface HeaderOptions {
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
import { ImageKnifeOption } from './ImageKnifeOption';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { ImageKnifeRequestSource } from './model/ImageKnifeData';
|
||||
import { ImageKnifeRequestSource } from './ImageKnifeData';
|
||||
|
||||
|
||||
export class ImageKnifeRequest {
|
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeRequest } from '../ImageKnifeRequest';
|
||||
import { ImageKnifeRequest } from '../model/ImageKnifeRequest';
|
||||
import { IJobQueue } from './IJobQueue'
|
||||
import Queue from '@ohos.util.Queue';
|
||||
import { taskpool,Stack } from '@kit.ArkTS';
|
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeRequest } from '../ImageKnifeRequest'
|
||||
import { ImageKnifeRequest } from '../model/ImageKnifeRequest'
|
||||
|
||||
export interface IJobQueue {
|
||||
|
Loading…
Reference in New Issue