Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

修改C++兼容 #162

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 10 additions & 48 deletions LBXScan/LBXNative/LBXScanNative.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@
//


#ifndef __cplusplus
@import UIKit;
@import Foundation;
@import AVFoundation;
#endif

#import "LBXScanTypes.h"
#define LBXScan_Define_Native




/**
@brief ios系统自带扫码功能
*/
@interface LBXScanNative : NSObject


#pragma mark --初始化
/**
@brief 初始化采集相机
Expand Down Expand Up @@ -99,49 +95,15 @@
- (void)setVideoScale:(CGFloat)scale;

#pragma mark --识别图片


/**
识别QR二维码图片,ios8.0以上支持

@param image 图片
@param block 返回识别结果
*/
//! 识别QR二维码图片,ios8.0以上支持
+ (void)recognizeImage:(UIImage*)image success:(void(^)(NSArray<LBXScanResult*> *array))block;

#pragma mark --生成条码


/**
生成QR二维码

@param text 字符串
@param size 二维码大小
@return 返回二维码图像
*/
+ (UIImage*)createQRWithString:(NSString*)text QRSize:(CGSize)size;


/**
生成QR二维码

@param text 字符串
@param size 大小
@param qrColor 二维码前景色
@param bkColor 二维码背景色
@return 二维码图像
*/
+ (UIImage*)createQRWithString:(NSString*)text QRSize:(CGSize)size QRColor:(UIColor*)qrColor bkColor:(UIColor*)bkColor;


/**
生成条形码

@param text 字符串
@param size 大小
@return 返回条码图像
*/
+ (UIImage*)createBarCodeWithString:(NSString*)text QRSize:(CGSize)size;

#pragma mark - 生成二维码/条形码
//! 生成二维码
+ (UIImage *)generateQRCode:(NSString *)code size:(CGSize)size;
//! 生成二维码+logo
+ (UIImage *)generateQRCode:(NSString *)code size:(CGSize)size logo:(nonnull UIImage *)logo;
//! 生成条形码
+ (UIImage *)generateCode128:(NSString *)code size:(CGSize)size;
@end

Loading