File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -158,17 +158,17 @@ pub extern "C" fn resvg_options_set_dpi(opt: *mut resvg_options, dpi: f32) {
158
158
cast_opt ( opt) . dpi = dpi as f32 ;
159
159
}
160
160
161
- /// @brief Sets a stylesheet path that will be used when resolving CSS attributes.
161
+ /// @brief Provides the content of a stylesheet that will be used when resolving CSS attributes.
162
162
///
163
163
/// Must be UTF-8. Can be set to NULL.
164
164
///
165
165
/// Default: NULL
166
166
#[ no_mangle]
167
- pub extern "C" fn resvg_options_set_stylesheet ( opt : * mut resvg_options , path : * const c_char ) {
168
- if path . is_null ( ) {
167
+ pub extern "C" fn resvg_options_set_stylesheet ( opt : * mut resvg_options , content : * const c_char ) {
168
+ if content . is_null ( ) {
169
169
cast_opt ( opt) . style_sheet = None ;
170
170
} else {
171
- cast_opt ( opt) . style_sheet = Some ( cstr_to_str ( path ) . unwrap ( ) . into ( ) ) ;
171
+ cast_opt ( opt) . style_sheet = Some ( cstr_to_str ( content ) . unwrap ( ) . into ( ) ) ;
172
172
}
173
173
}
174
174
Original file line number Diff line number Diff line change @@ -174,13 +174,13 @@ void resvg_options_set_resources_dir(resvg_options *opt, const char *path);
174
174
void resvg_options_set_dpi (resvg_options * opt , float dpi );
175
175
176
176
/**
177
- * @brief Sets a stylesheet path that will be used when resolving CSS attributes.
177
+ * @brief Provides the content of a stylesheet that will be used when resolving CSS attributes.
178
178
*
179
179
* Must be UTF-8. Can be set to NULL.
180
180
*
181
181
* Default: NULL
182
182
*/
183
- void resvg_options_set_stylesheet (resvg_options * opt , const char * path );
183
+ void resvg_options_set_stylesheet (resvg_options * opt , char * const content );
184
184
185
185
/**
186
186
* @brief Sets the default font family.
You can’t perform that action at this time.
0 commit comments