File tree Expand file tree Collapse file tree 6 files changed +398
-207
lines changed
android/src/main/java/com/jimmydaddy/imagemarker Expand file tree Collapse file tree 6 files changed +398
-207
lines changed Original file line number Diff line number Diff line change 1717import com .facebook .common .references .CloseableReference ;
1818import com .facebook .datasource .DataSource ;
1919import com .facebook .drawee .backends .pipeline .Fresco ;
20+ import com .facebook .imagepipeline .core .ImagePipelineConfig ;
2021import com .facebook .imagepipeline .datasource .BaseBitmapDataSubscriber ;
2122import com .facebook .imagepipeline .image .CloseableImage ;
2223import com .facebook .imagepipeline .request .ImageRequest ;
24+ import com .facebook .imagepipeline .request .ImageRequestBuilder ;
2325import com .facebook .react .bridge .Promise ;
2426import com .facebook .react .bridge .ReactApplicationContext ;
2527import com .facebook .react .bridge .ReactContextBaseJavaModule ;
3032import java .io .BufferedOutputStream ;
3133import java .io .FileOutputStream ;
3234import java .io .IOException ;
35+ import java .net .URI ;
3336import java .util .UUID ;
3437import java .util .concurrent .Executor ;
3538import java .util .concurrent .Executors ;
Original file line number Diff line number Diff line change 1+ import { ImageSourcePropType } from 'react-native' ;
2+ export declare enum Position {
3+ topLeft = "topLeft" ,
4+ topCenter = "topCenter" ,
5+ topRight = "topRight" ,
6+ bottomLeft = "bottomLeft" ,
7+ bottomCenter = "bottomCenter" ,
8+ bottomRight = "bottomRight" ,
9+ center = "center"
10+ }
11+ export declare enum TextBackgroundType {
12+ stretchX = "stretchX" ,
13+ stretchY = "stretchY"
14+ }
15+ export declare enum ImageFormat {
16+ png = "png" ,
17+ jpg = "jpg"
18+ }
19+ export declare type ShadowLayerStyle = {
20+ 'dx' : number ;
21+ 'dy' : number ;
22+ 'radius' : number ;
23+ 'color' : string ;
24+ } ;
25+ export declare type TextBackgroundStyle = {
26+ 'paddingX' : number ;
27+ 'paddingY' : number ;
28+ 'type' : TextBackgroundType ;
29+ 'color' : string ;
30+ } ;
31+ export declare type TextMarkOption = {
32+ src : ImageSourcePropType ;
33+ text : string ;
34+ X ?: number ;
35+ Y ?: number ;
36+ color : string ;
37+ fontName : string ;
38+ fontSize : number ;
39+ scale : number ;
40+ quality : number ;
41+ position ?: Position ;
42+ filename ?: string ;
43+ shadowStyle : ShadowLayerStyle ;
44+ textBackgroundStyle : TextBackgroundStyle ;
45+ saveFormat ?: ImageFormat ;
46+ } ;
47+ export declare type ImageMarkOption = {
48+ src : ImageSourcePropType ;
49+ markerSrc : ImageSourcePropType ;
50+ X ?: number ;
51+ Y ?: number ;
52+ markerScale : number ;
53+ scale : number ;
54+ quality : number ;
55+ position ?: Position ;
56+ filename ?: string ;
57+ saveFormat ?: ImageFormat ;
58+ } ;
59+ export default class Marker {
60+ static markText ( option : TextMarkOption ) : Promise < string > ;
61+ static markImage ( option : ImageMarkOption ) : Promise < string > ;
62+ }
You can’t perform that action at this time.
0 commit comments