mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 23:05:00 +08:00
Generalized image decoding and resizing logic
Summary: public Standardises the image decoding logic for all image sources, meaning we get the benefits of efficient downscaling of images from all sources, not just ALAssets. Reviewed By: javache Differential Revision: D2647083 fb-gh-sync-id: e41456f838e4c6ab709b1c1523f651a86ff6e623
This commit is contained in:
committed by
facebook-github-bot-5
parent
9b87e6c860
commit
21fcbbc32c
22
Libraries/Image/RCTResizeMode.h
Normal file
22
Libraries/Image/RCTResizeMode.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "RCTConvert.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, RCTResizeMode) {
|
||||
RCTResizeModeCover = UIViewContentModeScaleAspectFill,
|
||||
RCTResizeModeContain = UIViewContentModeScaleAspectFit,
|
||||
RCTResizeModeStretch = UIViewContentModeScaleToFill,
|
||||
};
|
||||
|
||||
@interface RCTConvert(RCTResizeMode)
|
||||
|
||||
+ (RCTResizeMode)RCTResizeMode:(id)json;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user