1 module skia.SkiaApi; 2 3 import skia.SKColorF; 4 import skia.Definitions; 5 import skia.EnumMappings; 6 import skia.GRDefinitions; 7 import skia.MathTypes; 8 import skia.SKMatrix44; 9 import skia.Exceptions; 10 import skia.SKMatrix; 11 import skia.SKMask; 12 13 import std.datetime; 14 import std.string; 15 import std.typecons; 16 17 18 alias int8_t = byte; /// 19 alias int16_t = short; /// 20 alias uint8_t = ubyte; /// 21 alias uint16_t = ushort; /// 22 alias int32_t = int; /// 23 alias uint32_t = uint; /// 24 alias int64_t = long; /// 25 alias uint64_t = ulong; /// 26 27 alias sk_color_t = uint; 28 alias sk_pmcolor_t = uint; 29 alias sk_font_table_tag_t = uint; 30 31 32 33 struct gr_backendrendertarget_t; 34 struct gr_backendtexture_t; 35 struct gr_context_t; 36 struct gr_glinterface_t; 37 struct gr_vk_extensions_t; 38 struct gr_vk_memory_allocator_t; 39 struct gr_vkinterface_t; 40 struct sk_3dview_t; 41 struct sk_bitmap_t; 42 struct sk_canvas_t; 43 struct sk_codec_t; 44 struct sk_colorfilter_t; 45 struct sk_colorspace_icc_profile_t; 46 struct sk_colorspace_t; 47 struct sk_colortable_t; 48 struct sk_compatpaint_t; 49 struct sk_data_t; 50 struct sk_document_t; 51 struct sk_drawable_t; 52 struct sk_font_t; 53 struct sk_fontmgr_t; 54 struct sk_fontstyle_t; 55 struct sk_fontstyleset_t; 56 struct sk_image_t; 57 struct sk_imagefilter_croprect_t; 58 struct sk_imagefilter_t; 59 struct sk_manageddrawable_t; 60 struct sk_managedtracememorydump_t; 61 struct sk_maskfilter_t; 62 struct sk_matrix44_t; 63 struct sk_nodraw_canvas_t; 64 struct sk_nvrefcnt_t; 65 struct sk_nway_canvas_t; 66 struct sk_opbuilder_t; 67 struct sk_overdraw_canvas_t; 68 struct sk_paint_t; 69 struct sk_path_effect_t; 70 struct sk_path_iterator_t; 71 struct sk_path_rawiterator_t; 72 struct sk_path_t; 73 struct sk_pathmeasure_t; 74 struct sk_picture_recorder_t; 75 struct sk_picture_t; 76 struct sk_pixelref_factory_t; 77 struct sk_pixmap_t; 78 struct sk_refcnt_t; 79 struct sk_region_cliperator_t; 80 struct sk_region_iterator_t; 81 struct sk_region_spanerator_t; 82 struct sk_region_t; 83 struct sk_rrect_t; 84 struct sk_shader_t; 85 struct sk_stream_asset_t; 86 struct sk_stream_filestream_t; 87 struct sk_stream_managedstream_t; 88 struct sk_stream_memorystream_t; 89 struct sk_stream_streamrewindable_t; 90 struct sk_stream_t; 91 struct sk_string_t; 92 struct sk_surface_t; 93 struct sk_surfaceprops_t; 94 struct sk_svgcanvas_t; 95 struct sk_textblob_builder_t; 96 struct sk_textblob_t; 97 struct sk_tracememorydump_t; 98 struct sk_typeface_t; 99 struct sk_vertices_t; 100 struct sk_wstream_dynamicmemorystream_t; 101 struct sk_wstream_filestream_t; 102 struct sk_wstream_managedstream_t; 103 struct sk_wstream_t; 104 struct sk_xmlstreamwriter_t; 105 struct sk_xmlwriter_t; 106 struct vk_device_t; 107 struct vk_instance_t; 108 struct vk_physical_device_features_2_t; 109 struct vk_physical_device_features_t; 110 struct vk_physical_device_t; 111 struct vk_queue_t; 112 113 114 115 116 extern (C) @nogc nothrow { 117 118 // gr_context.h 119 void gr_backendrendertarget_delete(gr_backendrendertarget_t* rendertarget); 120 gr_backend_t gr_backendrendertarget_get_backend(const(gr_backendrendertarget_t)* rendertarget); 121 bool gr_backendrendertarget_get_gl_framebufferinfo(const(gr_backendrendertarget_t)* rendertarget, gr_gl_framebufferinfo_t* glInfo); 122 int gr_backendrendertarget_get_height(const(gr_backendrendertarget_t)* rendertarget); 123 int gr_backendrendertarget_get_samples(const(gr_backendrendertarget_t)* rendertarget); 124 int gr_backendrendertarget_get_stencils(const(gr_backendrendertarget_t)* rendertarget); 125 int gr_backendrendertarget_get_width(const(gr_backendrendertarget_t)* rendertarget); 126 bool gr_backendrendertarget_is_valid(const(gr_backendrendertarget_t)* rendertarget); 127 gr_backendrendertarget_t* gr_backendrendertarget_new_gl(int width, int height, int samples, int stencils, const(gr_gl_framebufferinfo_t)* glInfo); 128 gr_backendrendertarget_t* gr_backendrendertarget_new_vulkan(int width, int height, int samples, const(gr_vk_imageinfo_t)* vkImageInfo); 129 void gr_backendtexture_delete(gr_backendtexture_t* texture); 130 gr_backend_t gr_backendtexture_get_backend(const(gr_backendtexture_t)* texture); 131 bool gr_backendtexture_get_gl_textureinfo(const(gr_backendtexture_t)* texture, gr_gl_textureinfo_t* glInfo); 132 int gr_backendtexture_get_height(const(gr_backendtexture_t)* texture); 133 int gr_backendtexture_get_width(const(gr_backendtexture_t)* texture); 134 bool gr_backendtexture_has_mipmaps(const(gr_backendtexture_t)* texture); 135 bool gr_backendtexture_is_valid(const(gr_backendtexture_t)* texture); 136 gr_backendtexture_t* gr_backendtexture_new_gl(int width, int height, bool mipmapped, const(gr_gl_textureinfo_t)* glInfo); 137 gr_backendtexture_t* gr_backendtexture_new_vulkan(int width, int height, const(gr_vk_imageinfo_t)* vkInfo); 138 void gr_context_abandon_context(gr_context_t* context); 139 void gr_context_dump_memory_statistics(const(gr_context_t)* context, sk_tracememorydump_t* dump); 140 void gr_context_flush(gr_context_t* context); 141 void gr_context_free_gpu_resources(gr_context_t* context); 142 gr_backend_t gr_context_get_backend(gr_context_t* context); 143 int gr_context_get_max_surface_sample_count_for_color_type(gr_context_t* context, sk_colortype_t colorType); 144 size_t gr_context_get_resource_cache_limit(gr_context_t* context); 145 void gr_context_get_resource_cache_usage(gr_context_t* context, int* maxResources, size_t* maxResourceBytes); 146 gr_context_t* gr_context_make_gl(const(gr_glinterface_t)* glInterface); 147 gr_context_t* gr_context_make_vulkan(const gr_vk_backendcontext_t vkBackendContext); 148 void gr_context_perform_deferred_cleanup(gr_context_t* context, long ms); 149 void gr_context_purge_unlocked_resources(gr_context_t* context, bool scratchResourcesOnly); 150 void gr_context_purge_unlocked_resources_bytes(gr_context_t* context, size_t bytesToPurge, bool preferScratchResources); 151 void gr_context_release_resources_and_abandon_context(gr_context_t* context); 152 void gr_context_reset_context(gr_context_t* context, uint32_t state); 153 void gr_context_set_resource_cache_limit(gr_context_t* context, size_t maxResourceBytes); 154 void gr_context_unref(gr_context_t* context); 155 gr_glinterface_t* gr_glinterface_assemble_gl_interface(void* ctx, gr_gl_get_proc get); 156 gr_glinterface_t* gr_glinterface_assemble_gles_interface(void* ctx, gr_gl_get_proc get); 157 gr_glinterface_t* gr_glinterface_assemble_interface(void* ctx, gr_gl_get_proc get); 158 gr_glinterface_t* gr_glinterface_assemble_webgl_interface(void* ctx, gr_gl_get_proc get); 159 gr_glinterface_t* gr_glinterface_create_native_interface(); 160 bool gr_glinterface_has_extension(const(gr_glinterface_t)* glInterface, const(char)* extension); 161 void gr_glinterface_unref(const(gr_glinterface_t)* glInterface); 162 bool gr_glinterface_validate(const(gr_glinterface_t)* glInterface); 163 void gr_vk_extensions_delete(gr_vk_extensions_t* extensions); 164 bool gr_vk_extensions_has_extension(gr_vk_extensions_t* extensions, const(char)* ext, uint32_t minVersion); 165 void gr_vk_extensions_init(gr_vk_extensions_t* extensions, gr_vk_get_proc getProc, void* userData, vk_instance_t* instance, vk_physical_device_t* physDev, uint32_t instanceExtensionCount, const(char)** instanceExtensions, uint32_t deviceExtensionCount, const(char)** deviceExtensions); 166 gr_vk_extensions_t* gr_vk_extensions_new(); 167 168 // sk_bitmap.h 169 void sk_bitmap_destructor(sk_bitmap_t* cbitmap); 170 void sk_bitmap_erase(sk_bitmap_t* cbitmap, sk_color_t color); 171 void sk_bitmap_erase_rect(sk_bitmap_t* cbitmap, sk_color_t color, sk_irect_t* rect); 172 bool sk_bitmap_extract_alpha(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, const(sk_paint_t)* paint, sk_ipoint_t* offset); 173 bool sk_bitmap_extract_subset(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, sk_irect_t* subset); 174 void* sk_bitmap_get_addr(sk_bitmap_t* cbitmap, int x, int y); 175 uint16_t* sk_bitmap_get_addr_16(sk_bitmap_t* cbitmap, int x, int y); 176 uint32_t* sk_bitmap_get_addr_32(sk_bitmap_t* cbitmap, int x, int y); 177 uint8_t* sk_bitmap_get_addr_8(sk_bitmap_t* cbitmap, int x, int y); 178 size_t sk_bitmap_get_byte_count(sk_bitmap_t* cbitmap); 179 void sk_bitmap_get_info(sk_bitmap_t* cbitmap, sk_imageinfo_t* info); 180 sk_color_t sk_bitmap_get_pixel_color(sk_bitmap_t* cbitmap, int x, int y); 181 void sk_bitmap_get_pixel_colors(sk_bitmap_t* cbitmap, sk_color_t* colors); 182 void* sk_bitmap_get_pixels(sk_bitmap_t* cbitmap, size_t* length); 183 size_t sk_bitmap_get_row_bytes(sk_bitmap_t* cbitmap); 184 bool sk_bitmap_install_mask_pixels(sk_bitmap_t* cbitmap, const(sk_mask_t)* cmask); 185 bool sk_bitmap_install_pixels(sk_bitmap_t* cbitmap, const(sk_imageinfo_t)* cinfo, void* pixels, size_t rowBytes, sk_bitmap_release_proc releaseProc, void* context); 186 bool sk_bitmap_install_pixels_with_pixmap(sk_bitmap_t* cbitmap, const(sk_pixmap_t)* cpixmap); 187 bool sk_bitmap_is_immutable(sk_bitmap_t* cbitmap); 188 bool sk_bitmap_is_null(sk_bitmap_t* cbitmap); 189 bool sk_bitmap_is_volatile(sk_bitmap_t* cbitmap); 190 sk_shader_t* sk_bitmap_make_shader(sk_bitmap_t* cbitmap, sk_shader_tilemode_t tmx, sk_shader_tilemode_t tmy, const(sk_matrix_t)* cmatrix); 191 sk_bitmap_t* sk_bitmap_new(); 192 void sk_bitmap_notify_pixels_changed(sk_bitmap_t* cbitmap); 193 bool sk_bitmap_peek_pixels(sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap); 194 bool sk_bitmap_ready_to_draw(sk_bitmap_t* cbitmap); 195 void sk_bitmap_reset(sk_bitmap_t* cbitmap); 196 void sk_bitmap_set_immutable(sk_bitmap_t* cbitmap); 197 void sk_bitmap_set_pixels(sk_bitmap_t* cbitmap, void* pixels); 198 void sk_bitmap_set_volatile(sk_bitmap_t* cbitmap, bool value); 199 void sk_bitmap_swap(sk_bitmap_t* cbitmap, sk_bitmap_t* cother); 200 bool sk_bitmap_try_alloc_pixels(sk_bitmap_t* cbitmap, const(sk_imageinfo_t)* requestedInfo, size_t rowBytes); 201 bool sk_bitmap_try_alloc_pixels_with_flags(sk_bitmap_t* cbitmap, const(sk_imageinfo_t)* requestedInfo, uint32_t flags); 202 203 // sk_canvas.h 204 void sk_canvas_clear(sk_canvas_t*, sk_color_t); 205 void sk_canvas_clip_path_with_operation(sk_canvas_t* t, const(sk_path_t)* crect, sk_clipop_t op, bool doAA); 206 void sk_canvas_clip_rect_with_operation(sk_canvas_t* t, const(sk_rect_t)* crect, sk_clipop_t op, bool doAA); 207 void sk_canvas_clip_region(sk_canvas_t* canvas, const(sk_region_t)* region, sk_clipop_t op); 208 void sk_canvas_clip_rrect_with_operation(sk_canvas_t* t, const(sk_rrect_t)* crect, sk_clipop_t op, bool doAA); 209 void sk_canvas_concat(sk_canvas_t*, const(sk_matrix_t)*); 210 void sk_canvas_destroy(sk_canvas_t*); 211 void sk_canvas_discard(sk_canvas_t*); 212 void sk_canvas_draw_annotation(sk_canvas_t* t, const(sk_rect_t)* rect, const(char)* key, sk_data_t* value); 213 void sk_canvas_draw_arc(sk_canvas_t* ccanvas, const(sk_rect_t)* oval, float startAngle, float sweepAngle, bool useCenter, const(sk_paint_t)* paint); 214 void sk_canvas_draw_atlas(sk_canvas_t* ccanvas, const(sk_image_t)* atlas, const(sk_rsxform_t)* xform, const(sk_rect_t)* tex, const(sk_color_t)* colors, int count, sk_blendmode_t mode, const(sk_rect_t)* cullRect, const(sk_paint_t)* paint); 215 void sk_canvas_draw_bitmap(sk_canvas_t* ccanvas, const(sk_bitmap_t)* bitmap, float left, float top, const(sk_paint_t)* paint); 216 void sk_canvas_draw_bitmap_lattice(sk_canvas_t* t, const sk_bitmap_t* bitmap, const sk_lattice_t* lattice, const sk_rect_t* dst, const sk_paint_t* paint); 217 void sk_canvas_draw_bitmap_nine(sk_canvas_t* t, const sk_bitmap_t* bitmap, const sk_irect_t* center, const sk_rect_t* dst, const sk_paint_t* paint); 218 void sk_canvas_draw_bitmap_rect(sk_canvas_t* ccanvas, const(sk_bitmap_t)* bitmap, const(sk_rect_t)* src, const(sk_rect_t)* dst, const(sk_paint_t)* paint); 219 void sk_canvas_draw_circle(sk_canvas_t*, float cx, float cy, float rad, const(sk_paint_t)*); 220 void sk_canvas_draw_color(sk_canvas_t* ccanvas, sk_color_t color, sk_blendmode_t mode); 221 void sk_canvas_draw_drawable(sk_canvas_t*, sk_drawable_t*, const(sk_matrix_t)*); 222 void sk_canvas_draw_drrect(sk_canvas_t* ccanvas, const(sk_rrect_t)* outer, const(sk_rrect_t)* inner, const(sk_paint_t)* paint); 223 void sk_canvas_draw_image(sk_canvas_t*, const(sk_image_t)*, float x, float y, const(sk_paint_t)*); 224 void sk_canvas_draw_image_lattice(sk_canvas_t* t, const(sk_image_t)* image, const(sk_lattice_t)* lattice, const(sk_rect_t)* dst, const(sk_paint_t)* paint); 225 void sk_canvas_draw_image_nine(sk_canvas_t* t, const(sk_image_t)* image, const(sk_irect_t)* center, const(sk_rect_t)* dst, const(sk_paint_t)* paint); 226 void sk_canvas_draw_image_rect(sk_canvas_t*, const(sk_image_t)*, const(sk_rect_t)* src, const(sk_rect_t)* dst, const(sk_paint_t)*); 227 void sk_canvas_draw_line(sk_canvas_t* ccanvas, float x0, float y0, float x1, float y1, sk_paint_t* cpaint); 228 void sk_canvas_draw_link_destination_annotation(sk_canvas_t* t, const(sk_rect_t)* rect, sk_data_t* value); 229 void sk_canvas_draw_named_destination_annotation(sk_canvas_t* t, const(sk_point_t)* point, sk_data_t* value); 230 void sk_canvas_draw_oval(sk_canvas_t*, const(sk_rect_t)*, const(sk_paint_t)*); 231 void sk_canvas_draw_paint(sk_canvas_t*, const(sk_paint_t)*); 232 void sk_canvas_draw_patch(sk_canvas_t* ccanvas, const(sk_point_t)* cubics, const(sk_color_t)* colors, const(sk_point_t)* texCoords, sk_blendmode_t mode, const(sk_paint_t)* paint); 233 void sk_canvas_draw_path(sk_canvas_t*, const(sk_path_t)*, const(sk_paint_t)*); 234 void sk_canvas_draw_picture(sk_canvas_t*, const(sk_picture_t)*, const(sk_matrix_t)*, const(sk_paint_t)*); 235 void sk_canvas_draw_point(sk_canvas_t*, float, float, const(sk_paint_t)*); 236 void sk_canvas_draw_points(sk_canvas_t*, sk_point_mode_t, size_t, const(sk_point_t)*, const(sk_paint_t)*); 237 void sk_canvas_draw_rect(sk_canvas_t*, const(sk_rect_t)*, const(sk_paint_t)*); 238 void sk_canvas_draw_region(sk_canvas_t*, const(sk_region_t)*, const(sk_paint_t)*); 239 void sk_canvas_draw_round_rect(sk_canvas_t*, const(sk_rect_t)*, float rx, float ry, const(sk_paint_t)*); 240 void sk_canvas_draw_rrect(sk_canvas_t*, const(sk_rrect_t)*, const(sk_paint_t)*); 241 void sk_canvas_draw_simple_text(sk_canvas_t* ccanvas, const(void)* text, size_t byte_length, sk_text_encoding_t encoding, float x, float y, const(sk_font_t)* cfont, const(sk_paint_t)* cpaint); 242 void sk_canvas_draw_text_blob(sk_canvas_t*, sk_textblob_t* text, float x, float y, const(sk_paint_t)* paint); 243 void sk_canvas_draw_url_annotation(sk_canvas_t* t, const(sk_rect_t)* rect, sk_data_t* value); 244 void sk_canvas_draw_vertices(sk_canvas_t* ccanvas, const(sk_vertices_t)* vertices, sk_blendmode_t mode, const(sk_paint_t)* paint); 245 void sk_canvas_flush(sk_canvas_t* ccanvas); 246 bool sk_canvas_get_device_clip_bounds(sk_canvas_t* t, sk_irect_t* cbounds); 247 bool sk_canvas_get_local_clip_bounds(sk_canvas_t* t, sk_rect_t* cbounds); 248 int sk_canvas_get_save_count(sk_canvas_t*); 249 void sk_canvas_get_total_matrix(sk_canvas_t* ccanvas, sk_matrix_t* matrix); 250 bool sk_canvas_is_clip_empty(sk_canvas_t* ccanvas); 251 bool sk_canvas_is_clip_rect(sk_canvas_t* ccanvas); 252 sk_canvas_t* sk_canvas_new_from_bitmap(const(sk_bitmap_t)* bitmap); 253 bool sk_canvas_quick_reject(sk_canvas_t*, const(sk_rect_t)*); 254 void sk_canvas_reset_matrix(sk_canvas_t* ccanvas); 255 void sk_canvas_restore(sk_canvas_t*); 256 void sk_canvas_restore_to_count(sk_canvas_t*, int saveCount); 257 void sk_canvas_rotate_degrees(sk_canvas_t*, float degrees); 258 void sk_canvas_rotate_radians(sk_canvas_t*, float radians); 259 int sk_canvas_save(sk_canvas_t*); 260 int sk_canvas_save_layer(sk_canvas_t*, const(sk_rect_t)*, const(sk_paint_t)*); 261 void sk_canvas_scale(sk_canvas_t*, float sx, float sy); 262 void sk_canvas_set_matrix(sk_canvas_t* ccanvas, const(sk_matrix_t)* matrix); 263 void sk_canvas_skew(sk_canvas_t*, float sx, float sy); 264 void sk_canvas_translate(sk_canvas_t*, float dx, float dy); 265 void sk_nodraw_canvas_destroy(sk_nodraw_canvas_t*); 266 sk_nodraw_canvas_t* sk_nodraw_canvas_new(int width, int height); 267 void sk_nway_canvas_add_canvas(sk_nway_canvas_t*, sk_canvas_t* canvas); 268 void sk_nway_canvas_destroy(sk_nway_canvas_t*); 269 sk_nway_canvas_t* sk_nway_canvas_new(int width, int height); 270 void sk_nway_canvas_remove_all(sk_nway_canvas_t*); 271 void sk_nway_canvas_remove_canvas(sk_nway_canvas_t*, sk_canvas_t* canvas); 272 void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas); 273 sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas); 274 275 // sk_codec.h 276 void sk_codec_destroy(sk_codec_t* codec); 277 sk_encoded_image_format_t sk_codec_get_encoded_format(sk_codec_t* codec); 278 int sk_codec_get_frame_count(sk_codec_t* codec); 279 void sk_codec_get_frame_info(sk_codec_t* codec, sk_codec_frameinfo_t* frameInfo); 280 bool sk_codec_get_frame_info_for_index(sk_codec_t* codec, int index, sk_codec_frameinfo_t* frameInfo); 281 void sk_codec_get_info(sk_codec_t* codec, sk_imageinfo_t* info); 282 sk_encodedorigin_t sk_codec_get_origin(sk_codec_t* codec); 283 sk_codec_result_t sk_codec_get_pixels(sk_codec_t* codec, const(sk_imageinfo_t)* info, void* pixels, size_t rowBytes, const(sk_codec_options_t)* options); 284 int sk_codec_get_repetition_count(sk_codec_t* codec); 285 void sk_codec_get_scaled_dimensions(sk_codec_t* codec, float desiredScale, sk_isize_t* dimensions); 286 sk_codec_scanline_order_t sk_codec_get_scanline_order(sk_codec_t* codec); 287 int sk_codec_get_scanlines(sk_codec_t* codec, void* dst, int countLines, size_t rowBytes); 288 bool sk_codec_get_valid_subset(sk_codec_t* codec, sk_irect_t* desiredSubset); 289 sk_codec_result_t sk_codec_incremental_decode(sk_codec_t* codec, int* rowsDecoded); 290 size_t sk_codec_min_buffered_bytes_needed(); 291 sk_codec_t* sk_codec_new_from_data(sk_data_t* data); 292 sk_codec_t* sk_codec_new_from_stream(sk_stream_t* stream, sk_codec_result_t* result); 293 int sk_codec_next_scanline(sk_codec_t* codec); 294 int sk_codec_output_scanline(sk_codec_t* codec, int inputScanline); 295 bool sk_codec_skip_scanlines(sk_codec_t* codec, int countLines); 296 sk_codec_result_t sk_codec_start_incremental_decode(sk_codec_t* codec, const(sk_imageinfo_t)* info, void* pixels, size_t rowBytes, const(sk_codec_options_t)* options); 297 sk_codec_result_t sk_codec_start_scanline_decode(sk_codec_t* codec, const(sk_imageinfo_t)* info, const(sk_codec_options_t)* options); 298 299 // sk_colorfilter.h 300 sk_colorfilter_t* sk_colorfilter_new_color_matrix(const(float)* array); 301 sk_colorfilter_t* sk_colorfilter_new_compose(sk_colorfilter_t* outer, sk_colorfilter_t* inner); 302 sk_colorfilter_t* sk_colorfilter_new_high_contrast(const(sk_highcontrastconfig_t)* config); 303 sk_colorfilter_t* sk_colorfilter_new_lighting(sk_color_t mul, sk_color_t add); 304 sk_colorfilter_t* sk_colorfilter_new_luma_color(); 305 sk_colorfilter_t* sk_colorfilter_new_mode(sk_color_t c, sk_blendmode_t mode); 306 sk_colorfilter_t* sk_colorfilter_new_table(ubyte* table); 307 sk_colorfilter_t* sk_colorfilter_new_table_argb(ubyte* tableA, ubyte* tableR, ubyte* tableG, ubyte* tableB); 308 void sk_colorfilter_unref(sk_colorfilter_t* filter); 309 310 // sk_colorspace.h 311 void sk_color4f_from_color(sk_color_t color, sk_color4f_t* color4f); 312 sk_color_t sk_color4f_to_color(const(sk_color4f_t)* color4f); 313 bool sk_colorspace_equals(const(sk_colorspace_t)* src, const(sk_colorspace_t)* dst); 314 bool sk_colorspace_gamma_close_to_srgb(const(sk_colorspace_t)* colorspace); 315 bool sk_colorspace_gamma_is_linear(const(sk_colorspace_t)* colorspace); 316 void sk_colorspace_icc_profile_delete(sk_colorspace_icc_profile_t* profile); 317 uint8_t* sk_colorspace_icc_profile_get_buffer(sk_colorspace_icc_profile_t* profile, uint32_t* size); 318 bool sk_colorspace_icc_profile_get_to_xyzd50(const(sk_colorspace_icc_profile_t)* profile, sk_colorspace_xyz_t* toXYZD50); 319 sk_colorspace_icc_profile_t* sk_colorspace_icc_profile_new(); 320 bool sk_colorspace_icc_profile_parse(const(void)* buffer, size_t length, sk_colorspace_icc_profile_t* profile); 321 bool sk_colorspace_is_numerical_transfer_fn(const(sk_colorspace_t)* colorspace, sk_colorspace_transfer_fn_t* transferFn); 322 bool sk_colorspace_is_srgb(const(sk_colorspace_t)* colorspace); 323 sk_colorspace_t* sk_colorspace_make_linear_gamma(const(sk_colorspace_t)* colorspace); 324 sk_colorspace_t* sk_colorspace_make_srgb_gamma(const(sk_colorspace_t)* colorspace); 325 sk_colorspace_t* sk_colorspace_new_icc(const(sk_colorspace_icc_profile_t)* profile); 326 sk_colorspace_t* sk_colorspace_new_rgb(const(sk_colorspace_transfer_fn_t)* transferFn, const(sk_colorspace_xyz_t)* toXYZD50); 327 sk_colorspace_t* sk_colorspace_new_srgb(); 328 sk_colorspace_t* sk_colorspace_new_srgb_linear(); 329 bool sk_colorspace_primaries_to_xyzd50(const(sk_colorspace_primaries_t)* primaries, sk_colorspace_xyz_t* toXYZD50); 330 void sk_colorspace_ref(sk_colorspace_t* colorspace); 331 void sk_colorspace_to_profile(const(sk_colorspace_t)* colorspace, sk_colorspace_icc_profile_t* profile); 332 bool sk_colorspace_to_xyzd50(const(sk_colorspace_t)* colorspace, sk_colorspace_xyz_t* toXYZD50); 333 float sk_colorspace_transfer_fn_eval(const(sk_colorspace_transfer_fn_t)* transferFn, float x); 334 bool sk_colorspace_transfer_fn_invert(const(sk_colorspace_transfer_fn_t)* src, sk_colorspace_transfer_fn_t* dst); 335 void sk_colorspace_transfer_fn_named_2dot2(sk_colorspace_transfer_fn_t* transferFn); 336 void sk_colorspace_transfer_fn_named_hlg(sk_colorspace_transfer_fn_t* transferFn); 337 void sk_colorspace_transfer_fn_named_linear(sk_colorspace_transfer_fn_t* transferFn); 338 void sk_colorspace_transfer_fn_named_pq(sk_colorspace_transfer_fn_t* transferFn); 339 void sk_colorspace_transfer_fn_named_rec2020(sk_colorspace_transfer_fn_t* transferFn); 340 void sk_colorspace_transfer_fn_named_srgb(sk_colorspace_transfer_fn_t* transferFn); 341 void sk_colorspace_unref(sk_colorspace_t* colorspace); 342 void sk_colorspace_xyz_concat(const(sk_colorspace_xyz_t)* a, const(sk_colorspace_xyz_t)* b, sk_colorspace_xyz_t* result); 343 bool sk_colorspace_xyz_invert(const(sk_colorspace_xyz_t)* src, sk_colorspace_xyz_t* dst); 344 void sk_colorspace_xyz_named_adobe_rgb(sk_colorspace_xyz_t* xyz); 345 void sk_colorspace_xyz_named_dcip3(sk_colorspace_xyz_t* xyz); 346 void sk_colorspace_xyz_named_rec2020(sk_colorspace_xyz_t* xyz); 347 void sk_colorspace_xyz_named_srgb(sk_colorspace_xyz_t* xyz); 348 void sk_colorspace_xyz_named_xyz(sk_colorspace_xyz_t* xyz); 349 350 // sk_colortable.h 351 int sk_colortable_count(const(sk_colortable_t)* ctable); 352 sk_colortable_t* sk_colortable_new(const(sk_pmcolor_t)* colors, int count); 353 void sk_colortable_read_colors(const(sk_colortable_t)* ctable, sk_pmcolor_t** colors); 354 void sk_colortable_unref(sk_colortable_t* ctable); 355 356 // sk_data.h 357 uint8_t* sk_data_get_bytes(const(sk_data_t)*); 358 void* sk_data_get_data(const(sk_data_t)*); 359 size_t sk_data_get_size(const(sk_data_t)*); 360 sk_data_t* sk_data_new_empty(); 361 sk_data_t* sk_data_new_from_file(const(char)* path); 362 sk_data_t* sk_data_new_from_stream(sk_stream_t* stream, size_t length); 363 sk_data_t* sk_data_new_subset(const(sk_data_t)* src, size_t offset, size_t length); 364 sk_data_t* sk_data_new_uninitialized(size_t size); 365 sk_data_t* sk_data_new_with_copy(const(void)* src, size_t length); 366 sk_data_t* sk_data_new_with_proc(const(void)* ptr, size_t length, sk_data_release_proc proc, void* ctx); 367 void sk_data_ref(const(sk_data_t)*); 368 void sk_data_unref(const(sk_data_t)*); 369 370 // sk_document.h 371 void sk_document_abort(sk_document_t* document); 372 sk_canvas_t* sk_document_begin_page(sk_document_t* document, float width, float height, const(sk_rect_t)* content); 373 void sk_document_close(sk_document_t* document); 374 sk_document_t* sk_document_create_pdf_from_stream(sk_wstream_t* stream); 375 sk_document_t* sk_document_create_pdf_from_stream_with_metadata(sk_wstream_t* stream, const(sk_document_pdf_metadata_t)* metadata); 376 sk_document_t* sk_document_create_xps_from_stream(sk_wstream_t* stream, float dpi); 377 void sk_document_end_page(sk_document_t* document); 378 void sk_document_unref(sk_document_t* document); 379 380 // sk_drawable.h 381 void sk_drawable_draw(sk_drawable_t*, sk_canvas_t*, const(sk_matrix_t)*); 382 void sk_drawable_get_bounds(sk_drawable_t*, sk_rect_t*); 383 uint32_t sk_drawable_get_generation_id(sk_drawable_t*); 384 sk_picture_t* sk_drawable_new_picture_snapshot(sk_drawable_t*); 385 void sk_drawable_notify_drawing_changed(sk_drawable_t*); 386 void sk_drawable_unref(sk_drawable_t*); 387 388 // sk_font.h 389 size_t sk_font_break_text(const(sk_font_t)* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, float maxWidth, float* measuredWidth, const(sk_paint_t)* paint); 390 void sk_font_delete(sk_font_t* font); 391 sk_font_edging_t sk_font_get_edging(const(sk_font_t)* font); 392 sk_font_hinting_t sk_font_get_hinting(const(sk_font_t)* font); 393 float sk_font_get_metrics(const(sk_font_t)* font, sk_fontmetrics_t* metrics); 394 bool sk_font_get_path(const(sk_font_t)* font, uint16_t glyph, sk_path_t* path); 395 void sk_font_get_paths(const(sk_font_t)* font, uint16_t* glyphs, int count, const sk_glyph_path_proc glyphPathProc, void* context); 396 void sk_font_get_pos(const(sk_font_t)* font, const(uint16_t)* glyphs, int count, sk_point_t* pos, sk_point_t* origin); 397 float sk_font_get_scale_x(const(sk_font_t)* font); 398 float sk_font_get_size(const(sk_font_t)* font); 399 float sk_font_get_skew_x(const(sk_font_t)* font); 400 sk_typeface_t* sk_font_get_typeface(const(sk_font_t)* font); 401 void sk_font_get_widths_bounds(const(sk_font_t)* font, const(uint16_t)* glyphs, int count, float* widths, sk_rect_t* bounds, const(sk_paint_t)* paint); 402 void sk_font_get_xpos(const(sk_font_t)* font, const(uint16_t)* glyphs, int count, float* xpos, float origin); 403 bool sk_font_is_baseline_snap(const(sk_font_t)* font); 404 bool sk_font_is_embedded_bitmaps(const(sk_font_t)* font); 405 bool sk_font_is_embolden(const(sk_font_t)* font); 406 bool sk_font_is_force_auto_hinting(const(sk_font_t)* font); 407 bool sk_font_is_linear_metrics(const(sk_font_t)* font); 408 bool sk_font_is_subpixel(const(sk_font_t)* font); 409 float sk_font_measure_text(const(sk_font_t)* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const(sk_paint_t)* paint); 410 void sk_font_measure_text_no_return(const(sk_font_t)* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const(sk_paint_t)* paint, float* measuredWidth); 411 sk_font_t* sk_font_new(); 412 sk_font_t* sk_font_new_with_values(sk_typeface_t* typeface, float size, float scaleX, float skewX); 413 void sk_font_set_baseline_snap(sk_font_t* font, bool value); 414 void sk_font_set_edging(sk_font_t* font, sk_font_edging_t value); 415 void sk_font_set_embedded_bitmaps(sk_font_t* font, bool value); 416 void sk_font_set_embolden(sk_font_t* font, bool value); 417 void sk_font_set_force_auto_hinting(sk_font_t* font, bool value); 418 void sk_font_set_hinting(sk_font_t* font, sk_font_hinting_t value); 419 void sk_font_set_linear_metrics(sk_font_t* font, bool value); 420 void sk_font_set_scale_x(sk_font_t* font, float value); 421 void sk_font_set_size(sk_font_t* font, float value); 422 void sk_font_set_skew_x(sk_font_t* font, float value); 423 void sk_font_set_subpixel(sk_font_t* font, bool value); 424 void sk_font_set_typeface(sk_font_t* font, sk_typeface_t* value); 425 int sk_font_text_to_glyphs(const(sk_font_t)* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, uint16_t* glyphs, int maxGlyphCount); 426 uint16_t sk_font_unichar_to_glyph(const(sk_font_t)* font, int32_t uni); 427 void sk_font_unichars_to_glyphs(const(sk_font_t)* font, const(int32_t)* uni, int count, uint16_t* glyphs); 428 void sk_text_utils_get_path(const(void)* text, size_t length, sk_text_encoding_t encoding, float x, float y, const(sk_font_t)* font, sk_path_t* path); 429 void sk_text_utils_get_pos_path(const(void)* text, size_t length, sk_text_encoding_t encoding, const(sk_point_t)* pos, const(sk_font_t)* font, sk_path_t* path); 430 431 // sk_general.h 432 sk_colortype_t sk_colortype_get_default_8888(); 433 int sk_nvrefcnt_get_ref_count(const(sk_nvrefcnt_t)* refcnt); 434 void sk_nvrefcnt_safe_ref(sk_nvrefcnt_t* refcnt); 435 void sk_nvrefcnt_safe_unref(sk_nvrefcnt_t* refcnt); 436 bool sk_nvrefcnt_unique(const(sk_nvrefcnt_t)* refcnt); 437 int sk_refcnt_get_ref_count(const(sk_refcnt_t)* refcnt); 438 void sk_refcnt_safe_ref(sk_refcnt_t* refcnt); 439 void sk_refcnt_safe_unref(sk_refcnt_t* refcnt); 440 bool sk_refcnt_unique(const(sk_refcnt_t)* refcnt); 441 int sk_version_get_increment(); 442 int sk_version_get_milestone(); 443 const(char)* sk_version_get_string(); 444 445 // sk_graphics.h 446 void sk_graphics_dump_memory_statistics(sk_tracememorydump_t* dump); 447 int sk_graphics_get_font_cache_count_limit(); 448 int sk_graphics_get_font_cache_count_used(); 449 size_t sk_graphics_get_font_cache_limit(); 450 int sk_graphics_get_font_cache_point_size_limit(); 451 size_t sk_graphics_get_font_cache_used(); 452 size_t sk_graphics_get_resource_cache_single_allocation_byte_limit(); 453 size_t sk_graphics_get_resource_cache_total_byte_limit(); 454 size_t sk_graphics_get_resource_cache_total_bytes_used(); 455 void sk_graphics_init(); 456 void sk_graphics_purge_all_caches(); 457 void sk_graphics_purge_font_cache(); 458 void sk_graphics_purge_resource_cache(); 459 int sk_graphics_set_font_cache_count_limit(int count); 460 size_t sk_graphics_set_font_cache_limit(size_t bytes); 461 int sk_graphics_set_font_cache_point_size_limit(int maxPointSize); 462 size_t sk_graphics_set_resource_cache_single_allocation_byte_limit(size_t newLimit); 463 size_t sk_graphics_set_resource_cache_total_byte_limit(size_t newLimit); 464 465 // sk_image.h 466 sk_data_t* sk_image_encode(const(sk_image_t)*); 467 sk_data_t* sk_image_encode_specific(const(sk_image_t)* cimage, sk_encoded_image_format_t encoder, int quality); 468 sk_alphatype_t sk_image_get_alpha_type(const(sk_image_t)*); 469 sk_colortype_t sk_image_get_color_type(const(sk_image_t)*); 470 sk_colorspace_t* sk_image_get_colorspace(const(sk_image_t)*); 471 int sk_image_get_height(const(sk_image_t)*); 472 uint32_t sk_image_get_unique_id(const(sk_image_t)*); 473 int sk_image_get_width(const(sk_image_t)*); 474 bool sk_image_is_alpha_only(const(sk_image_t)*); 475 bool sk_image_is_lazy_generated(const(sk_image_t)* image); 476 bool sk_image_is_texture_backed(const(sk_image_t)* image); 477 bool sk_image_is_valid(const(sk_image_t)* image, gr_context_t* context); 478 sk_image_t* sk_image_make_non_texture_image(const(sk_image_t)* cimage); 479 sk_image_t* sk_image_make_raster_image(const(sk_image_t)* cimage); 480 sk_shader_t* sk_image_make_shader(const(sk_image_t)*, sk_shader_tilemode_t tileX, sk_shader_tilemode_t tileY, const(sk_matrix_t)* localMatrix); 481 sk_image_t* sk_image_make_subset(const(sk_image_t)* cimage, const(sk_irect_t)* subset); 482 sk_image_t* sk_image_make_texture_image(const(sk_image_t)* cimage, gr_context_t* context, bool mipmapped); 483 sk_image_t* sk_image_make_with_filter(const(sk_image_t)* cimage, const(sk_imagefilter_t)* filter, const(sk_irect_t)* subset, const(sk_irect_t)* clipBounds, sk_irect_t* outSubset, sk_ipoint_t* outOffset); 484 sk_image_t* sk_image_new_from_adopted_texture(gr_context_t* context, const(gr_backendtexture_t)* texture, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_alphatype_t alpha, sk_colorspace_t* colorSpace); 485 sk_image_t* sk_image_new_from_bitmap(const(sk_bitmap_t)* cbitmap); 486 sk_image_t* sk_image_new_from_encoded(sk_data_t* encoded, const(sk_irect_t)* subset); 487 sk_image_t* sk_image_new_from_picture(sk_picture_t* picture, const(sk_isize_t)* dimensions, const(sk_matrix_t)* matrix, const(sk_paint_t)* paint); 488 sk_image_t* sk_image_new_from_texture(gr_context_t* context, const(gr_backendtexture_t)* texture, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_alphatype_t alpha, sk_colorspace_t* colorSpace, sk_image_texture_release_proc releaseProc, void* releaseContext); 489 sk_image_t* sk_image_new_raster(const(sk_pixmap_t)* pixmap, sk_image_raster_release_proc releaseProc, void* context); 490 sk_image_t* sk_image_new_raster_copy(const(sk_imageinfo_t)*, const(void)* pixels, size_t rowBytes); 491 sk_image_t* sk_image_new_raster_copy_with_pixmap(const(sk_pixmap_t)* pixmap); 492 sk_image_t* sk_image_new_raster_data(const(sk_imageinfo_t)* cinfo, sk_data_t* pixels, size_t rowBytes); 493 bool sk_image_peek_pixels(const(sk_image_t)* image, sk_pixmap_t* pixmap); 494 bool sk_image_read_pixels(const(sk_image_t)* image, const(sk_imageinfo_t)* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY, sk_image_caching_hint_t cachingHint); 495 bool sk_image_read_pixels_into_pixmap(const(sk_image_t)* image, const(sk_pixmap_t)* dst, int srcX, int srcY, sk_image_caching_hint_t cachingHint); 496 void sk_image_ref(const(sk_image_t)*); 497 sk_data_t* sk_image_ref_encoded(const(sk_image_t)*); 498 bool sk_image_scale_pixels(const(sk_image_t)* image, const(sk_pixmap_t)* dst, sk_filter_quality_t quality, sk_image_caching_hint_t cachingHint); 499 void sk_image_unref(const(sk_image_t)*); 500 501 // sk_imagefilter.h 502 void sk_imagefilter_croprect_destructor(sk_imagefilter_croprect_t* cropRect); 503 uint32_t sk_imagefilter_croprect_get_flags(sk_imagefilter_croprect_t* cropRect); 504 void sk_imagefilter_croprect_get_rect(sk_imagefilter_croprect_t* cropRect, sk_rect_t* rect); 505 sk_imagefilter_croprect_t* sk_imagefilter_croprect_new(); 506 sk_imagefilter_croprect_t* sk_imagefilter_croprect_new_with_rect(const(sk_rect_t)* rect, uint32_t flags); 507 sk_imagefilter_t* sk_imagefilter_new_alpha_threshold(const(sk_region_t)* region, float innerThreshold, float outerThreshold, sk_imagefilter_t* input); 508 sk_imagefilter_t* sk_imagefilter_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePMColor, sk_imagefilter_t* background, sk_imagefilter_t* foreground, const(sk_imagefilter_croprect_t)* cropRect); 509 sk_imagefilter_t* sk_imagefilter_new_blur(float sigmaX, float sigmaY, sk_shader_tilemode_t tileMode, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 510 sk_imagefilter_t* sk_imagefilter_new_color_filter(sk_colorfilter_t* cf, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 511 sk_imagefilter_t* sk_imagefilter_new_compose(sk_imagefilter_t* outer, sk_imagefilter_t* inner); 512 sk_imagefilter_t* sk_imagefilter_new_dilate(int radiusX, int radiusY, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 513 sk_imagefilter_t* sk_imagefilter_new_displacement_map_effect(sk_color_channel_t xChannelSelector, sk_color_channel_t yChannelSelector, float scale, sk_imagefilter_t* displacement, sk_imagefilter_t* color, const(sk_imagefilter_croprect_t)* cropRect); 514 sk_imagefilter_t* sk_imagefilter_new_distant_lit_diffuse(const(sk_point3_t)* direction, sk_color_t lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 515 sk_imagefilter_t* sk_imagefilter_new_distant_lit_specular(const(sk_point3_t)* direction, sk_color_t lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 516 sk_imagefilter_t* sk_imagefilter_new_drop_shadow(float dx, float dy, float sigmaX, float sigmaY, sk_color_t color, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 517 sk_imagefilter_t* sk_imagefilter_new_drop_shadow_only(float dx, float dy, float sigmaX, float sigmaY, sk_color_t color, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 518 sk_imagefilter_t* sk_imagefilter_new_erode(int radiusX, int radiusY, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 519 sk_imagefilter_t* sk_imagefilter_new_image_source(sk_image_t* image, const(sk_rect_t)* srcRect, const(sk_rect_t)* dstRect, sk_filter_quality_t filterQuality); 520 sk_imagefilter_t* sk_imagefilter_new_image_source_default(sk_image_t* image); 521 sk_imagefilter_t* sk_imagefilter_new_magnifier(const(sk_rect_t)* src, float inset, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 522 sk_imagefilter_t* sk_imagefilter_new_matrix(const(sk_matrix_t)* matrix, sk_filter_quality_t quality, sk_imagefilter_t* input); 523 sk_imagefilter_t* sk_imagefilter_new_matrix_convolution(const(sk_isize_t)* kernelSize, const(float)* kernel, float gain, float bias, const(sk_ipoint_t)* kernelOffset, sk_shader_tilemode_t tileMode, bool convolveAlpha, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 524 sk_imagefilter_t* sk_imagefilter_new_merge(sk_imagefilter_t** filters, int count, const(sk_imagefilter_croprect_t)* cropRect); 525 sk_imagefilter_t* sk_imagefilter_new_offset(float dx, float dy, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 526 sk_imagefilter_t* sk_imagefilter_new_paint(const(sk_paint_t)* paint, const(sk_imagefilter_croprect_t)* cropRect); 527 sk_imagefilter_t* sk_imagefilter_new_picture(sk_picture_t* picture); 528 sk_imagefilter_t* sk_imagefilter_new_picture_with_croprect(sk_picture_t* picture, const(sk_rect_t)* cropRect); 529 sk_imagefilter_t* sk_imagefilter_new_point_lit_diffuse(const(sk_point3_t)* location, sk_color_t lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 530 sk_imagefilter_t* sk_imagefilter_new_point_lit_specular(const(sk_point3_t)* location, sk_color_t lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 531 sk_imagefilter_t* sk_imagefilter_new_spot_lit_diffuse(const(sk_point3_t)* location, const(sk_point3_t)* target, float specularExponent, float cutoffAngle, sk_color_t lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 532 sk_imagefilter_t* sk_imagefilter_new_spot_lit_specular(const(sk_point3_t)* location, const(sk_point3_t)* target, float specularExponent, float cutoffAngle, sk_color_t lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, const(sk_imagefilter_croprect_t)* cropRect); 533 sk_imagefilter_t* sk_imagefilter_new_tile(const(sk_rect_t)* src, const(sk_rect_t)* dst, sk_imagefilter_t* input); 534 sk_imagefilter_t* sk_imagefilter_new_xfermode(sk_blendmode_t mode, sk_imagefilter_t* background, sk_imagefilter_t* foreground, const(sk_imagefilter_croprect_t)* cropRect); 535 void sk_imagefilter_unref(sk_imagefilter_t*); 536 537 // sk_mask.h 538 uint8_t* sk_mask_alloc_image(size_t bytes); 539 size_t sk_mask_compute_image_size(sk_mask_t* cmask); 540 size_t sk_mask_compute_total_image_size(sk_mask_t* cmask); 541 void sk_mask_free_image(void* image); 542 void* sk_mask_get_addr(sk_mask_t* cmask, int x, int y); 543 uint8_t* sk_mask_get_addr_1(sk_mask_t* cmask, int x, int y); 544 uint32_t* sk_mask_get_addr_32(sk_mask_t* cmask, int x, int y); 545 uint8_t* sk_mask_get_addr_8(SKMask* cmask, int x, int y); 546 uint16_t* sk_mask_get_addr_lcd_16(sk_mask_t* cmask, int x, int y); 547 bool sk_mask_is_empty(sk_mask_t* cmask); 548 549 // sk_maskfilter.h 550 sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma); 551 sk_maskfilter_t* sk_maskfilter_new_blur_with_flags(sk_blurstyle_t, float sigma, bool respectCTM); 552 sk_maskfilter_t* sk_maskfilter_new_clip(uint8_t min, uint8_t max); 553 sk_maskfilter_t* sk_maskfilter_new_gamma(float gamma); 554 sk_maskfilter_t* sk_maskfilter_new_shader(sk_shader_t* cshader); 555 sk_maskfilter_t* sk_maskfilter_new_table(ubyte* table); 556 void sk_maskfilter_ref(sk_maskfilter_t*); 557 void sk_maskfilter_unref(sk_maskfilter_t*); 558 559 // sk_matrix.h 560 void sk_3dview_apply_to_canvas(sk_3dview_t* cview, sk_canvas_t* ccanvas); 561 void sk_3dview_destroy(sk_3dview_t* cview); 562 float sk_3dview_dot_with_normal(sk_3dview_t* cview, float dx, float dy, float dz); 563 void sk_3dview_get_matrix(sk_3dview_t* cview, sk_matrix_t* cmatrix); 564 sk_3dview_t* sk_3dview_new(); 565 void sk_3dview_restore(sk_3dview_t* cview); 566 void sk_3dview_rotate_x_degrees(sk_3dview_t* cview, float degrees); 567 void sk_3dview_rotate_x_radians(sk_3dview_t* cview, float radians); 568 void sk_3dview_rotate_y_degrees(sk_3dview_t* cview, float degrees); 569 void sk_3dview_rotate_y_radians(sk_3dview_t* cview, float radians); 570 void sk_3dview_rotate_z_degrees(sk_3dview_t* cview, float degrees); 571 void sk_3dview_rotate_z_radians(sk_3dview_t* cview, float radians); 572 void sk_3dview_save(sk_3dview_t* cview); 573 void sk_3dview_translate(sk_3dview_t* cview, float x, float y, float z); 574 void sk_matrix_concat(sk_matrix_t* result, sk_matrix_t* first, sk_matrix_t* second); 575 void sk_matrix_map_points(sk_matrix_t* matrix, sk_point_t* dst, sk_point_t* src, int count); 576 float sk_matrix_map_radius(sk_matrix_t* matrix, float radius); 577 void sk_matrix_map_rect(sk_matrix_t* matrix, sk_rect_t* dest, sk_rect_t* source); 578 void sk_matrix_map_vector(sk_matrix_t* matrix, float x, float y, sk_point_t* result); 579 void sk_matrix_map_vectors(sk_matrix_t* matrix, sk_point_t* dst, sk_point_t* src, int count); 580 void sk_matrix_map_xy(sk_matrix_t* matrix, float x, float y, sk_point_t* result); 581 void sk_matrix_post_concat(sk_matrix_t* result, sk_matrix_t* matrix); 582 void sk_matrix_pre_concat(sk_matrix_t* result, sk_matrix_t* matrix); 583 bool sk_matrix_try_invert(sk_matrix_t* matrix, sk_matrix_t* result); 584 void sk_matrix44_as_col_major(sk_matrix44_t* matrix, float* dst); 585 void sk_matrix44_as_row_major(sk_matrix44_t* matrix, float* dst); 586 void sk_matrix44_destroy(sk_matrix44_t* matrix); 587 double sk_matrix44_determinant(sk_matrix44_t* matrix); 588 bool sk_matrix44_equals(sk_matrix44_t* matrix, const(sk_matrix44_t)* other); 589 float sk_matrix44_get(sk_matrix44_t* matrix, int row, int col); 590 sk_matrix44_type_mask_t sk_matrix44_get_type(sk_matrix44_t* matrix); 591 bool sk_matrix44_invert(sk_matrix44_t* matrix, sk_matrix44_t* inverse); 592 void sk_matrix44_map_scalars(sk_matrix44_t* matrix, const(float)* src, float* dst); 593 void sk_matrix44_map2(sk_matrix44_t* matrix, const(float)* src2, int count, float* dst4); 594 sk_matrix44_t* sk_matrix44_new(); 595 sk_matrix44_t* sk_matrix44_new_concat(const(sk_matrix44_t)* a, const(sk_matrix44_t)* b); 596 sk_matrix44_t* sk_matrix44_new_copy(const(sk_matrix44_t)* src); 597 sk_matrix44_t* sk_matrix44_new_identity(); 598 sk_matrix44_t* sk_matrix44_new_matrix(const(sk_matrix_t)* src); 599 void sk_matrix44_post_concat(sk_matrix44_t* matrix, const(sk_matrix44_t)* m); 600 void sk_matrix44_post_scale(sk_matrix44_t* matrix, float sx, float sy, float sz); 601 void sk_matrix44_post_translate(sk_matrix44_t* matrix, float dx, float dy, float dz); 602 void sk_matrix44_pre_concat(sk_matrix44_t* matrix, const(sk_matrix44_t)* m); 603 void sk_matrix44_pre_scale(sk_matrix44_t* matrix, float sx, float sy, float sz); 604 void sk_matrix44_pre_translate(sk_matrix44_t* matrix, float dx, float dy, float dz); 605 bool sk_matrix44_preserves_2d_axis_alignment(sk_matrix44_t* matrix, float epsilon); 606 void sk_matrix44_set(sk_matrix44_t* matrix, int row, int col, float value); 607 void sk_matrix44_set_3x3_row_major(sk_matrix44_t* matrix, float* dst); 608 void sk_matrix44_set_col_major(sk_matrix44_t* matrix, float* dst); 609 void sk_matrix44_set_concat(sk_matrix44_t* matrix, const(sk_matrix44_t)* a, const(sk_matrix44_t)* b); 610 void sk_matrix44_set_identity(sk_matrix44_t* matrix); 611 void sk_matrix44_set_rotate_about_degrees(sk_matrix44_t* matrix, float x, float y, float z, float degrees); 612 void sk_matrix44_set_rotate_about_radians(sk_matrix44_t* matrix, float x, float y, float z, float radians); 613 void sk_matrix44_set_rotate_about_radians_unit(sk_matrix44_t* matrix, float x, float y, float z, float radians); 614 void sk_matrix44_set_row_major(sk_matrix44_t* matrix, float* dst); 615 void sk_matrix44_set_scale(sk_matrix44_t* matrix, float sx, float sy, float sz); 616 void sk_matrix44_set_translate(sk_matrix44_t* matrix, float dx, float dy, float dz); 617 void sk_matrix44_to_matrix(sk_matrix44_t* matrix, sk_matrix_t* dst); 618 void sk_matrix44_transpose(sk_matrix44_t* matrix); 619 620 // sk_paint.h 621 sk_paint_t* sk_paint_clone(sk_paint_t*); 622 void sk_paint_delete(sk_paint_t*); 623 sk_blendmode_t sk_paint_get_blendmode(sk_paint_t*); 624 sk_color_t sk_paint_get_color(const(sk_paint_t)*); 625 void sk_paint_get_color4f(const(sk_paint_t)* paint, sk_color4f_t* color); 626 sk_colorfilter_t* sk_paint_get_colorfilter(sk_paint_t*); 627 bool sk_paint_get_fill_path(const(sk_paint_t)*, const(sk_path_t)* src, sk_path_t* dst, const(sk_rect_t)* cullRect, float resScale); 628 sk_filter_quality_t sk_paint_get_filter_quality(sk_paint_t*); 629 sk_imagefilter_t* sk_paint_get_imagefilter(sk_paint_t*); 630 sk_maskfilter_t* sk_paint_get_maskfilter(sk_paint_t*); 631 sk_path_effect_t* sk_paint_get_path_effect(sk_paint_t* cpaint); 632 sk_shader_t* sk_paint_get_shader(sk_paint_t*); 633 sk_stroke_cap_t sk_paint_get_stroke_cap(const(sk_paint_t)*); 634 sk_stroke_join_t sk_paint_get_stroke_join(const(sk_paint_t)*); 635 float sk_paint_get_stroke_miter(const(sk_paint_t)*); 636 float sk_paint_get_stroke_width(const(sk_paint_t)*); 637 sk_paint_style_t sk_paint_get_style(const(sk_paint_t)*); 638 bool sk_paint_is_antialias(const(sk_paint_t)*); 639 bool sk_paint_is_dither(const(sk_paint_t)*); 640 sk_paint_t* sk_paint_new(); 641 void sk_paint_reset(sk_paint_t*); 642 void sk_paint_set_antialias(sk_paint_t*, bool); 643 void sk_paint_set_blendmode(sk_paint_t*, sk_blendmode_t); 644 void sk_paint_set_color(sk_paint_t*, sk_color_t); 645 void sk_paint_set_color4f(sk_paint_t* paint, sk_color4f_t* color, sk_colorspace_t* colorspace); 646 void sk_paint_set_colorfilter(sk_paint_t*, sk_colorfilter_t*); 647 void sk_paint_set_dither(sk_paint_t*, bool); 648 void sk_paint_set_filter_quality(sk_paint_t*, sk_filter_quality_t); 649 void sk_paint_set_imagefilter(sk_paint_t*, sk_imagefilter_t*); 650 void sk_paint_set_maskfilter(sk_paint_t*, sk_maskfilter_t*); 651 void sk_paint_set_path_effect(sk_paint_t* cpaint, sk_path_effect_t* effect); 652 void sk_paint_set_shader(sk_paint_t*, sk_shader_t*); 653 void sk_paint_set_stroke_cap(sk_paint_t*, sk_stroke_cap_t); 654 void sk_paint_set_stroke_join(sk_paint_t*, sk_stroke_join_t); 655 void sk_paint_set_stroke_miter(sk_paint_t*, float miter); 656 void sk_paint_set_stroke_width(sk_paint_t*, float width); 657 void sk_paint_set_style(sk_paint_t*, sk_paint_style_t); 658 659 // sk_path.h 660 void sk_opbuilder_add(sk_opbuilder_t* builder, const(sk_path_t)* path, sk_pathop_t op); 661 void sk_opbuilder_destroy(sk_opbuilder_t* builder); 662 sk_opbuilder_t* sk_opbuilder_new(); 663 bool sk_opbuilder_resolve(sk_opbuilder_t* builder, sk_path_t* result); 664 void sk_path_add_arc(sk_path_t* cpath, const(sk_rect_t)* crect, float startAngle, float sweepAngle); 665 void sk_path_add_circle(sk_path_t*, float x, float y, float radius, sk_path_direction_t dir); 666 void sk_path_add_oval(sk_path_t*, const(sk_rect_t)*, sk_path_direction_t); 667 void sk_path_add_path(sk_path_t* cpath, sk_path_t* other, sk_path_add_mode_t add_mode); 668 void sk_path_add_path_matrix(sk_path_t* cpath, sk_path_t* other, sk_matrix_t* matrix, sk_path_add_mode_t add_mode); 669 void sk_path_add_path_offset(sk_path_t* cpath, sk_path_t* other, float dx, float dy, sk_path_add_mode_t add_mode); 670 void sk_path_add_path_reverse(sk_path_t* cpath, sk_path_t* other); 671 void sk_path_add_poly(sk_path_t* cpath, const(sk_point_t)* points, int count, bool close); 672 void sk_path_add_rect(sk_path_t*, const(sk_rect_t)*, sk_path_direction_t); 673 void sk_path_add_rect_start(sk_path_t* cpath, const(sk_rect_t)* crect, sk_path_direction_t cdir, uint32_t startIndex); 674 void sk_path_add_rounded_rect(sk_path_t*, const(sk_rect_t)*, float, float, sk_path_direction_t); 675 void sk_path_add_rrect(sk_path_t*, const(sk_rrect_t)*, sk_path_direction_t); 676 void sk_path_add_rrect_start(sk_path_t*, const(sk_rrect_t)*, sk_path_direction_t, uint32_t); 677 void sk_path_arc_to(sk_path_t*, float rx, float ry, float xAxisRotate, sk_path_arc_size_t largeArc, sk_path_direction_t sweep, float x, float y); 678 void sk_path_arc_to_with_oval(sk_path_t*, const(sk_rect_t)* oval, float startAngle, float sweepAngle, bool forceMoveTo); 679 void sk_path_arc_to_with_points(sk_path_t*, float x1, float y1, float x2, float y2, float radius); 680 sk_path_t* sk_path_clone(const(sk_path_t)* cpath); 681 void sk_path_close(sk_path_t*); 682 void sk_path_compute_tight_bounds(const(sk_path_t)*, sk_rect_t*); 683 void sk_path_conic_to(sk_path_t*, float x0, float y0, float x1, float y1, float w); 684 bool sk_path_contains(const(sk_path_t)* cpath, float x, float y); 685 int sk_path_convert_conic_to_quads(const(sk_point_t)* p0, const(sk_point_t)* p1, const(sk_point_t)* p2, float w, sk_point_t* pts, int pow2); 686 int sk_path_count_points(const(sk_path_t)* cpath); 687 int sk_path_count_verbs(const(sk_path_t)* cpath); 688 sk_path_iterator_t* sk_path_create_iter(sk_path_t* cpath, int forceClose); 689 sk_path_rawiterator_t* sk_path_create_rawiter(sk_path_t* cpath); 690 void sk_path_cubic_to(sk_path_t*, float x0, float y0, float x1, float y1, float x2, float y2); 691 void sk_path_delete(sk_path_t*); 692 void sk_path_get_bounds(const(sk_path_t)*, sk_rect_t*); 693 sk_path_convexity_t sk_path_get_convexity(const(sk_path_t)* cpath); 694 sk_path_filltype_t sk_path_get_filltype(sk_path_t*); 695 bool sk_path_get_last_point(const(sk_path_t)* cpath, sk_point_t* point); 696 void sk_path_get_point(const(sk_path_t)* cpath, int index, sk_point_t* point); 697 int sk_path_get_points(const(sk_path_t)* cpath, sk_point_t* points, int max); 698 uint32_t sk_path_get_segment_masks(sk_path_t* cpath); 699 bool sk_path_is_line(sk_path_t* cpath, sk_point_t* line); 700 bool sk_path_is_oval(sk_path_t* cpath, sk_rect_t* bounds); 701 bool sk_path_is_rect(sk_path_t* cpath, sk_rect_t* rect, bool* isClosed, sk_path_direction_t* direction); 702 bool sk_path_is_rrect(sk_path_t* cpath, sk_rrect_t* bounds); 703 float sk_path_iter_conic_weight(sk_path_iterator_t* iterator); 704 void sk_path_iter_destroy(sk_path_iterator_t* iterator); 705 int sk_path_iter_is_close_line(sk_path_iterator_t* iterator); 706 int sk_path_iter_is_closed_contour(sk_path_iterator_t* iterator); 707 sk_path_verb_t sk_path_iter_next(sk_path_iterator_t* iterator, sk_point_t* points); 708 void sk_path_line_to(sk_path_t*, float x, float y); 709 void sk_path_move_to(sk_path_t*, float x, float y); 710 sk_path_t* sk_path_new(); 711 bool sk_path_parse_svg_string(sk_path_t* cpath, const(char)* str); 712 void sk_path_quad_to(sk_path_t*, float x0, float y0, float x1, float y1); 713 void sk_path_rarc_to(sk_path_t*, float rx, float ry, float xAxisRotate, sk_path_arc_size_t largeArc, sk_path_direction_t sweep, float x, float y); 714 float sk_path_rawiter_conic_weight(sk_path_rawiterator_t* iterator); 715 void sk_path_rawiter_destroy(sk_path_rawiterator_t* iterator); 716 sk_path_verb_t sk_path_rawiter_next(sk_path_rawiterator_t* iterator, sk_point_t* points); 717 sk_path_verb_t sk_path_rawiter_peek(sk_path_rawiterator_t* iterator); 718 void sk_path_rconic_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1, float w); 719 void sk_path_rcubic_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1, float dx2, float dy2); 720 void sk_path_reset(sk_path_t* cpath); 721 void sk_path_rewind(sk_path_t* cpath); 722 void sk_path_rline_to(sk_path_t*, float dx, float yd); 723 void sk_path_rmove_to(sk_path_t*, float dx, float dy); 724 void sk_path_rquad_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1); 725 void sk_path_set_convexity(sk_path_t* cpath, sk_path_convexity_t convexity); 726 void sk_path_set_filltype(sk_path_t*, sk_path_filltype_t); 727 void sk_path_to_svg_string(const(sk_path_t)* cpath, sk_string_t* str); 728 void sk_path_transform(sk_path_t* cpath, const(sk_matrix_t)* cmatrix); 729 void sk_path_transform_to_dest(const(sk_path_t)* cpath, const(sk_matrix_t)* cmatrix, sk_path_t* destination); 730 void sk_pathmeasure_destroy(sk_pathmeasure_t* pathMeasure); 731 float sk_pathmeasure_get_length(sk_pathmeasure_t* pathMeasure); 732 bool sk_pathmeasure_get_matrix(sk_pathmeasure_t* pathMeasure, float distance, sk_matrix_t* matrix, sk_pathmeasure_matrixflags_t flags); 733 bool sk_pathmeasure_get_pos_tan(sk_pathmeasure_t* pathMeasure, float distance, sk_point_t* position, sk_vector_t* tangent); 734 bool sk_pathmeasure_get_segment(sk_pathmeasure_t* pathMeasure, float start, float stop, sk_path_t* dst, bool startWithMoveTo); 735 bool sk_pathmeasure_is_closed(sk_pathmeasure_t* pathMeasure); 736 sk_pathmeasure_t* sk_pathmeasure_new(); 737 sk_pathmeasure_t* sk_pathmeasure_new_with_path(const(sk_path_t)* path, bool forceClosed, float resScale); 738 bool sk_pathmeasure_next_contour(sk_pathmeasure_t* pathMeasure); 739 void sk_pathmeasure_set_path(sk_pathmeasure_t* pathMeasure, const(sk_path_t)* path, bool forceClosed); 740 bool sk_pathop_as_winding(const(sk_path_t)* path, sk_path_t* result); 741 bool sk_pathop_op(const(sk_path_t)* one, const(sk_path_t)* two, sk_pathop_t op, sk_path_t* result); 742 bool sk_pathop_simplify(const(sk_path_t)* path, sk_path_t* result); 743 bool sk_pathop_tight_bounds(const(sk_path_t)* path, sk_rect_t* result); 744 745 // sk_patheffect.h 746 sk_path_effect_t* sk_path_effect_create_1d_path(const(sk_path_t)* path, float advance, float phase, sk_path_effect_1d_style_t style); 747 sk_path_effect_t* sk_path_effect_create_2d_line(float width, const(sk_matrix_t)* matrix); 748 sk_path_effect_t* sk_path_effect_create_2d_path(const(sk_matrix_t)* matrix, const(sk_path_t)* path); 749 sk_path_effect_t* sk_path_effect_create_compose(sk_path_effect_t* outer, sk_path_effect_t* inner); 750 sk_path_effect_t* sk_path_effect_create_corner(float radius); 751 sk_path_effect_t* sk_path_effect_create_dash(const(float)* intervals, int count, float phase); 752 sk_path_effect_t* sk_path_effect_create_discrete(float segLength, float deviation, uint32_t seedAssist); 753 sk_path_effect_t* sk_path_effect_create_sum(sk_path_effect_t* first, sk_path_effect_t* second); 754 sk_path_effect_t* sk_path_effect_create_trim(float start, float stop, sk_path_effect_trim_mode_t mode); 755 void sk_path_effect_unref(sk_path_effect_t* t); 756 757 // sk_picture.h 758 // sk_picture_t* sk_picture_deserialize_from_data(sk_data_t* data); 759 // sk_picture_t* sk_picture_deserialize_from_memory(void* buffer, size_t length); 760 // sk_picture_t* sk_picture_deserialize_from_stream(sk_stream_t* stream); 761 void sk_picture_get_cull_rect(sk_picture_t*, sk_rect_t*); 762 sk_canvas_t* sk_picture_get_recording_canvas(sk_picture_recorder_t* crec); 763 uint32_t sk_picture_get_unique_id(sk_picture_t*); 764 sk_shader_t* sk_picture_make_shader(sk_picture_t* src, sk_shader_tilemode_t tmx, sk_shader_tilemode_t tmy, const(sk_matrix_t)* localMatrix, const(sk_rect_t)* tile); 765 sk_canvas_t* sk_picture_recorder_begin_recording(sk_picture_recorder_t*, const(sk_rect_t)*); 766 void sk_picture_recorder_delete(sk_picture_recorder_t*); 767 sk_picture_t* sk_picture_recorder_end_recording(sk_picture_recorder_t*); 768 sk_drawable_t* sk_picture_recorder_end_recording_as_drawable(sk_picture_recorder_t*); 769 sk_picture_recorder_t* sk_picture_recorder_new(); 770 void sk_picture_ref(sk_picture_t*); 771 // sk_data_t* sk_picture_serialize_to_data(const(sk_picture_t)* picture); 772 // void sk_picture_serialize_to_stream(const(sk_picture_t)* picture, sk_wstream_t* stream); 773 void sk_picture_unref(sk_picture_t*); 774 775 // sk_pixmap.h 776 void sk_color_get_bit_shift(int* a, int* r, int* g, int* b); 777 sk_pmcolor_t sk_color_premultiply(const sk_color_t color); 778 void sk_color_premultiply_array(const(sk_color_t)* colors, int size, sk_pmcolor_t* pmcolors); 779 sk_color_t sk_color_unpremultiply(const sk_pmcolor_t pmcolor); 780 void sk_color_unpremultiply_array(const(sk_pmcolor_t)* pmcolors, int size, sk_color_t* colors); 781 bool sk_jpegencoder_encode(sk_wstream_t* dst, const(sk_pixmap_t)* src, const(sk_jpegencoder_options_t)* options); 782 void sk_pixmap_destructor(sk_pixmap_t* cpixmap); 783 bool sk_pixmap_encode_image(sk_wstream_t* dst, const(sk_pixmap_t)* src, sk_encoded_image_format_t encoder, int quality); 784 bool sk_pixmap_erase_color(const(sk_pixmap_t)* cpixmap, sk_color_t color, const(sk_irect_t)* subset); 785 bool sk_pixmap_erase_color4f(const(sk_pixmap_t)* cpixmap, const(sk_color4f_t)* color, const(sk_irect_t)* subset); 786 bool sk_pixmap_extract_subset(const(sk_pixmap_t)* cpixmap, sk_pixmap_t* result, const(sk_irect_t)* subset); 787 void sk_pixmap_get_info(const(sk_pixmap_t)* cpixmap, sk_imageinfo_t* cinfo); 788 sk_color_t sk_pixmap_get_pixel_color(const(sk_pixmap_t)* cpixmap, int x, int y); 789 const(void)* sk_pixmap_get_pixels(const(sk_pixmap_t)* cpixmap); 790 const(void)* sk_pixmap_get_pixels_with_xy(const(sk_pixmap_t)* cpixmap, int x, int y); 791 size_t sk_pixmap_get_row_bytes(const(sk_pixmap_t)* cpixmap); 792 void* sk_pixmap_get_writable_addr(const(sk_pixmap_t)* cpixmap); 793 sk_pixmap_t* sk_pixmap_new(); 794 sk_pixmap_t* sk_pixmap_new_with_params(const(sk_imageinfo_t)* cinfo, const(void)* addr, size_t rowBytes); 795 bool sk_pixmap_read_pixels(const(sk_pixmap_t)* cpixmap, const(sk_imageinfo_t)* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY); 796 void sk_pixmap_reset(sk_pixmap_t* cpixmap); 797 void sk_pixmap_reset_with_params(sk_pixmap_t* cpixmap, const(sk_imageinfo_t)* cinfo, const(void)* addr, size_t rowBytes); 798 bool sk_pixmap_scale_pixels(const(sk_pixmap_t)* cpixmap, const(sk_pixmap_t)* dst, sk_filter_quality_t quality); 799 bool sk_pngencoder_encode(sk_wstream_t* dst, const(sk_pixmap_t)* src, const(sk_pngencoder_options_t)* options); 800 void sk_swizzle_swap_rb(uint32_t* dest, const(uint32_t)* src, int count); 801 bool sk_webpencoder_encode(sk_wstream_t* dst, const(sk_pixmap_t)* src, const(sk_webpencoder_options_t)* options); 802 803 // sk_region.h 804 void sk_region_cliperator_delete(sk_region_cliperator_t* iter); 805 bool sk_region_cliperator_done(sk_region_cliperator_t* iter); 806 sk_region_cliperator_t* sk_region_cliperator_new(const(sk_region_t)* region, const(sk_irect_t)* clip); 807 void sk_region_cliperator_next(sk_region_cliperator_t* iter); 808 void sk_region_cliperator_rect(const(sk_region_cliperator_t)* iter, sk_irect_t* rect); 809 bool sk_region_contains(const(sk_region_t)* r, const(sk_region_t)* region); 810 bool sk_region_contains_point(const(sk_region_t)* r, int x, int y); 811 bool sk_region_contains_rect(const(sk_region_t)* r, const(sk_irect_t)* rect); 812 void sk_region_delete(sk_region_t* r); 813 bool sk_region_get_boundary_path(const(sk_region_t)* r, sk_path_t* path); 814 void sk_region_get_bounds(const(sk_region_t)* r, sk_irect_t* rect); 815 bool sk_region_intersects(const(sk_region_t)* r, const(sk_region_t)* src); 816 bool sk_region_intersects_rect(const(sk_region_t)* r, const(sk_irect_t)* rect); 817 bool sk_region_is_complex(const(sk_region_t)* r); 818 bool sk_region_is_empty(const(sk_region_t)* r); 819 bool sk_region_is_rect(const(sk_region_t)* r); 820 void sk_region_iterator_delete(sk_region_iterator_t* iter); 821 bool sk_region_iterator_done(const(sk_region_iterator_t)* iter); 822 sk_region_iterator_t* sk_region_iterator_new(const(sk_region_t)* region); 823 void sk_region_iterator_next(sk_region_iterator_t* iter); 824 void sk_region_iterator_rect(const(sk_region_iterator_t)* iter, sk_irect_t* rect); 825 bool sk_region_iterator_rewind(sk_region_iterator_t* iter); 826 sk_region_t* sk_region_new(); 827 bool sk_region_op(sk_region_t* r, const(sk_region_t)* region, sk_region_op_t op); 828 bool sk_region_op_rect(sk_region_t* r, const(sk_irect_t)* rect, sk_region_op_t op); 829 bool sk_region_quick_contains(const(sk_region_t)* r, const(sk_irect_t)* rect); 830 bool sk_region_quick_reject(const(sk_region_t)* r, const(sk_region_t)* region); 831 bool sk_region_quick_reject_rect(const(sk_region_t)* r, const(sk_irect_t)* rect); 832 bool sk_region_set_empty(sk_region_t* r); 833 bool sk_region_set_path(sk_region_t* r, const(sk_path_t)* t, const(sk_region_t)* clip); 834 bool sk_region_set_rect(sk_region_t* r, const(sk_irect_t)* rect); 835 bool sk_region_set_rects(sk_region_t* r, const(sk_irect_t)* rects, int count); 836 bool sk_region_set_region(sk_region_t* r, const(sk_region_t)* region); 837 void sk_region_spanerator_delete(sk_region_spanerator_t* iter); 838 sk_region_spanerator_t* sk_region_spanerator_new(const(sk_region_t)* region, int y, int left, int right); 839 bool sk_region_spanerator_next(sk_region_spanerator_t* iter, int* left, int* right); 840 void sk_region_translate(sk_region_t* r, int x, int y); 841 842 // sk_rrect.h 843 bool sk_rrect_contains(const(sk_rrect_t)* rrect, const(sk_rect_t)* rect); 844 void sk_rrect_delete(const(sk_rrect_t)* rrect); 845 float sk_rrect_get_height(const(sk_rrect_t)* rrect); 846 void sk_rrect_get_radii(const(sk_rrect_t)* rrect, sk_rrect_corner_t corner, sk_vector_t* radii); 847 void sk_rrect_get_rect(const(sk_rrect_t)* rrect, sk_rect_t* rect); 848 sk_rrect_type_t sk_rrect_get_type(const(sk_rrect_t)* rrect); 849 float sk_rrect_get_width(const(sk_rrect_t)* rrect); 850 void sk_rrect_inset(sk_rrect_t* rrect, float dx, float dy); 851 bool sk_rrect_is_valid(const(sk_rrect_t)* rrect); 852 sk_rrect_t* sk_rrect_new(); 853 sk_rrect_t* sk_rrect_new_copy(const(sk_rrect_t)* rrect); 854 void sk_rrect_offset(sk_rrect_t* rrect, float dx, float dy); 855 void sk_rrect_outset(sk_rrect_t* rrect, float dx, float dy); 856 void sk_rrect_set_empty(sk_rrect_t* rrect); 857 void sk_rrect_set_nine_patch(sk_rrect_t* rrect, const(sk_rect_t)* rect, float leftRad, float topRad, float rightRad, float bottomRad); 858 void sk_rrect_set_oval(sk_rrect_t* rrect, const(sk_rect_t)* rect); 859 void sk_rrect_set_rect(sk_rrect_t* rrect, const(sk_rect_t)* rect); 860 void sk_rrect_set_rect_radii(sk_rrect_t* rrect, const(sk_rect_t)* rect, const(sk_vector_t)* radii); 861 void sk_rrect_set_rect_xy(sk_rrect_t* rrect, const(sk_rect_t)* rect, float xRad, float yRad); 862 bool sk_rrect_transform(sk_rrect_t* rrect, const(sk_matrix_t)* matrix, sk_rrect_t* dest); 863 864 // sk_runtimeeffect.h 865 // void sk_runtimeeffect_get_child_name(const(sk_runtimeeffect_t)* effect, int index, sk_string_t* name); 866 // size_t sk_runtimeeffect_get_children_count(const(sk_runtimeeffect_t)* effect); 867 // const(sk_runtimeeffect_variable_t)* sk_runtimeeffect_get_input_from_index(const(sk_runtimeeffect_t)* effect, int index); 868 // const(sk_runtimeeffect_variable_t)* sk_runtimeeffect_get_input_from_name(const(sk_runtimeeffect_t)* effect, const(char)* name, size_t len); 869 // void sk_runtimeeffect_get_input_name(const(sk_runtimeeffect_t)* effect, int index, sk_string_t* name); 870 // size_t sk_runtimeeffect_get_input_size(const(sk_runtimeeffect_t)* effect); 871 // size_t sk_runtimeeffect_get_inputs_count(const(sk_runtimeeffect_t)* effect); 872 // sk_runtimeeffect_t* sk_runtimeeffect_make(sk_string_t* sksl, sk_string_t* error); 873 // sk_colorfilter_t* sk_runtimeeffect_make_color_filter(sk_runtimeeffect_t* effect, sk_data_t* inputs, sk_colorfilter_t** children, size_t childCount); 874 // sk_shader_t* sk_runtimeeffect_make_shader(sk_runtimeeffect_t* effect, sk_data_t* inputs, sk_shader_t** children, size_t childCount, const(sk_matrix_t)* localMatrix, bool isOpaque); 875 // void sk_runtimeeffect_unref(sk_runtimeeffect_t* effect); 876 // size_t sk_runtimeeffect_variable_get_offset(const(sk_runtimeeffect_variable_t)* variable); 877 // size_t sk_runtimeeffect_variable_get_size_in_bytes(const(sk_runtimeeffect_variable_t)* variable); 878 879 // sk_shader.h 880 sk_shader_t* sk_shader_new_blend(sk_blendmode_t mode, const(sk_shader_t)* dst, const(sk_shader_t)* src); 881 sk_shader_t* sk_shader_new_color(sk_color_t color); 882 sk_shader_t* sk_shader_new_color4f(const(sk_color4f_t)* color, const(sk_colorspace_t)* colorspace); 883 sk_shader_t* sk_shader_new_empty(); 884 sk_shader_t* sk_shader_new_lerp(float t, const(sk_shader_t)* dst, const(sk_shader_t)* src); 885 sk_shader_t* sk_shader_new_linear_gradient(const(sk_point_t)* points, const(sk_color_t)* colors, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const(sk_matrix_t)* localMatrix); 886 sk_shader_t* sk_shader_new_linear_gradient_color4f(const(sk_point_t)* points, const(sk_color4f_t)* colors, const(sk_colorspace_t)* colorspace, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const(sk_matrix_t)* localMatrix); 887 sk_shader_t* sk_shader_new_perlin_noise_fractal_noise(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, const(sk_isize_t)* tileSize); 888 sk_shader_t* sk_shader_new_perlin_noise_improved_noise(float baseFrequencyX, float baseFrequencyY, int numOctaves, float z); 889 sk_shader_t* sk_shader_new_perlin_noise_turbulence(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, const(sk_isize_t)* tileSize); 890 sk_shader_t* sk_shader_new_radial_gradient(const(sk_point_t)* center, float radius, const(sk_color_t)* colors, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const(sk_matrix_t)* localMatrix); 891 sk_shader_t* sk_shader_new_radial_gradient_color4f(const(sk_point_t)* center, float radius, const(sk_color4f_t)* colors, const(sk_colorspace_t)* colorspace, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const(sk_matrix_t)* localMatrix); 892 sk_shader_t* sk_shader_new_sweep_gradient(const(sk_point_t)* center, const(sk_color_t)* colors, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, float startAngle, float endAngle, const(sk_matrix_t)* localMatrix); 893 sk_shader_t* sk_shader_new_sweep_gradient_color4f(const(sk_point_t)* center, const(sk_color4f_t)* colors, const(sk_colorspace_t)* colorspace, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, float startAngle, float endAngle, const(sk_matrix_t)* localMatrix); 894 sk_shader_t* sk_shader_new_two_point_conical_gradient(const(sk_point_t)* start, float startRadius, const(sk_point_t)* end, float endRadius, const(sk_color_t)* colors, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const(sk_matrix_t)* localMatrix); 895 sk_shader_t* sk_shader_new_two_point_conical_gradient_color4f(const(sk_point_t)* start, float startRadius, const(sk_point_t)* end, float endRadius, const(sk_color4f_t)* colors, const(sk_colorspace_t)* colorspace, const(float)* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const(sk_matrix_t)* localMatrix); 896 void sk_shader_ref(sk_shader_t* shader); 897 void sk_shader_unref(sk_shader_t* shader); 898 sk_shader_t* sk_shader_with_color_filter(const(sk_shader_t)* shader, const(sk_colorfilter_t)* filter); 899 sk_shader_t* sk_shader_with_local_matrix(const(sk_shader_t)* shader, const(sk_matrix_t)* localMatrix); 900 901 // sk_stream.h 902 void sk_dynamicmemorywstream_copy_to(sk_wstream_dynamicmemorystream_t* cstream, void* data); 903 void sk_dynamicmemorywstream_destroy(sk_wstream_dynamicmemorystream_t* cstream); 904 sk_data_t* sk_dynamicmemorywstream_detach_as_data(sk_wstream_dynamicmemorystream_t* cstream); 905 sk_stream_asset_t* sk_dynamicmemorywstream_detach_as_stream(sk_wstream_dynamicmemorystream_t* cstream); 906 sk_wstream_dynamicmemorystream_t* sk_dynamicmemorywstream_new(); 907 bool sk_dynamicmemorywstream_write_to_stream(sk_wstream_dynamicmemorystream_t* cstream, sk_wstream_t* dst); 908 void sk_filestream_destroy(sk_stream_filestream_t* cstream); 909 bool sk_filestream_is_valid(sk_stream_filestream_t* cstream); 910 sk_stream_filestream_t* sk_filestream_new(const(char)* path); 911 void sk_filewstream_destroy(sk_wstream_filestream_t* cstream); 912 bool sk_filewstream_is_valid(sk_wstream_filestream_t* cstream); 913 sk_wstream_filestream_t* sk_filewstream_new(const(char)* path); 914 void sk_memorystream_destroy(sk_stream_memorystream_t* cstream); 915 sk_stream_memorystream_t* sk_memorystream_new(); 916 sk_stream_memorystream_t* sk_memorystream_new_with_data(const(void)* data, size_t length, bool copyData); 917 sk_stream_memorystream_t* sk_memorystream_new_with_length(size_t length); 918 sk_stream_memorystream_t* sk_memorystream_new_with_skdata(sk_data_t* data); 919 void sk_memorystream_set_memory(sk_stream_memorystream_t* cmemorystream, const(void)* data, size_t length, bool copyData); 920 void sk_stream_asset_destroy(sk_stream_asset_t* cstream); 921 void sk_stream_destroy(sk_stream_t* cstream); 922 sk_stream_t* sk_stream_duplicate(sk_stream_t* cstream); 923 sk_stream_t* sk_stream_fork(sk_stream_t* cstream); 924 size_t sk_stream_get_length(sk_stream_t* cstream); 925 const(void)* sk_stream_get_memory_base(sk_stream_t* cstream); 926 size_t sk_stream_get_position(sk_stream_t* cstream); 927 bool sk_stream_has_length(sk_stream_t* cstream); 928 bool sk_stream_has_position(sk_stream_t* cstream); 929 bool sk_stream_is_at_end(sk_stream_t* cstream); 930 bool sk_stream_move(sk_stream_t* cstream, int offset); 931 size_t sk_stream_peek(sk_stream_t* cstream, void* buffer, size_t size); 932 size_t sk_stream_read(sk_stream_t* cstream, void* buffer, size_t size); 933 bool sk_stream_read_bool(sk_stream_t* cstream, bool* buffer); 934 bool sk_stream_read_s16(sk_stream_t* cstream, int16_t* buffer); 935 bool sk_stream_read_s32(sk_stream_t* cstream, int32_t* buffer); 936 bool sk_stream_read_s8(sk_stream_t* cstream, int8_t* buffer); 937 bool sk_stream_read_u16(sk_stream_t* cstream, uint16_t* buffer); 938 bool sk_stream_read_u32(sk_stream_t* cstream, uint32_t* buffer); 939 bool sk_stream_read_u8(sk_stream_t* cstream, ubyte* buffer); 940 bool sk_stream_rewind(sk_stream_t* cstream); 941 bool sk_stream_seek(sk_stream_t* cstream, size_t position); 942 size_t sk_stream_skip(sk_stream_t* cstream, size_t size); 943 size_t sk_wstream_bytes_written(sk_wstream_t* cstream); 944 void sk_wstream_flush(sk_wstream_t* cstream); 945 int sk_wstream_get_size_of_packed_uint(size_t value); 946 bool sk_wstream_newline(sk_wstream_t* cstream); 947 bool sk_wstream_write(sk_wstream_t* cstream, const(void)* buffer, size_t size); 948 bool sk_wstream_write_16(sk_wstream_t* cstream, uint16_t value); 949 bool sk_wstream_write_32(sk_wstream_t* cstream, uint32_t value); 950 bool sk_wstream_write_8(sk_wstream_t* cstream, uint8_t value); 951 bool sk_wstream_write_bigdec_as_text(sk_wstream_t* cstream, int64_t value, int minDigits); 952 bool sk_wstream_write_bool(sk_wstream_t* cstream, bool value); 953 bool sk_wstream_write_dec_as_text(sk_wstream_t* cstream, int32_t value); 954 bool sk_wstream_write_hex_as_text(sk_wstream_t* cstream, uint32_t value, int minDigits); 955 bool sk_wstream_write_packed_uint(sk_wstream_t* cstream, size_t value); 956 bool sk_wstream_write_scalar(sk_wstream_t* cstream, float value); 957 bool sk_wstream_write_scalar_as_text(sk_wstream_t* cstream, float value); 958 bool sk_wstream_write_stream(sk_wstream_t* cstream, sk_stream_t* input, size_t length); 959 bool sk_wstream_write_text(sk_wstream_t* cstream, const(char)* value); 960 961 // sk_string.h 962 void sk_string_destructor(const(sk_string_t)*); 963 const(char)* sk_string_get_c_str(const(sk_string_t)*); 964 size_t sk_string_get_size(const(sk_string_t)*); 965 sk_string_t* sk_string_new_empty(); 966 sk_string_t* sk_string_new_with_copy(const(char)* src, size_t length); 967 968 // sk_surface.h 969 void sk_surface_draw(sk_surface_t* surface, sk_canvas_t* canvas, float x, float y, const(sk_paint_t)* paint); 970 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); 971 const(sk_surfaceprops_t)* sk_surface_get_props(sk_surface_t* surface); 972 sk_surface_t* sk_surface_new_backend_render_target(gr_context_t* context, const(gr_backendrendertarget_t)* target, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_colorspace_t* colorspace, const(sk_surfaceprops_t)* props); 973 sk_surface_t* sk_surface_new_backend_texture(gr_context_t* context, const(gr_backendtexture_t)* texture, gr_surfaceorigin_t origin, int samples, sk_colortype_t colorType, sk_colorspace_t* colorspace, const(sk_surfaceprops_t)* props); 974 sk_surface_t* sk_surface_new_backend_texture_as_render_target(gr_context_t* context, const(gr_backendtexture_t)* texture, gr_surfaceorigin_t origin, int samples, sk_colortype_t colorType, sk_colorspace_t* colorspace, const(sk_surfaceprops_t)* props); 975 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); 976 sk_image_t* sk_surface_new_image_snapshot_with_crop(sk_surface_t* surface, const(sk_irect_t)* bounds); 977 sk_surface_t* sk_surface_new_null(int width, int height); 978 sk_surface_t* sk_surface_new_raster(const(sk_imageinfo_t)*, size_t rowBytes, const(sk_surfaceprops_t)*); 979 sk_surface_t* sk_surface_new_raster_direct(const(sk_imageinfo_t)*, void* pixels, size_t rowBytes, const sk_surface_raster_release_proc releaseProc, void* context, const(sk_surfaceprops_t)* props); 980 sk_surface_t* sk_surface_new_render_target(gr_context_t* context, bool budgeted, const(sk_imageinfo_t)* cinfo, int sampleCount, gr_surfaceorigin_t origin, const(sk_surfaceprops_t)* props, bool shouldCreateWithMips); 981 bool sk_surface_peek_pixels(sk_surface_t* surface, sk_pixmap_t* pixmap); 982 bool sk_surface_read_pixels(sk_surface_t* surface, sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY); 983 void sk_surface_unref(sk_surface_t*); 984 void sk_surfaceprops_delete(sk_surfaceprops_t* props); 985 uint32_t sk_surfaceprops_get_flags(sk_surfaceprops_t* props); 986 sk_pixelgeometry_t sk_surfaceprops_get_pixel_geometry(sk_surfaceprops_t* props); 987 sk_surfaceprops_t* sk_surfaceprops_new(uint32_t flags, sk_pixelgeometry_t geometry); 988 989 // sk_svg.h 990 sk_canvas_t* sk_svgcanvas_create_with_stream(const(sk_rect_t)* bounds, sk_wstream_t* stream); 991 sk_canvas_t* sk_svgcanvas_create_with_writer(const(sk_rect_t)* bounds, sk_xmlwriter_t* writer); 992 993 // sk_textblob.h 994 void sk_textblob_builder_alloc_run(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, float x, float y, const(sk_rect_t)* bounds, sk_textblob_builder_runbuffer_t* runbuffer); 995 void sk_textblob_builder_alloc_run_pos(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, const(sk_rect_t)* bounds, sk_textblob_builder_runbuffer_t* runbuffer); 996 void sk_textblob_builder_alloc_run_pos_h(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, float y, const(sk_rect_t)* bounds, sk_textblob_builder_runbuffer_t* runbuffer); 997 void sk_textblob_builder_alloc_run_rsxform(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, sk_textblob_builder_runbuffer_t* runbuffer); 998 void sk_textblob_builder_alloc_run_text(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, float x, float y, int textByteCount, const(sk_rect_t)* bounds, sk_textblob_builder_runbuffer_t* runbuffer); 999 void sk_textblob_builder_alloc_run_text_pos(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, int textByteCount, const(sk_rect_t)* bounds, sk_textblob_builder_runbuffer_t* runbuffer); 1000 void sk_textblob_builder_alloc_run_text_pos_h(sk_textblob_builder_t* builder, const(sk_font_t)* font, int count, float y, int textByteCount, const(sk_rect_t)* bounds, sk_textblob_builder_runbuffer_t* runbuffer); 1001 void sk_textblob_builder_delete(sk_textblob_builder_t* builder); 1002 sk_textblob_t* sk_textblob_builder_make(sk_textblob_builder_t* builder); 1003 sk_textblob_builder_t* sk_textblob_builder_new(); 1004 void sk_textblob_get_bounds(const(sk_textblob_t)* blob, sk_rect_t* bounds); 1005 int sk_textblob_get_intercepts(const(sk_textblob_t)* blob, const(float)* bounds, float* intervals, const(sk_paint_t)* paint); 1006 uint32_t sk_textblob_get_unique_id(const(sk_textblob_t)* blob); 1007 void sk_textblob_ref(const(sk_textblob_t)* blob); 1008 void sk_textblob_unref(const(sk_textblob_t)* blob); 1009 1010 // sk_typeface.h 1011 int sk_fontmgr_count_families(sk_fontmgr_t*); 1012 sk_fontmgr_t* sk_fontmgr_create_default(); 1013 sk_typeface_t* sk_fontmgr_create_from_data(sk_fontmgr_t*, sk_data_t* data, int index); 1014 sk_typeface_t* sk_fontmgr_create_from_file(sk_fontmgr_t*, const(char)* path, int index); 1015 sk_typeface_t* sk_fontmgr_create_from_stream(sk_fontmgr_t*, sk_stream_asset_t* stream, int index); 1016 sk_fontstyleset_t* sk_fontmgr_create_styleset(sk_fontmgr_t*, int index); 1017 void sk_fontmgr_get_family_name(sk_fontmgr_t*, int index, sk_string_t* familyName); 1018 sk_typeface_t* sk_fontmgr_match_face_style(sk_fontmgr_t*, const(sk_typeface_t)* face, sk_fontstyle_t* style); 1019 sk_fontstyleset_t* sk_fontmgr_match_family(sk_fontmgr_t*, const(char)* familyName); 1020 sk_typeface_t* sk_fontmgr_match_family_style(sk_fontmgr_t*, const(char)* familyName, sk_fontstyle_t* style); 1021 sk_typeface_t* sk_fontmgr_match_family_style_character(sk_fontmgr_t*, const(char)* familyName, sk_fontstyle_t* style, const(char)** bcp47, int bcp47Count, int32_t character); 1022 sk_fontmgr_t* sk_fontmgr_ref_default(); 1023 void sk_fontmgr_unref(sk_fontmgr_t*); 1024 void sk_fontstyle_delete(sk_fontstyle_t* fs); 1025 sk_font_style_slant_t sk_fontstyle_get_slant(const(sk_fontstyle_t)* fs); 1026 int sk_fontstyle_get_weight(const(sk_fontstyle_t)* fs); 1027 int sk_fontstyle_get_width(const(sk_fontstyle_t)* fs); 1028 sk_fontstyle_t* sk_fontstyle_new(int weight, int width, sk_font_style_slant_t slant); 1029 sk_fontstyleset_t* sk_fontstyleset_create_empty(); 1030 sk_typeface_t* sk_fontstyleset_create_typeface(sk_fontstyleset_t* fss, int index); 1031 int sk_fontstyleset_get_count(sk_fontstyleset_t* fss); 1032 void sk_fontstyleset_get_style(sk_fontstyleset_t* fss, int index, sk_fontstyle_t* fs, sk_string_t* style); 1033 sk_typeface_t* sk_fontstyleset_match_style(sk_fontstyleset_t* fss, sk_fontstyle_t* style); 1034 void sk_fontstyleset_unref(sk_fontstyleset_t* fss); 1035 sk_data_t* sk_typeface_copy_table_data(const(sk_typeface_t)* typeface, sk_font_table_tag_t tag); 1036 int sk_typeface_count_glyphs(const(sk_typeface_t)* typeface); 1037 int sk_typeface_count_tables(const(sk_typeface_t)* typeface); 1038 sk_typeface_t* sk_typeface_create_default(); 1039 sk_typeface_t* sk_typeface_create_from_data(sk_data_t* data, int index); 1040 sk_typeface_t* sk_typeface_create_from_file(const(char)* path, int index); 1041 sk_typeface_t* sk_typeface_create_from_name(const(char)* familyName, const(sk_fontstyle_t)* style); 1042 sk_typeface_t* sk_typeface_create_from_stream(sk_stream_asset_t* stream, int index); 1043 sk_string_t* sk_typeface_get_family_name(const(sk_typeface_t)* typeface); 1044 sk_font_style_slant_t sk_typeface_get_font_slant(const(sk_typeface_t)* typeface); 1045 int sk_typeface_get_font_weight(const(sk_typeface_t)* typeface); 1046 int sk_typeface_get_font_width(const(sk_typeface_t)* typeface); 1047 sk_fontstyle_t* sk_typeface_get_fontstyle(const(sk_typeface_t)* typeface); 1048 bool sk_typeface_get_kerning_pair_adjustments(const(sk_typeface_t)* typeface, const(uint16_t)* glyphs, int count, int32_t* adjustments); 1049 void* sk_typeface_get_table_data(const(sk_typeface_t)* typeface, sk_font_table_tag_t tag, size_t offset, size_t length, void* data); 1050 size_t sk_typeface_get_table_size(const(sk_typeface_t)* typeface, sk_font_table_tag_t tag); 1051 int sk_typeface_get_table_tags(const(sk_typeface_t)* typeface, sk_font_table_tag_t* tags); 1052 int sk_typeface_get_units_per_em(const(sk_typeface_t)* typeface); 1053 bool sk_typeface_is_fixed_pitch(const(sk_typeface_t)* typeface); 1054 sk_stream_asset_t* sk_typeface_open_stream(const(sk_typeface_t)* typeface, int* ttcIndex); 1055 sk_typeface_t* sk_typeface_ref_default(); 1056 uint16_t sk_typeface_unichar_to_glyph(const(sk_typeface_t)* typeface, const int32_t unichar); 1057 void sk_typeface_unichars_to_glyphs(const(sk_typeface_t)* typeface, const(int32_t)* unichars, int count, uint16_t* glyphs); 1058 void sk_typeface_unref(sk_typeface_t* typeface); 1059 1060 // sk_vertices.h 1061 sk_vertices_t* sk_vertices_make_copy(sk_vertices_vertex_mode_t vmode, int vertexCount, const(sk_point_t)* positions, const(sk_point_t)* texs, const(sk_color_t)* colors, int indexCount, const(uint16_t)* indices); 1062 void sk_vertices_ref(sk_vertices_t* cvertices); 1063 void sk_vertices_unref(sk_vertices_t* cvertices); 1064 1065 // sk_xml.h 1066 void sk_xmlstreamwriter_delete(sk_xmlstreamwriter_t* writer); 1067 sk_xmlstreamwriter_t* sk_xmlstreamwriter_new(sk_wstream_t* stream); 1068 1069 // sk_compatpaint.h 1070 sk_compatpaint_t* sk_compatpaint_clone(const(sk_compatpaint_t)* paint); 1071 void sk_compatpaint_delete(sk_compatpaint_t* paint); 1072 sk_font_t* sk_compatpaint_get_font(sk_compatpaint_t* paint); 1073 sk_text_align_t sk_compatpaint_get_text_align(const(sk_compatpaint_t)* paint); 1074 sk_text_encoding_t sk_compatpaint_get_text_encoding(const(sk_compatpaint_t)* paint); 1075 sk_font_t* sk_compatpaint_make_font(sk_compatpaint_t* paint); 1076 sk_compatpaint_t* sk_compatpaint_new(); 1077 sk_compatpaint_t* sk_compatpaint_new_with_font(const(sk_font_t)* font); 1078 void sk_compatpaint_reset(sk_compatpaint_t* paint); 1079 void sk_compatpaint_set_text_align(sk_compatpaint_t* paint, sk_text_align_t textAlign); 1080 void sk_compatpaint_set_text_encoding(sk_compatpaint_t* paint, sk_text_encoding_t encoding); 1081 1082 // sk_manageddrawable.h 1083 sk_manageddrawable_t* sk_manageddrawable_new(void* context); 1084 void sk_manageddrawable_set_procs(sk_manageddrawable_procs_t procs); 1085 void sk_manageddrawable_unref(sk_manageddrawable_t*); 1086 1087 // sk_managedstream.h 1088 void sk_managedstream_destroy(sk_stream_managedstream_t* s); 1089 sk_stream_managedstream_t* sk_managedstream_new(void* context); 1090 void sk_managedstream_set_procs(sk_managedstream_procs_t procs); 1091 void sk_managedwstream_destroy(sk_wstream_managedstream_t* s); 1092 sk_wstream_managedstream_t* sk_managedwstream_new(void* context); 1093 void sk_managedwstream_set_procs(sk_managedwstream_procs_t procs); 1094 1095 // sk_managedtracememorydump.h 1096 void sk_managedtracememorydump_delete(sk_managedtracememorydump_t*); 1097 sk_managedtracememorydump_t* sk_managedtracememorydump_new(bool detailed, bool dumpWrapped, void* context); 1098 void sk_managedtracememorydump_set_procs(sk_managedtracememorydump_procs_t procs); 1099 } 1100 1101 // Start functions 1102 1103 struct SkiaApi 1104 { 1105 // for header: gr_context.h 1106 1107 // void gr_backendrendertarget_delete(gr_backendrendertarget_t* rendertarget) 1108 static void gr_backendrendertarget_delete (gr_backendrendertarget_t* rendertarget) 1109 { 1110 .gr_backendrendertarget_delete (rendertarget); 1111 } 1112 1113 // gr_backend_t gr_backendrendertarget_get_backend(const gr_backendrendertarget_t* rendertarget) 1114 static GRBackendNative gr_backendrendertarget_get_backend (gr_backendrendertarget_t* rendertarget) 1115 { 1116 return .gr_backendrendertarget_get_backend (rendertarget); 1117 } 1118 1119 // bool gr_backendrendertarget_get_gl_framebufferinfo(const gr_backendrendertarget_t* rendertarget, gr_gl_framebufferinfo_t* glInfo) 1120 static bool gr_backendrendertarget_get_gl_framebufferinfo (gr_backendrendertarget_t* rendertarget, GRGlFramebufferInfo* glInfo) 1121 { 1122 return .gr_backendrendertarget_get_gl_framebufferinfo (rendertarget, glInfo); 1123 } 1124 1125 // int gr_backendrendertarget_get_height(const gr_backendrendertarget_t* rendertarget) 1126 static int gr_backendrendertarget_get_height (gr_backendrendertarget_t* rendertarget) 1127 { 1128 return .gr_backendrendertarget_get_height (rendertarget); 1129 } 1130 1131 // int gr_backendrendertarget_get_samples(const gr_backendrendertarget_t* rendertarget) 1132 static int gr_backendrendertarget_get_samples (gr_backendrendertarget_t* rendertarget) 1133 { 1134 return .gr_backendrendertarget_get_samples (rendertarget); 1135 } 1136 1137 // int gr_backendrendertarget_get_stencils(const gr_backendrendertarget_t* rendertarget) 1138 static int gr_backendrendertarget_get_stencils (gr_backendrendertarget_t* rendertarget) 1139 { 1140 return .gr_backendrendertarget_get_stencils (rendertarget); 1141 } 1142 1143 // int gr_backendrendertarget_get_width(const gr_backendrendertarget_t* rendertarget) 1144 static int gr_backendrendertarget_get_width (gr_backendrendertarget_t* rendertarget) 1145 { 1146 return .gr_backendrendertarget_get_width (rendertarget); 1147 } 1148 1149 // bool gr_backendrendertarget_is_valid(const gr_backendrendertarget_t* rendertarget) 1150 static bool gr_backendrendertarget_is_valid (gr_backendrendertarget_t* rendertarget) 1151 { 1152 return .gr_backendrendertarget_is_valid (rendertarget); 1153 } 1154 1155 // gr_backendrendertarget_t* gr_backendrendertarget_new_gl(int width, int height, int samples, int stencils, const gr_gl_framebufferinfo_t* glInfo) 1156 static gr_backendrendertarget_t* gr_backendrendertarget_new_gl (int width, int height, int samples, int stencils, GRGlFramebufferInfo* glInfo) 1157 { 1158 return .gr_backendrendertarget_new_gl (width, height, samples, stencils, glInfo); 1159 } 1160 1161 // gr_backendrendertarget_t* gr_backendrendertarget_new_vulkan(int width, int height, int samples, const gr_vk_imageinfo_t* vkImageInfo) 1162 static gr_backendrendertarget_t* gr_backendrendertarget_new_vulkan (int width, int height, int samples, GRVkImageInfo* vkImageInfo) 1163 { 1164 return .gr_backendrendertarget_new_vulkan (width, height, samples, vkImageInfo); 1165 } 1166 1167 // void gr_backendtexture_delete(gr_backendtexture_t* texture) 1168 static void gr_backendtexture_delete (gr_backendtexture_t* texture) 1169 { 1170 .gr_backendtexture_delete (texture); 1171 } 1172 1173 // gr_backend_t gr_backendtexture_get_backend(const gr_backendtexture_t* texture) 1174 static GRBackendNative gr_backendtexture_get_backend (gr_backendtexture_t* texture) 1175 { 1176 return .gr_backendtexture_get_backend (texture); 1177 } 1178 1179 // bool gr_backendtexture_get_gl_textureinfo(const gr_backendtexture_t* texture, gr_gl_textureinfo_t* glInfo) 1180 static bool gr_backendtexture_get_gl_textureinfo (gr_backendtexture_t* texture, GRGlTextureInfo* glInfo) 1181 { 1182 return .gr_backendtexture_get_gl_textureinfo (texture, glInfo); 1183 } 1184 1185 // int gr_backendtexture_get_height(const gr_backendtexture_t* texture) 1186 static int gr_backendtexture_get_height (gr_backendtexture_t* texture) 1187 { 1188 return .gr_backendtexture_get_height (texture); 1189 } 1190 1191 // int gr_backendtexture_get_width(const gr_backendtexture_t* texture) 1192 static int gr_backendtexture_get_width (gr_backendtexture_t* texture) 1193 { 1194 return .gr_backendtexture_get_width (texture); 1195 } 1196 1197 // bool gr_backendtexture_has_mipmaps(const gr_backendtexture_t* texture) 1198 static bool gr_backendtexture_has_mipmaps (gr_backendtexture_t* texture) 1199 { 1200 return .gr_backendtexture_has_mipmaps (texture); 1201 } 1202 1203 // bool gr_backendtexture_is_valid(const gr_backendtexture_t* texture) 1204 static bool gr_backendtexture_is_valid (gr_backendtexture_t* texture) 1205 { 1206 return .gr_backendtexture_is_valid (texture); 1207 } 1208 1209 // gr_backendtexture_t* gr_backendtexture_new_gl(int width, int height, bool mipmapped, const gr_gl_textureinfo_t* glInfo) 1210 static gr_backendtexture_t* gr_backendtexture_new_gl (int width, int height, bool mipmapped, GRGlTextureInfo* glInfo) 1211 { 1212 return .gr_backendtexture_new_gl (width, height, mipmapped, glInfo); 1213 } 1214 1215 // gr_backendtexture_t* gr_backendtexture_new_vulkan(int width, int height, const gr_vk_imageinfo_t* vkInfo) 1216 static gr_backendtexture_t* gr_backendtexture_new_vulkan (int width, int height, GRVkImageInfo* vkInfo) 1217 { 1218 return .gr_backendtexture_new_vulkan (width, height, vkInfo); 1219 } 1220 1221 // void gr_context_abandon_context(gr_context_t* context) 1222 static void gr_context_abandon_context (gr_context_t* context) 1223 { 1224 .gr_context_abandon_context (context); 1225 } 1226 1227 // void gr_context_dump_memory_statistics(const gr_context_t* context, sk_tracememorydump_t* dump) 1228 static void gr_context_dump_memory_statistics (gr_context_t* context, sk_tracememorydump_t* dump) 1229 { 1230 .gr_context_dump_memory_statistics (context, dump); 1231 } 1232 1233 // void gr_context_flush(gr_context_t* context) 1234 static void gr_context_flush (gr_context_t* context) 1235 { 1236 .gr_context_flush (context); 1237 } 1238 1239 // void gr_context_free_gpu_resources(gr_context_t* context) 1240 static void gr_context_free_gpu_resources (gr_context_t* context) 1241 { 1242 .gr_context_free_gpu_resources (context); 1243 } 1244 1245 // gr_backend_t gr_context_get_backend(gr_context_t* context) 1246 static GRBackendNative gr_context_get_backend (gr_context_t* context) 1247 { 1248 return .gr_context_get_backend (context); 1249 } 1250 1251 // int gr_context_get_max_surface_sample_count_for_color_type(gr_context_t* context, sk_colortype_t colorType) 1252 static int gr_context_get_max_surface_sample_count_for_color_type (gr_context_t* context, SKColorTypeNative colorType) 1253 { 1254 return .gr_context_get_max_surface_sample_count_for_color_type (context, colorType); 1255 } 1256 1257 // size_t gr_context_get_resource_cache_limit(gr_context_t* context) 1258 static size_t gr_context_get_resource_cache_limit (gr_context_t* context) 1259 { 1260 return .gr_context_get_resource_cache_limit (context); 1261 } 1262 1263 // void gr_context_get_resource_cache_usage(gr_context_t* context, int* maxResources, size_t* maxResourceBytes) 1264 static void gr_context_get_resource_cache_usage (gr_context_t* context, int* maxResources, size_t* maxResourceBytes) 1265 { 1266 .gr_context_get_resource_cache_usage (context, maxResources, maxResourceBytes); 1267 } 1268 1269 // gr_context_t* gr_context_make_gl(const gr_glinterface_t* glInterface) 1270 static gr_context_t* gr_context_make_gl (gr_glinterface_t* glInterface) 1271 { 1272 return .gr_context_make_gl (glInterface); 1273 } 1274 1275 // gr_context_t* gr_context_make_vulkan(const gr_vk_backendcontext_t vkBackendContext) 1276 static gr_context_t* gr_context_make_vulkan (GRVkBackendContextNative vkBackendContext) 1277 { 1278 return .gr_context_make_vulkan (vkBackendContext); 1279 } 1280 1281 // void gr_context_perform_deferred_cleanup(gr_context_t* context, long ms) 1282 static void gr_context_perform_deferred_cleanup (gr_context_t* context, long ms) 1283 { 1284 .gr_context_perform_deferred_cleanup (context, ms); 1285 } 1286 1287 // void gr_context_purge_unlocked_resources(gr_context_t* context, bool scratchResourcesOnly) 1288 static void gr_context_purge_unlocked_resources (gr_context_t* context, bool scratchResourcesOnly) 1289 { 1290 .gr_context_purge_unlocked_resources (context, scratchResourcesOnly); 1291 } 1292 1293 // void gr_context_purge_unlocked_resources_bytes(gr_context_t* context, size_t bytesToPurge, bool preferScratchResources) 1294 static void gr_context_purge_unlocked_resources_bytes (gr_context_t* context, size_t bytesToPurge, bool preferScratchResources) 1295 { 1296 .gr_context_purge_unlocked_resources_bytes (context, bytesToPurge, preferScratchResources); 1297 } 1298 1299 // void gr_context_release_resources_and_abandon_context(gr_context_t* context) 1300 static void gr_context_release_resources_and_abandon_context (gr_context_t* context) 1301 { 1302 .gr_context_release_resources_and_abandon_context (context); 1303 } 1304 1305 // void gr_context_reset_context(gr_context_t* context, uint32_t state) 1306 static void gr_context_reset_context (gr_context_t* context, uint state) 1307 { 1308 .gr_context_reset_context (context, state); 1309 } 1310 1311 // void gr_context_set_resource_cache_limit(gr_context_t* context, size_t maxResourceBytes) 1312 static void gr_context_set_resource_cache_limit (gr_context_t* context, size_t maxResourceBytes) 1313 { 1314 .gr_context_set_resource_cache_limit (context, maxResourceBytes); 1315 } 1316 1317 // void gr_context_unref(gr_context_t* context) 1318 static void gr_context_unref (gr_context_t* context) 1319 { 1320 .gr_context_unref (context); 1321 } 1322 1323 // const gr_glinterface_t* gr_glinterface_assemble_gl_interface(void* ctx, gr_gl_get_proc get) 1324 static gr_glinterface_t* gr_glinterface_assemble_gl_interface (void* ctx, GRGlGetProcProxyDelegate get) 1325 { 1326 return .gr_glinterface_assemble_gl_interface (ctx, get); 1327 } 1328 1329 // const gr_glinterface_t* gr_glinterface_assemble_gles_interface(void* ctx, gr_gl_get_proc get) 1330 static gr_glinterface_t* gr_glinterface_assemble_gles_interface (void* ctx, GRGlGetProcProxyDelegate get) 1331 { 1332 return .gr_glinterface_assemble_gles_interface (ctx, get); 1333 } 1334 1335 // const gr_glinterface_t* gr_glinterface_assemble_interface(void* ctx, gr_gl_get_proc get) 1336 static gr_glinterface_t* gr_glinterface_assemble_interface (void* ctx, GRGlGetProcProxyDelegate get) 1337 { 1338 return .gr_glinterface_assemble_interface (ctx, get); 1339 } 1340 1341 // const gr_glinterface_t* gr_glinterface_assemble_webgl_interface(void* ctx, gr_gl_get_proc get) 1342 static gr_glinterface_t* gr_glinterface_assemble_webgl_interface (void* ctx, GRGlGetProcProxyDelegate get) 1343 { 1344 return .gr_glinterface_assemble_webgl_interface (ctx, get); 1345 } 1346 1347 // const gr_glinterface_t* gr_glinterface_create_native_interface() 1348 static gr_glinterface_t* gr_glinterface_create_native_interface () 1349 { 1350 return .gr_glinterface_create_native_interface (); 1351 } 1352 1353 // bool gr_glinterface_has_extension(const gr_glinterface_t* glInterface, const(char)* extension) 1354 static bool gr_glinterface_has_extension (gr_glinterface_t* glInterface, string extension) 1355 { 1356 return .gr_glinterface_has_extension (glInterface, std..string.toStringz(extension)); 1357 } 1358 1359 // void gr_glinterface_unref(const gr_glinterface_t* glInterface) 1360 static void gr_glinterface_unref (gr_glinterface_t* glInterface) 1361 { 1362 .gr_glinterface_unref (glInterface); 1363 } 1364 1365 // bool gr_glinterface_validate(const gr_glinterface_t* glInterface) 1366 static bool gr_glinterface_validate (gr_glinterface_t* glInterface) 1367 { 1368 return .gr_glinterface_validate (glInterface); 1369 } 1370 1371 // void gr_vk_extensions_delete(gr_vk_extensions_t* extensions) 1372 static void gr_vk_extensions_delete (gr_vk_extensions_t* extensions) 1373 { 1374 .gr_vk_extensions_delete (extensions); 1375 } 1376 1377 // bool gr_vk_extensions_has_extension(gr_vk_extensions_t* extensions, const(char)* ext, uint32_t minVersion) 1378 static bool gr_vk_extensions_has_extension (gr_vk_extensions_t* extensions, string ext, uint minVersion) 1379 { 1380 return .gr_vk_extensions_has_extension (extensions, ext.toStringz(), minVersion); 1381 } 1382 1383 // void gr_vk_extensions_init(gr_vk_extensions_t* extensions, gr_vk_get_proc getProc, void* userData, vk_instance_t* instance, vk_physical_device_t* physDev, uint32_t instanceExtensionCount, const(char)** instanceExtensions, uint32_t deviceExtensionCount, const(char)** deviceExtensions) 1384 static void gr_vk_extensions_init (gr_vk_extensions_t* extensions, GRVkGetProcProxyDelegate getProc, void* userData, vk_instance_t* instance, vk_physical_device_t* physDev, uint instanceExtensionCount, string[] instanceExtensions, uint deviceExtensionCount, string[] deviceExtensions) 1385 { 1386 const(char)*[] instanceExtens = toCStrings(instanceExtensions); 1387 const(char)*[] deviceExtens = toCStrings(deviceExtensions); 1388 1389 .gr_vk_extensions_init (extensions, getProc, userData, instance, physDev, instanceExtensionCount, instanceExtens.ptr, deviceExtensionCount, deviceExtens.ptr); 1390 } 1391 1392 // gr_vk_extensions_t* gr_vk_extensions_new() 1393 static gr_vk_extensions_t* gr_vk_extensions_new () 1394 { 1395 return .gr_vk_extensions_new (); 1396 } 1397 1398 // end header: gr_context.h 1399 1400 // for header: sk_bitmap.h 1401 1402 // void sk_bitmap_destructor(sk_bitmap_t* cbitmap) 1403 static void sk_bitmap_destructor (sk_bitmap_t* cbitmap) 1404 { 1405 .sk_bitmap_destructor (cbitmap); 1406 } 1407 1408 // void sk_bitmap_erase(sk_bitmap_t* cbitmap, sk_color_t color) 1409 static void sk_bitmap_erase (sk_bitmap_t* cbitmap, uint color) 1410 { 1411 .sk_bitmap_erase (cbitmap, color); 1412 } 1413 1414 // void sk_bitmap_erase_rect(sk_bitmap_t* cbitmap, sk_color_t color, sk_irect_t* rect) 1415 static void sk_bitmap_erase_rect (sk_bitmap_t* cbitmap, uint color, SKRectI* rect) 1416 { 1417 .sk_bitmap_erase_rect (cbitmap, color, rect); 1418 } 1419 1420 // bool sk_bitmap_extract_alpha(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, const sk_paint_t* paint, sk_ipoint_t* offset) 1421 static bool sk_bitmap_extract_alpha (sk_bitmap_t* cbitmap, sk_bitmap_t* dst, sk_paint_t* paint, SKPointI* offset) 1422 { 1423 return .sk_bitmap_extract_alpha (cbitmap, dst, paint, offset); 1424 } 1425 1426 // bool sk_bitmap_extract_subset(sk_bitmap_t* cbitmap, sk_bitmap_t* dst, sk_irect_t* subset) 1427 static bool sk_bitmap_extract_subset (sk_bitmap_t* cbitmap, sk_bitmap_t* dst, SKRectI* subset) 1428 { 1429 return .sk_bitmap_extract_subset (cbitmap, dst, subset); 1430 } 1431 1432 // void* sk_bitmap_get_addr(sk_bitmap_t* cbitmap, int x, int y) 1433 static void* sk_bitmap_get_addr (sk_bitmap_t* cbitmap, int x, int y) 1434 { 1435 return .sk_bitmap_get_addr (cbitmap, x, y); 1436 } 1437 1438 // uint16_t* sk_bitmap_get_addr_16(sk_bitmap_t* cbitmap, int x, int y) 1439 static ushort* sk_bitmap_get_addr_16 (sk_bitmap_t* cbitmap, int x, int y) 1440 { 1441 return .sk_bitmap_get_addr_16 (cbitmap, x, y); 1442 } 1443 1444 // uint32_t* sk_bitmap_get_addr_32(sk_bitmap_t* cbitmap, int x, int y) 1445 static uint* sk_bitmap_get_addr_32 (sk_bitmap_t* cbitmap, int x, int y) 1446 { 1447 return .sk_bitmap_get_addr_32 (cbitmap, x, y); 1448 } 1449 1450 // uint8_t* sk_bitmap_get_addr_8(sk_bitmap_t* cbitmap, int x, int y) 1451 static ubyte* sk_bitmap_get_addr_8 (sk_bitmap_t* cbitmap, int x, int y) 1452 { 1453 return cast(ubyte*).sk_bitmap_get_addr_8 (cbitmap, x, y); 1454 } 1455 1456 // size_t sk_bitmap_get_byte_count(sk_bitmap_t* cbitmap) 1457 static size_t sk_bitmap_get_byte_count (sk_bitmap_t* cbitmap) 1458 { 1459 return .sk_bitmap_get_byte_count (cbitmap); 1460 } 1461 1462 // void sk_bitmap_get_info(sk_bitmap_t* cbitmap, sk_imageinfo_t* info) 1463 static void sk_bitmap_get_info (sk_bitmap_t* cbitmap, SKImageInfoNative* info) 1464 { 1465 .sk_bitmap_get_info (cbitmap, info); 1466 } 1467 1468 // sk_color_t sk_bitmap_get_pixel_color(sk_bitmap_t* cbitmap, int x, int y) 1469 static uint sk_bitmap_get_pixel_color (sk_bitmap_t* cbitmap, int x, int y) 1470 { 1471 return .sk_bitmap_get_pixel_color (cbitmap, x, y); 1472 } 1473 1474 // void sk_bitmap_get_pixel_colors(sk_bitmap_t* cbitmap, sk_color_t* colors) 1475 static void sk_bitmap_get_pixel_colors (sk_bitmap_t* cbitmap, uint* colors) 1476 { 1477 .sk_bitmap_get_pixel_colors (cbitmap, colors); 1478 } 1479 1480 // void* sk_bitmap_get_pixels(sk_bitmap_t* cbitmap, size_t* length) 1481 static void* sk_bitmap_get_pixels (sk_bitmap_t* cbitmap, size_t* length) 1482 { 1483 return .sk_bitmap_get_pixels (cbitmap, length); 1484 } 1485 1486 // size_t sk_bitmap_get_row_bytes(sk_bitmap_t* cbitmap) 1487 static size_t sk_bitmap_get_row_bytes (sk_bitmap_t* cbitmap) 1488 { 1489 return .sk_bitmap_get_row_bytes (cbitmap); 1490 } 1491 1492 // bool sk_bitmap_install_mask_pixels(sk_bitmap_t* cbitmap, const sk_mask_t* cmask) 1493 static bool sk_bitmap_install_mask_pixels (sk_bitmap_t* cbitmap, SKMask* cmask) 1494 { 1495 return .sk_bitmap_install_mask_pixels (cbitmap, cmask); 1496 } 1497 1498 // bool sk_bitmap_install_pixels(sk_bitmap_t* cbitmap, const sk_imageinfo_t* cinfo, void* pixels, size_t rowBytes, const sk_bitmap_release_proc releaseProc, void* context) 1499 static bool sk_bitmap_install_pixels (sk_bitmap_t* cbitmap, SKImageInfoNative* cinfo, void* pixels, size_t rowBytes, SKBitmapReleaseProxyDelegate releaseProc, void* context) 1500 { 1501 return .sk_bitmap_install_pixels (cbitmap, cinfo, pixels, rowBytes, releaseProc, context); 1502 } 1503 1504 // bool sk_bitmap_install_pixels_with_pixmap(sk_bitmap_t* cbitmap, const sk_pixmap_t* cpixmap) 1505 static bool sk_bitmap_install_pixels_with_pixmap (sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap) 1506 { 1507 return .sk_bitmap_install_pixels_with_pixmap (cbitmap, cpixmap); 1508 } 1509 1510 // bool sk_bitmap_is_immutable(sk_bitmap_t* cbitmap) 1511 static bool sk_bitmap_is_immutable (sk_bitmap_t* cbitmap) 1512 { 1513 return .sk_bitmap_is_immutable (cbitmap); 1514 } 1515 1516 // bool sk_bitmap_is_null(sk_bitmap_t* cbitmap) 1517 static bool sk_bitmap_is_null (sk_bitmap_t* cbitmap) 1518 { 1519 return .sk_bitmap_is_null (cbitmap); 1520 } 1521 1522 // bool sk_bitmap_is_volatile(sk_bitmap_t* cbitmap) 1523 static bool sk_bitmap_is_volatile (sk_bitmap_t* cbitmap) 1524 { 1525 return .sk_bitmap_is_volatile (cbitmap); 1526 } 1527 1528 // sk_shader_t* sk_bitmap_make_shader(sk_bitmap_t* cbitmap, sk_shader_tilemode_t tmx, sk_shader_tilemode_t tmy, const sk_matrix_t* cmatrix) 1529 static sk_shader_t* sk_bitmap_make_shader (sk_bitmap_t* cbitmap, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix* cmatrix) 1530 { 1531 return .sk_bitmap_make_shader (cbitmap, tmx, tmy, cmatrix); 1532 } 1533 1534 // sk_bitmap_t* sk_bitmap_new() 1535 static sk_bitmap_t* sk_bitmap_new () 1536 { 1537 return .sk_bitmap_new (); 1538 } 1539 1540 // void sk_bitmap_notify_pixels_changed(sk_bitmap_t* cbitmap) 1541 static void sk_bitmap_notify_pixels_changed (sk_bitmap_t* cbitmap) 1542 { 1543 .sk_bitmap_notify_pixels_changed (cbitmap); 1544 } 1545 1546 // bool sk_bitmap_peek_pixels(sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap) 1547 static bool sk_bitmap_peek_pixels (sk_bitmap_t* cbitmap, sk_pixmap_t* cpixmap) 1548 { 1549 return .sk_bitmap_peek_pixels (cbitmap, cpixmap); 1550 } 1551 1552 // bool sk_bitmap_ready_to_draw(sk_bitmap_t* cbitmap) 1553 static bool sk_bitmap_ready_to_draw (sk_bitmap_t* cbitmap) 1554 { 1555 return .sk_bitmap_ready_to_draw (cbitmap); 1556 } 1557 1558 // void sk_bitmap_reset(sk_bitmap_t* cbitmap) 1559 static void sk_bitmap_reset (sk_bitmap_t* cbitmap) 1560 { 1561 .sk_bitmap_reset (cbitmap); 1562 } 1563 1564 // void sk_bitmap_set_immutable(sk_bitmap_t* cbitmap) 1565 static void sk_bitmap_set_immutable (sk_bitmap_t* cbitmap) 1566 { 1567 .sk_bitmap_set_immutable (cbitmap); 1568 } 1569 1570 // void sk_bitmap_set_pixels(sk_bitmap_t* cbitmap, void* pixels) 1571 static void sk_bitmap_set_pixels (sk_bitmap_t* cbitmap, void* pixels) 1572 { 1573 .sk_bitmap_set_pixels (cbitmap, pixels); 1574 } 1575 1576 // void sk_bitmap_set_volatile(sk_bitmap_t* cbitmap, bool value) 1577 static void sk_bitmap_set_volatile (sk_bitmap_t* cbitmap, bool value) 1578 { 1579 .sk_bitmap_set_volatile (cbitmap, value); 1580 } 1581 1582 // void sk_bitmap_swap(sk_bitmap_t* cbitmap, sk_bitmap_t* cother) 1583 static void sk_bitmap_swap (sk_bitmap_t* cbitmap, sk_bitmap_t* cother) 1584 { 1585 .sk_bitmap_swap (cbitmap, cother); 1586 } 1587 1588 // bool sk_bitmap_try_alloc_pixels(sk_bitmap_t* cbitmap, const sk_imageinfo_t* requestedInfo, size_t rowBytes) 1589 static bool sk_bitmap_try_alloc_pixels (sk_bitmap_t* cbitmap, SKImageInfoNative* requestedInfo, size_t rowBytes) 1590 { 1591 return .sk_bitmap_try_alloc_pixels (cbitmap, requestedInfo, rowBytes); 1592 } 1593 1594 // bool sk_bitmap_try_alloc_pixels_with_flags(sk_bitmap_t* cbitmap, const sk_imageinfo_t* requestedInfo, uint32_t flags) 1595 static bool sk_bitmap_try_alloc_pixels_with_flags (sk_bitmap_t* cbitmap, SKImageInfoNative* requestedInfo, uint flags) 1596 { 1597 return .sk_bitmap_try_alloc_pixels_with_flags (cbitmap, requestedInfo, flags); 1598 } 1599 1600 // end header: sk_bitmap.h 1601 1602 // for header: sk_canvas.h 1603 1604 // void sk_canvas_clear(sk_canvas_t*, sk_color_t) 1605 static void sk_canvas_clear (sk_canvas_t* param0, uint param1) 1606 { 1607 .sk_canvas_clear (param0, param1); 1608 } 1609 1610 // void sk_canvas_clip_path_with_operation(sk_canvas_t* t, const sk_path_t* crect, sk_clipop_t op, bool doAA) 1611 static void sk_canvas_clip_path_with_operation (sk_canvas_t* t, sk_path_t* crect, SKClipOperation op, bool doAA) 1612 { 1613 .sk_canvas_clip_path_with_operation (t, crect, op, doAA); 1614 } 1615 1616 // void sk_canvas_clip_rect_with_operation(sk_canvas_t* t, const sk_rect_t* crect, sk_clipop_t op, bool doAA) 1617 static void sk_canvas_clip_rect_with_operation (sk_canvas_t* t, SKRect* crect, SKClipOperation op, bool doAA) 1618 { 1619 .sk_canvas_clip_rect_with_operation (t, crect, op, doAA); 1620 } 1621 1622 // void sk_canvas_clip_region(sk_canvas_t* canvas, const sk_region_t* region, sk_clipop_t op) 1623 static void sk_canvas_clip_region (sk_canvas_t* canvas, sk_region_t* region, SKClipOperation op) 1624 { 1625 .sk_canvas_clip_region (canvas, region, op); 1626 } 1627 1628 // void sk_canvas_clip_rrect_with_operation(sk_canvas_t* t, const sk_rrect_t* crect, sk_clipop_t op, bool doAA) 1629 static void sk_canvas_clip_rrect_with_operation (sk_canvas_t* t, sk_rrect_t* crect, SKClipOperation op, bool doAA) 1630 { 1631 .sk_canvas_clip_rrect_with_operation (t, crect, op, doAA); 1632 } 1633 1634 // void sk_canvas_concat(sk_canvas_t*, const sk_matrix_t*) 1635 static void sk_canvas_concat (sk_canvas_t* param0, SKMatrix* param1) 1636 { 1637 .sk_canvas_concat (param0, param1); 1638 } 1639 1640 // void sk_canvas_destroy(sk_canvas_t*) 1641 static void sk_canvas_destroy (sk_canvas_t* param0) 1642 { 1643 .sk_canvas_destroy (param0); 1644 } 1645 1646 // void sk_canvas_discard(sk_canvas_t*) 1647 static void sk_canvas_discard (sk_canvas_t* param0) 1648 { 1649 .sk_canvas_discard (param0); 1650 } 1651 1652 // void sk_canvas_draw_annotation(sk_canvas_t* t, const sk_rect_t* rect, const(char)* key, sk_data_t* value) 1653 static void sk_canvas_draw_annotation (sk_canvas_t* t, SKRect* rect, string key, sk_data_t* value) 1654 { 1655 .sk_canvas_draw_annotation (t, rect, key.toStringz(), value); 1656 } 1657 1658 // void sk_canvas_draw_arc(sk_canvas_t* ccanvas, const sk_rect_t* oval, float startAngle, float sweepAngle, bool useCenter, const sk_paint_t* paint) 1659 static void sk_canvas_draw_arc (sk_canvas_t* ccanvas, SKRect* oval, float startAngle, float sweepAngle, bool useCenter, sk_paint_t* paint) 1660 { 1661 .sk_canvas_draw_arc (ccanvas, oval, startAngle, sweepAngle, useCenter, paint); 1662 } 1663 1664 // void sk_canvas_draw_atlas(sk_canvas_t* ccanvas, const sk_image_t* atlas, const sk_rsxform_t* xform, const sk_rect_t* tex, const sk_color_t* colors, int count, sk_blendmode_t mode, const sk_rect_t* cullRect, const sk_paint_t* paint) 1665 static void sk_canvas_draw_atlas (sk_canvas_t* ccanvas, sk_image_t* atlas, SKRotationScaleMatrix* xform, SKRect* tex, uint* colors, int count, SKBlendMode mode, SKRect* cullRect, sk_paint_t* paint) 1666 { 1667 .sk_canvas_draw_atlas (ccanvas, atlas, xform, tex, colors, count, mode, cullRect, paint); 1668 } 1669 1670 // void sk_canvas_draw_bitmap(sk_canvas_t* ccanvas, const sk_bitmap_t* bitmap, float left, float top, const sk_paint_t* paint) 1671 static void sk_canvas_draw_bitmap (sk_canvas_t* ccanvas, sk_bitmap_t* bitmap, float left, float top, sk_paint_t* paint) 1672 { 1673 .sk_canvas_draw_bitmap (ccanvas, bitmap, left, top, paint); 1674 } 1675 1676 // void sk_canvas_draw_bitmap_lattice(sk_canvas_t* t, const sk_bitmap_t* bitmap, const sk_lattice_t* lattice, const sk_rect_t* dst, const sk_paint_t* paint) 1677 static void sk_canvas_draw_bitmap_lattice (sk_canvas_t* t, sk_bitmap_t* bitmap, SKLatticeInternal* lattice, SKRect* dst, sk_paint_t* paint) { 1678 .sk_canvas_draw_bitmap_lattice(t, bitmap, lattice, dst, paint); 1679 } 1680 1681 // void sk_canvas_draw_bitmap_nine(sk_canvas_t* t, const sk_bitmap_t* bitmap, const sk_irect_t* center, const sk_rect_t* dst, const sk_paint_t* paint) 1682 static void sk_canvas_draw_bitmap_nine (sk_canvas_t* t, sk_bitmap_t* bitmap, SKRectI* center, SKRect* dst, sk_paint_t* paint) { 1683 .sk_canvas_draw_bitmap_nine(t, bitmap, center, dst, paint); 1684 } 1685 1686 // void sk_canvas_draw_bitmap_rect(sk_canvas_t* ccanvas, const sk_bitmap_t* bitmap, const sk_rect_t* src, const sk_rect_t* dst, const sk_paint_t* paint) 1687 static void sk_canvas_draw_bitmap_rect (sk_canvas_t* ccanvas, sk_bitmap_t* bitmap, SKRect* src, SKRect* dst, sk_paint_t* paint) 1688 { 1689 .sk_canvas_draw_bitmap_rect (ccanvas, bitmap, src, dst, paint); 1690 } 1691 1692 // void sk_canvas_draw_circle(sk_canvas_t*, float cx, float cy, float rad, const sk_paint_t*) 1693 static void sk_canvas_draw_circle (sk_canvas_t* param0, float cx, float cy, float rad, sk_paint_t* param4) 1694 { 1695 .sk_canvas_draw_circle (param0, cx, cy, rad, param4); 1696 } 1697 1698 // void sk_canvas_draw_color(sk_canvas_t* ccanvas, sk_color_t color, sk_blendmode_t mode) 1699 static void sk_canvas_draw_color (sk_canvas_t* ccanvas, uint color, SKBlendMode mode) 1700 { 1701 .sk_canvas_draw_color (ccanvas, color, mode); 1702 } 1703 1704 // void sk_canvas_draw_drawable(sk_canvas_t*, sk_drawable_t*, const sk_matrix_t*) 1705 static void sk_canvas_draw_drawable (sk_canvas_t* param0, sk_drawable_t* param1, SKMatrix* param2) 1706 { 1707 .sk_canvas_draw_drawable (param0, param1, param2); 1708 } 1709 1710 // void sk_canvas_draw_drrect(sk_canvas_t* ccanvas, const sk_rrect_t* outer, const sk_rrect_t* inner, const sk_paint_t* paint) 1711 static void sk_canvas_draw_drrect (sk_canvas_t* ccanvas, sk_rrect_t* outer, sk_rrect_t* inner, sk_paint_t* paint) 1712 { 1713 .sk_canvas_draw_drrect (ccanvas, outer, inner, paint); 1714 } 1715 1716 // void sk_canvas_draw_image(sk_canvas_t*, const sk_image_t*, float x, float y, const sk_paint_t*) 1717 static void sk_canvas_draw_image (sk_canvas_t* param0, sk_image_t* param1, float x, float y, sk_paint_t* param4) 1718 { 1719 .sk_canvas_draw_image (param0, param1, x, y, param4); 1720 } 1721 1722 // void sk_canvas_draw_image_lattice(sk_canvas_t* t, const sk_image_t* image, const sk_lattice_t* lattice, const sk_rect_t* dst, const sk_paint_t* paint) 1723 static void sk_canvas_draw_image_lattice (sk_canvas_t* t, sk_image_t* image, SKLatticeInternal* lattice, SKRect* dst, sk_paint_t* paint) 1724 { 1725 .sk_canvas_draw_image_lattice (t, image, lattice, dst, paint); 1726 } 1727 1728 // void sk_canvas_draw_image_nine(sk_canvas_t* t, const sk_image_t* image, const sk_irect_t* center, const sk_rect_t* dst, const sk_paint_t* paint) 1729 static void sk_canvas_draw_image_nine (sk_canvas_t* t, sk_image_t* image, SKRectI* center, SKRect* dst, sk_paint_t* paint) 1730 { 1731 .sk_canvas_draw_image_nine (t, image, center, dst, paint); 1732 } 1733 1734 // void sk_canvas_draw_image_rect(sk_canvas_t*, const sk_image_t*, const sk_rect_t* src, const sk_rect_t* dst, const sk_paint_t*) 1735 static void sk_canvas_draw_image_rect (sk_canvas_t* param0, sk_image_t* param1, SKRect* src, SKRect* dst, sk_paint_t* param4) 1736 { 1737 .sk_canvas_draw_image_rect (param0, param1, src, dst, param4); 1738 } 1739 1740 // void sk_canvas_draw_line(sk_canvas_t* ccanvas, float x0, float y0, float x1, float y1, sk_paint_t* cpaint) 1741 static void sk_canvas_draw_line (sk_canvas_t* ccanvas, float x0, float y0, float x1, float y1, sk_paint_t* cpaint) 1742 { 1743 .sk_canvas_draw_line (ccanvas, x0, y0, x1, y1, cpaint); 1744 } 1745 1746 // void sk_canvas_draw_link_destination_annotation(sk_canvas_t* t, const sk_rect_t* rect, sk_data_t* value) 1747 static void sk_canvas_draw_link_destination_annotation (sk_canvas_t* t, SKRect* rect, sk_data_t* value) 1748 { 1749 .sk_canvas_draw_link_destination_annotation (t, rect, value); 1750 } 1751 1752 // void sk_canvas_draw_named_destination_annotation(sk_canvas_t* t, const sk_point_t* point, sk_data_t* value) 1753 static void sk_canvas_draw_named_destination_annotation (sk_canvas_t* t, SKPoint* point, sk_data_t* value) 1754 { 1755 .sk_canvas_draw_named_destination_annotation (t, point, value); 1756 } 1757 1758 // void sk_canvas_draw_oval(sk_canvas_t*, const sk_rect_t*, const sk_paint_t*) 1759 static void sk_canvas_draw_oval (sk_canvas_t* param0, SKRect* param1, sk_paint_t* param2) 1760 { 1761 .sk_canvas_draw_oval (param0, param1, param2); 1762 } 1763 1764 // void sk_canvas_draw_paint(sk_canvas_t*, const sk_paint_t*) 1765 static void sk_canvas_draw_paint (sk_canvas_t* param0, sk_paint_t* param1) 1766 { 1767 .sk_canvas_draw_paint (param0, param1); 1768 } 1769 1770 // void sk_canvas_draw_patch(sk_canvas_t* ccanvas, const sk_point_t* cubics, const sk_color_t* colors, const sk_point_t* texCoords, sk_blendmode_t mode, const sk_paint_t* paint) 1771 static void sk_canvas_draw_patch (sk_canvas_t* ccanvas, SKPoint* cubics, uint* colors, SKPoint* texCoords, SKBlendMode mode, sk_paint_t* paint) 1772 { 1773 .sk_canvas_draw_patch (ccanvas, cubics, colors, texCoords, mode, paint); 1774 } 1775 1776 // void sk_canvas_draw_path(sk_canvas_t*, const sk_path_t*, const sk_paint_t*) 1777 static void sk_canvas_draw_path (sk_canvas_t* param0, sk_path_t* param1, sk_paint_t* param2) 1778 { 1779 .sk_canvas_draw_path (param0, param1, param2); 1780 } 1781 1782 // void sk_canvas_draw_picture(sk_canvas_t*, const sk_picture_t*, const sk_matrix_t*, const sk_paint_t*) 1783 static void sk_canvas_draw_picture (sk_canvas_t* param0, sk_picture_t* param1, SKMatrix* param2, sk_paint_t* param3) 1784 { 1785 .sk_canvas_draw_picture (param0, param1, param2, param3); 1786 } 1787 1788 // void sk_canvas_draw_point(sk_canvas_t*, float, float, const sk_paint_t*) 1789 static void sk_canvas_draw_point (sk_canvas_t* param0, float param1, float param2, sk_paint_t* param3) 1790 { 1791 .sk_canvas_draw_point (param0, param1, param2, param3); 1792 } 1793 1794 // void sk_canvas_draw_points(sk_canvas_t*, sk_point_mode_t, size_t, const sk_point_t*, const sk_paint_t*) 1795 static void sk_canvas_draw_points (sk_canvas_t* param0, SKPointMode param1, size_t param2, SKPoint* param3, sk_paint_t* param4) 1796 { 1797 .sk_canvas_draw_points (param0, param1, param2, param3, param4); 1798 } 1799 1800 // void sk_canvas_draw_rect(sk_canvas_t*, const sk_rect_t*, const sk_paint_t*) 1801 static void sk_canvas_draw_rect (sk_canvas_t* param0, SKRect* param1, sk_paint_t* param2) 1802 { 1803 .sk_canvas_draw_rect (param0, param1, param2); 1804 } 1805 1806 // void sk_canvas_draw_region(sk_canvas_t*, const sk_region_t*, const sk_paint_t*) 1807 static void sk_canvas_draw_region (sk_canvas_t* param0, sk_region_t* param1, sk_paint_t* param2) 1808 { 1809 .sk_canvas_draw_region (param0, param1, param2); 1810 } 1811 1812 // void sk_canvas_draw_round_rect(sk_canvas_t*, const sk_rect_t*, float rx, float ry, const sk_paint_t*) 1813 static void sk_canvas_draw_round_rect (sk_canvas_t* param0, SKRect* param1, float rx, float ry, sk_paint_t* param4) 1814 { 1815 .sk_canvas_draw_round_rect (param0, param1, rx, ry, param4); 1816 } 1817 1818 // void sk_canvas_draw_rrect(sk_canvas_t*, const sk_rrect_t*, const sk_paint_t*) 1819 static void sk_canvas_draw_rrect (sk_canvas_t* param0, sk_rrect_t* param1, sk_paint_t* param2) 1820 { 1821 .sk_canvas_draw_rrect (param0, param1, param2); 1822 } 1823 1824 // void sk_canvas_draw_simple_text(sk_canvas_t* ccanvas, const(void)* text, size_t byte_length, sk_text_encoding_t encoding, float x, float y, const sk_font_t* cfont, const sk_paint_t* cpaint) 1825 static void sk_canvas_draw_simple_text (sk_canvas_t* ccanvas, void* text, size_t byte_length, SKTextEncoding encoding, float x, float y, sk_font_t* cfont, sk_paint_t* cpaint) 1826 { 1827 .sk_canvas_draw_simple_text (ccanvas, text, byte_length, encoding, x, y, cfont, cpaint); 1828 } 1829 1830 // void sk_canvas_draw_text_blob(sk_canvas_t*, sk_textblob_t* text, float x, float y, const sk_paint_t* paint) 1831 static void sk_canvas_draw_text_blob (sk_canvas_t* param0, sk_textblob_t* text, float x, float y, sk_paint_t* paint) 1832 { 1833 .sk_canvas_draw_text_blob (param0, text, x, y, paint); 1834 } 1835 1836 // void sk_canvas_draw_url_annotation(sk_canvas_t* t, const sk_rect_t* rect, sk_data_t* value) 1837 static void sk_canvas_draw_url_annotation (sk_canvas_t* t, SKRect* rect, sk_data_t* value) 1838 { 1839 .sk_canvas_draw_url_annotation (t, rect, value); 1840 } 1841 1842 // void sk_canvas_draw_vertices(sk_canvas_t* ccanvas, const sk_vertices_t* vertices, sk_blendmode_t mode, const sk_paint_t* paint) 1843 static void sk_canvas_draw_vertices (sk_canvas_t* ccanvas, sk_vertices_t* vertices, SKBlendMode mode, sk_paint_t* paint) 1844 { 1845 .sk_canvas_draw_vertices (ccanvas, vertices, mode, paint); 1846 } 1847 1848 // void sk_canvas_flush(sk_canvas_t* ccanvas) 1849 static void sk_canvas_flush (sk_canvas_t* ccanvas) 1850 { 1851 .sk_canvas_flush (ccanvas); 1852 } 1853 1854 // bool sk_canvas_get_device_clip_bounds(sk_canvas_t* t, sk_irect_t* cbounds) 1855 static bool sk_canvas_get_device_clip_bounds (sk_canvas_t* t, SKRectI* cbounds) 1856 { 1857 return .sk_canvas_get_device_clip_bounds (t, cbounds); 1858 } 1859 1860 // bool sk_canvas_get_local_clip_bounds(sk_canvas_t* t, sk_rect_t* cbounds) 1861 static bool sk_canvas_get_local_clip_bounds (sk_canvas_t* t, SKRect* cbounds) 1862 { 1863 return .sk_canvas_get_local_clip_bounds (t, cbounds); 1864 } 1865 1866 // int sk_canvas_get_save_count(sk_canvas_t*) 1867 static int sk_canvas_get_save_count (sk_canvas_t* param0) 1868 { 1869 return .sk_canvas_get_save_count (param0); 1870 } 1871 1872 // void sk_canvas_get_total_matrix(sk_canvas_t* ccanvas, sk_matrix_t* matrix) 1873 static void sk_canvas_get_total_matrix (sk_canvas_t* ccanvas, SKMatrix* matrix) 1874 { 1875 .sk_canvas_get_total_matrix (ccanvas, matrix); 1876 } 1877 1878 // bool sk_canvas_is_clip_empty(sk_canvas_t* ccanvas) 1879 static bool sk_canvas_is_clip_empty (sk_canvas_t* ccanvas) 1880 { 1881 return .sk_canvas_is_clip_empty (ccanvas); 1882 } 1883 1884 // bool sk_canvas_is_clip_rect(sk_canvas_t* ccanvas) 1885 static bool sk_canvas_is_clip_rect (sk_canvas_t* ccanvas) 1886 { 1887 return .sk_canvas_is_clip_rect (ccanvas); 1888 } 1889 1890 // sk_canvas_t* sk_canvas_new_from_bitmap(const sk_bitmap_t* bitmap) 1891 static sk_canvas_t* sk_canvas_new_from_bitmap (sk_bitmap_t* bitmap) 1892 { 1893 return .sk_canvas_new_from_bitmap (bitmap); 1894 } 1895 1896 // bool sk_canvas_quick_reject(sk_canvas_t*, const sk_rect_t*) 1897 static bool sk_canvas_quick_reject (sk_canvas_t* param0, SKRect* param1) 1898 { 1899 return .sk_canvas_quick_reject (param0, param1); 1900 } 1901 1902 // void sk_canvas_reset_matrix(sk_canvas_t* ccanvas) 1903 static void sk_canvas_reset_matrix (sk_canvas_t* ccanvas) 1904 { 1905 .sk_canvas_reset_matrix (ccanvas); 1906 } 1907 1908 // void sk_canvas_restore(sk_canvas_t*) 1909 static void sk_canvas_restore (sk_canvas_t* param0) 1910 { 1911 .sk_canvas_restore (param0); 1912 } 1913 1914 // void sk_canvas_restore_to_count(sk_canvas_t*, int saveCount) 1915 static void sk_canvas_restore_to_count (sk_canvas_t* param0, int saveCount) 1916 { 1917 .sk_canvas_restore_to_count (param0, saveCount); 1918 } 1919 1920 // void sk_canvas_rotate_degrees(sk_canvas_t*, float degrees) 1921 static void sk_canvas_rotate_degrees (sk_canvas_t* param0, float degrees) 1922 { 1923 .sk_canvas_rotate_degrees (param0, degrees); 1924 } 1925 1926 // void sk_canvas_rotate_radians(sk_canvas_t*, float radians) 1927 static void sk_canvas_rotate_radians (sk_canvas_t* param0, float radians) 1928 { 1929 .sk_canvas_rotate_radians (param0, radians); 1930 } 1931 1932 // int sk_canvas_save(sk_canvas_t*) 1933 static int sk_canvas_save (sk_canvas_t* param0) 1934 { 1935 return .sk_canvas_save (param0); 1936 } 1937 1938 // int sk_canvas_save_layer(sk_canvas_t*, const sk_rect_t*, const sk_paint_t*) 1939 static int sk_canvas_save_layer (sk_canvas_t* param0, SKRect* param1, sk_paint_t* param2) 1940 { 1941 return .sk_canvas_save_layer (param0, param1, param2); 1942 } 1943 1944 // void sk_canvas_scale(sk_canvas_t*, float sx, float sy) 1945 static void sk_canvas_scale (sk_canvas_t* param0, float sx, float sy) 1946 { 1947 .sk_canvas_scale (param0, sx, sy); 1948 } 1949 1950 // void sk_canvas_set_matrix(sk_canvas_t* ccanvas, const sk_matrix_t* matrix) 1951 static void sk_canvas_set_matrix (sk_canvas_t* ccanvas, SKMatrix* matrix) 1952 { 1953 .sk_canvas_set_matrix (ccanvas, matrix); 1954 } 1955 1956 // void sk_canvas_skew(sk_canvas_t*, float sx, float sy) 1957 static void sk_canvas_skew (sk_canvas_t* param0, float sx, float sy) 1958 { 1959 .sk_canvas_skew (param0, sx, sy); 1960 } 1961 1962 // void sk_canvas_translate(sk_canvas_t*, float dx, float dy) 1963 static void sk_canvas_translate (sk_canvas_t* param0, float dx, float dy) 1964 { 1965 .sk_canvas_translate (param0, dx, dy); 1966 } 1967 1968 // void sk_nodraw_canvas_destroy(sk_nodraw_canvas_t*) 1969 static void sk_nodraw_canvas_destroy (sk_nodraw_canvas_t* param0) 1970 { 1971 .sk_nodraw_canvas_destroy (param0); 1972 } 1973 1974 // sk_nodraw_canvas_t* sk_nodraw_canvas_new(int width, int height) 1975 static sk_nodraw_canvas_t* sk_nodraw_canvas_new (int width, int height) 1976 { 1977 return .sk_nodraw_canvas_new (width, height); 1978 } 1979 1980 // void sk_nway_canvas_add_canvas(sk_nway_canvas_t*, sk_canvas_t* canvas) 1981 static void sk_nway_canvas_add_canvas (sk_nway_canvas_t* param0, sk_canvas_t* canvas) 1982 { 1983 .sk_nway_canvas_add_canvas (param0, canvas); 1984 } 1985 1986 // void sk_nway_canvas_destroy(sk_nway_canvas_t*) 1987 static void sk_nway_canvas_destroy (sk_nway_canvas_t* param0) 1988 { 1989 .sk_nway_canvas_destroy (param0); 1990 } 1991 1992 // sk_nway_canvas_t* sk_nway_canvas_new(int width, int height) 1993 static sk_nway_canvas_t* sk_nway_canvas_new (int width, int height) 1994 { 1995 return .sk_nway_canvas_new (width, height); 1996 } 1997 1998 // void sk_nway_canvas_remove_all(sk_nway_canvas_t*) 1999 static void sk_nway_canvas_remove_all (sk_nway_canvas_t* param0) 2000 { 2001 .sk_nway_canvas_remove_all (param0); 2002 } 2003 2004 // void sk_nway_canvas_remove_canvas(sk_nway_canvas_t*, sk_canvas_t* canvas) 2005 static void sk_nway_canvas_remove_canvas (sk_nway_canvas_t* param0, sk_canvas_t* canvas) 2006 { 2007 .sk_nway_canvas_remove_canvas (param0, canvas); 2008 } 2009 2010 // void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas) 2011 static void sk_overdraw_canvas_destroy (sk_overdraw_canvas_t* canvas) 2012 { 2013 .sk_overdraw_canvas_destroy (canvas); 2014 } 2015 2016 // sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas) 2017 static sk_overdraw_canvas_t* sk_overdraw_canvas_new (sk_canvas_t* canvas) 2018 { 2019 return .sk_overdraw_canvas_new (canvas); 2020 } 2021 2022 // end header: sk_canvas.h 2023 2024 // for header: sk_codec.h 2025 2026 // void sk_codec_destroy(sk_codec_t* codec) 2027 static void sk_codec_destroy (sk_codec_t* codec) 2028 { 2029 .sk_codec_destroy (codec); 2030 } 2031 2032 // sk_encoded_image_format_t sk_codec_get_encoded_format(sk_codec_t* codec) 2033 static SKEncodedImageFormat sk_codec_get_encoded_format (sk_codec_t* codec) 2034 { 2035 return .sk_codec_get_encoded_format (codec); 2036 } 2037 2038 // int sk_codec_get_frame_count(sk_codec_t* codec) 2039 static int sk_codec_get_frame_count (sk_codec_t* codec) 2040 { 2041 return .sk_codec_get_frame_count (codec); 2042 } 2043 2044 // void sk_codec_get_frame_info(sk_codec_t* codec, sk_codec_frameinfo_t* frameInfo) 2045 static void sk_codec_get_frame_info (sk_codec_t* codec, SKCodecFrameInfo* frameInfo) 2046 { 2047 .sk_codec_get_frame_info (codec, frameInfo); 2048 } 2049 2050 // bool sk_codec_get_frame_info_for_index(sk_codec_t* codec, int index, sk_codec_frameinfo_t* frameInfo) 2051 static bool sk_codec_get_frame_info_for_index (sk_codec_t* codec, int index, SKCodecFrameInfo* frameInfo) 2052 { 2053 return .sk_codec_get_frame_info_for_index (codec, index, frameInfo); 2054 } 2055 2056 // void sk_codec_get_info(sk_codec_t* codec, sk_imageinfo_t* info) 2057 static void sk_codec_get_info (sk_codec_t* codec, SKImageInfoNative* info) 2058 { 2059 .sk_codec_get_info (codec, info); 2060 } 2061 2062 // sk_encodedorigin_t sk_codec_get_origin(sk_codec_t* codec) 2063 static SKEncodedOrigin sk_codec_get_origin (sk_codec_t* codec) 2064 { 2065 return .sk_codec_get_origin (codec); 2066 } 2067 2068 // sk_codec_result_t sk_codec_get_pixels(sk_codec_t* codec, const sk_imageinfo_t* info, void* pixels, size_t rowBytes, const sk_codec_options_t* options) 2069 static SKCodecResult sk_codec_get_pixels (sk_codec_t* codec, SKImageInfoNative* info, void* pixels, size_t rowBytes, SKCodecOptionsInternal* options) 2070 { 2071 return .sk_codec_get_pixels (codec, info, pixels, rowBytes, options); 2072 } 2073 2074 // int sk_codec_get_repetition_count(sk_codec_t* codec) 2075 static int sk_codec_get_repetition_count (sk_codec_t* codec) 2076 { 2077 return .sk_codec_get_repetition_count (codec); 2078 } 2079 2080 // void sk_codec_get_scaled_dimensions(sk_codec_t* codec, float desiredScale, sk_isize_t* dimensions) 2081 static void sk_codec_get_scaled_dimensions (sk_codec_t* codec, float desiredScale, SKSizeI* dimensions) 2082 { 2083 .sk_codec_get_scaled_dimensions (codec, desiredScale, dimensions); 2084 } 2085 2086 // sk_codec_scanline_order_t sk_codec_get_scanline_order(sk_codec_t* codec) 2087 static SKCodecScanlineOrder sk_codec_get_scanline_order (sk_codec_t* codec) 2088 { 2089 return .sk_codec_get_scanline_order (codec); 2090 } 2091 2092 // int sk_codec_get_scanlines(sk_codec_t* codec, void* dst, int countLines, size_t rowBytes) 2093 static int sk_codec_get_scanlines (sk_codec_t* codec, void* dst, int countLines, size_t rowBytes) 2094 { 2095 return .sk_codec_get_scanlines (codec, dst, countLines, rowBytes); 2096 } 2097 2098 // bool sk_codec_get_valid_subset(sk_codec_t* codec, sk_irect_t* desiredSubset) 2099 static bool sk_codec_get_valid_subset (sk_codec_t* codec, SKRectI* desiredSubset) 2100 { 2101 return .sk_codec_get_valid_subset (codec, desiredSubset); 2102 } 2103 2104 // sk_codec_result_t sk_codec_incremental_decode(sk_codec_t* codec, int* rowsDecoded) 2105 static SKCodecResult sk_codec_incremental_decode (sk_codec_t* codec, int* rowsDecoded) 2106 { 2107 return .sk_codec_incremental_decode (codec, rowsDecoded); 2108 } 2109 2110 // size_t sk_codec_min_buffered_bytes_needed() 2111 static size_t sk_codec_min_buffered_bytes_needed () 2112 { 2113 return .sk_codec_min_buffered_bytes_needed (); 2114 } 2115 2116 // sk_codec_t* sk_codec_new_from_data(sk_data_t* data) 2117 static sk_codec_t* sk_codec_new_from_data (sk_data_t* data) 2118 { 2119 return .sk_codec_new_from_data (data); 2120 } 2121 2122 // sk_codec_t* sk_codec_new_from_stream(sk_stream_t* stream, sk_codec_result_t* result) 2123 static sk_codec_t* sk_codec_new_from_stream (sk_stream_t* stream, SKCodecResult* result) 2124 { 2125 return .sk_codec_new_from_stream (stream, result); 2126 } 2127 2128 // int sk_codec_next_scanline(sk_codec_t* codec) 2129 static int sk_codec_next_scanline (sk_codec_t* codec) 2130 { 2131 return .sk_codec_next_scanline (codec); 2132 } 2133 2134 // int sk_codec_output_scanline(sk_codec_t* codec, int inputScanline) 2135 static int sk_codec_output_scanline (sk_codec_t* codec, int inputScanline) 2136 { 2137 return .sk_codec_output_scanline (codec, inputScanline); 2138 } 2139 2140 // bool sk_codec_skip_scanlines(sk_codec_t* codec, int countLines) 2141 static bool sk_codec_skip_scanlines (sk_codec_t* codec, int countLines) 2142 { 2143 return .sk_codec_skip_scanlines (codec, countLines); 2144 } 2145 2146 // sk_codec_result_t sk_codec_start_incremental_decode(sk_codec_t* codec, const sk_imageinfo_t* info, void* pixels, size_t rowBytes, const sk_codec_options_t* options) 2147 static SKCodecResult sk_codec_start_incremental_decode (sk_codec_t* codec, SKImageInfoNative* info, void* pixels, size_t rowBytes, SKCodecOptionsInternal* options) 2148 { 2149 return .sk_codec_start_incremental_decode (codec, info, pixels, rowBytes, options); 2150 } 2151 2152 // sk_codec_result_t sk_codec_start_scanline_decode(sk_codec_t* codec, const sk_imageinfo_t* info, const sk_codec_options_t* options) 2153 static SKCodecResult sk_codec_start_scanline_decode (sk_codec_t* codec, SKImageInfoNative* info, SKCodecOptionsInternal* options) 2154 { 2155 return .sk_codec_start_scanline_decode (codec, info, options); 2156 } 2157 2158 // end header: sk_codec.h 2159 2160 // for header: sk_colorfilter.h 2161 2162 // sk_colorfilter_t* sk_colorfilter_new_color_matrix(const float[20] array = 20) 2163 static sk_colorfilter_t* sk_colorfilter_new_color_matrix (float* array) 2164 { 2165 return .sk_colorfilter_new_color_matrix (array); 2166 } 2167 2168 // sk_colorfilter_t* sk_colorfilter_new_compose(sk_colorfilter_t* outer, sk_colorfilter_t* inner) 2169 static sk_colorfilter_t* sk_colorfilter_new_compose (sk_colorfilter_t* outer, sk_colorfilter_t* inner) 2170 { 2171 return .sk_colorfilter_new_compose (outer, inner); 2172 } 2173 2174 // sk_colorfilter_t* sk_colorfilter_new_high_contrast(const sk_highcontrastconfig_t* config) 2175 static sk_colorfilter_t* sk_colorfilter_new_high_contrast (SKHighContrastConfig* config) 2176 { 2177 return .sk_colorfilter_new_high_contrast (config); 2178 } 2179 2180 // sk_colorfilter_t* sk_colorfilter_new_lighting(sk_color_t mul, sk_color_t add) 2181 static sk_colorfilter_t* sk_colorfilter_new_lighting (uint mul, uint add) 2182 { 2183 return .sk_colorfilter_new_lighting (mul, add); 2184 } 2185 2186 // sk_colorfilter_t* sk_colorfilter_new_luma_color() 2187 static sk_colorfilter_t* sk_colorfilter_new_luma_color () 2188 { 2189 return .sk_colorfilter_new_luma_color (); 2190 } 2191 2192 // sk_colorfilter_t* sk_colorfilter_new_mode(sk_color_t c, sk_blendmode_t mode) 2193 static sk_colorfilter_t* sk_colorfilter_new_mode (uint c, SKBlendMode mode) 2194 { 2195 return .sk_colorfilter_new_mode (c, mode); 2196 } 2197 2198 // sk_colorfilter_t* sk_colorfilter_new_table(const uint8_t[256] table = 256) 2199 static sk_colorfilter_t* sk_colorfilter_new_table (ubyte* table) 2200 { 2201 return .sk_colorfilter_new_table (table); 2202 } 2203 2204 // sk_colorfilter_t* sk_colorfilter_new_table_argb(const uint8_t[256] tableA = 256, const uint8_t[256] tableR = 256, const uint8_t[256] tableG = 256, const uint8_t[256] tableB = 256) 2205 static sk_colorfilter_t* sk_colorfilter_new_table_argb (ubyte* tableA, ubyte* tableR, ubyte* tableG, ubyte* tableB) 2206 { 2207 return .sk_colorfilter_new_table_argb (tableA, tableR, tableG, tableB); 2208 } 2209 2210 // void sk_colorfilter_unref(sk_colorfilter_t* filter) 2211 static void sk_colorfilter_unref (sk_colorfilter_t* filter) 2212 { 2213 .sk_colorfilter_unref (filter); 2214 } 2215 2216 // end header: sk_colorfilter.h 2217 2218 // for header: sk_colorspace.h 2219 2220 // void sk_color4f_from_color(sk_color_t color, sk_color4f_t* color4f) 2221 static void sk_color4f_from_color (uint color, SKColorF* color4f) 2222 { 2223 .sk_color4f_from_color (color, color4f); 2224 } 2225 2226 // sk_color_t sk_color4f_to_color(const sk_color4f_t* color4f) 2227 static uint sk_color4f_to_color (SKColorF* color4f) 2228 { 2229 return .sk_color4f_to_color (color4f); 2230 } 2231 2232 // bool sk_colorspace_equals(const sk_colorspace_t* src, const sk_colorspace_t* dst) 2233 static bool sk_colorspace_equals (sk_colorspace_t* src, sk_colorspace_t* dst) 2234 { 2235 return .sk_colorspace_equals (src, dst); 2236 } 2237 2238 // bool sk_colorspace_gamma_close_to_srgb(const sk_colorspace_t* colorspace) 2239 static bool sk_colorspace_gamma_close_to_srgb (sk_colorspace_t* colorspace) 2240 { 2241 return .sk_colorspace_gamma_close_to_srgb (colorspace); 2242 } 2243 2244 // bool sk_colorspace_gamma_is_linear(const sk_colorspace_t* colorspace) 2245 static bool sk_colorspace_gamma_is_linear (sk_colorspace_t* colorspace) 2246 { 2247 return .sk_colorspace_gamma_is_linear (colorspace); 2248 } 2249 2250 // void sk_colorspace_icc_profile_delete(sk_colorspace_icc_profile_t* profile) 2251 static void sk_colorspace_icc_profile_delete (sk_colorspace_icc_profile_t* profile) 2252 { 2253 .sk_colorspace_icc_profile_delete (profile); 2254 } 2255 2256 // const uint8_t* sk_colorspace_icc_profile_get_buffer(const sk_colorspace_icc_profile_t* profile, uint32_t* size) 2257 static ubyte* sk_colorspace_icc_profile_get_buffer (sk_colorspace_icc_profile_t* profile, uint* size) 2258 { 2259 return cast(ubyte*).sk_colorspace_icc_profile_get_buffer (profile, size); 2260 } 2261 2262 // bool sk_colorspace_icc_profile_get_to_xyzd50(const sk_colorspace_icc_profile_t* profile, sk_colorspace_xyz_t* toXYZD50) 2263 static bool sk_colorspace_icc_profile_get_to_xyzd50 (sk_colorspace_icc_profile_t* profile, SKColorSpaceXyz* toXYZD50) 2264 { 2265 return .sk_colorspace_icc_profile_get_to_xyzd50 (profile, toXYZD50); 2266 } 2267 2268 // sk_colorspace_icc_profile_t* sk_colorspace_icc_profile_new() 2269 static sk_colorspace_icc_profile_t* sk_colorspace_icc_profile_new () 2270 { 2271 return .sk_colorspace_icc_profile_new (); 2272 } 2273 2274 // bool sk_colorspace_icc_profile_parse(const(void)* buffer, size_t length, sk_colorspace_icc_profile_t* profile) 2275 static bool sk_colorspace_icc_profile_parse (void* buffer, size_t length, sk_colorspace_icc_profile_t* profile) 2276 { 2277 return .sk_colorspace_icc_profile_parse (buffer, length, profile); 2278 } 2279 2280 // bool sk_colorspace_is_numerical_transfer_fn(const sk_colorspace_t* colorspace, sk_colorspace_transfer_fn_t* transferFn) 2281 static bool sk_colorspace_is_numerical_transfer_fn (sk_colorspace_t* colorspace, SKColorSpaceTransferFn* transferFn) 2282 { 2283 return .sk_colorspace_is_numerical_transfer_fn (colorspace, transferFn); 2284 } 2285 2286 // bool sk_colorspace_is_srgb(const sk_colorspace_t* colorspace) 2287 static bool sk_colorspace_is_srgb (sk_colorspace_t* colorspace) 2288 { 2289 return .sk_colorspace_is_srgb (colorspace); 2290 } 2291 2292 // sk_colorspace_t* sk_colorspace_make_linear_gamma(const sk_colorspace_t* colorspace) 2293 static sk_colorspace_t* sk_colorspace_make_linear_gamma (sk_colorspace_t* colorspace) 2294 { 2295 return .sk_colorspace_make_linear_gamma (colorspace); 2296 } 2297 2298 // sk_colorspace_t* sk_colorspace_make_srgb_gamma(const sk_colorspace_t* colorspace) 2299 static sk_colorspace_t* sk_colorspace_make_srgb_gamma (sk_colorspace_t* colorspace) 2300 { 2301 return .sk_colorspace_make_srgb_gamma (colorspace); 2302 } 2303 2304 // sk_colorspace_t* sk_colorspace_new_icc(const sk_colorspace_icc_profile_t* profile) 2305 static sk_colorspace_t* sk_colorspace_new_icc (sk_colorspace_icc_profile_t* profile) 2306 { 2307 return .sk_colorspace_new_icc (profile); 2308 } 2309 2310 // sk_colorspace_t* sk_colorspace_new_rgb(const sk_colorspace_transfer_fn_t* transferFn, const sk_colorspace_xyz_t* toXYZD50) 2311 static sk_colorspace_t* sk_colorspace_new_rgb (SKColorSpaceTransferFn* transferFn, SKColorSpaceXyz* toXYZD50) 2312 { 2313 return .sk_colorspace_new_rgb (transferFn, toXYZD50); 2314 } 2315 2316 // sk_colorspace_t* sk_colorspace_new_srgb() 2317 static sk_colorspace_t* sk_colorspace_new_srgb () 2318 { 2319 return .sk_colorspace_new_srgb (); 2320 } 2321 2322 // sk_colorspace_t* sk_colorspace_new_srgb_linear() 2323 static sk_colorspace_t* sk_colorspace_new_srgb_linear () 2324 { 2325 return .sk_colorspace_new_srgb_linear (); 2326 } 2327 2328 // bool sk_colorspace_primaries_to_xyzd50(const sk_colorspace_primaries_t* primaries, sk_colorspace_xyz_t* toXYZD50) 2329 static bool sk_colorspace_primaries_to_xyzd50 (SKColorSpacePrimaries* primaries, SKColorSpaceXyz* toXYZD50) 2330 { 2331 return .sk_colorspace_primaries_to_xyzd50 (primaries, toXYZD50); 2332 } 2333 2334 // void sk_colorspace_ref(sk_colorspace_t* colorspace) 2335 static void sk_colorspace_ref (sk_colorspace_t* colorspace) 2336 { 2337 .sk_colorspace_ref (colorspace); 2338 } 2339 2340 // void sk_colorspace_to_profile(const sk_colorspace_t* colorspace, sk_colorspace_icc_profile_t* profile) 2341 static void sk_colorspace_to_profile (sk_colorspace_t* colorspace, sk_colorspace_icc_profile_t* profile) 2342 { 2343 .sk_colorspace_to_profile (colorspace, profile); 2344 } 2345 2346 // bool sk_colorspace_to_xyzd50(const sk_colorspace_t* colorspace, sk_colorspace_xyz_t* toXYZD50) 2347 static bool sk_colorspace_to_xyzd50 (sk_colorspace_t* colorspace, SKColorSpaceXyz* toXYZD50) 2348 { 2349 return .sk_colorspace_to_xyzd50 (colorspace, toXYZD50); 2350 } 2351 2352 // float sk_colorspace_transfer_fn_eval(const sk_colorspace_transfer_fn_t* transferFn, float x) 2353 static float sk_colorspace_transfer_fn_eval (SKColorSpaceTransferFn* transferFn, float x) 2354 { 2355 return .sk_colorspace_transfer_fn_eval (transferFn, x); 2356 } 2357 2358 // bool sk_colorspace_transfer_fn_invert(const sk_colorspace_transfer_fn_t* src, sk_colorspace_transfer_fn_t* dst) 2359 static bool sk_colorspace_transfer_fn_invert (SKColorSpaceTransferFn* src, SKColorSpaceTransferFn* dst) 2360 { 2361 return .sk_colorspace_transfer_fn_invert (src, dst); 2362 } 2363 2364 // void sk_colorspace_transfer_fn_named_2dot2(sk_colorspace_transfer_fn_t* transferFn) 2365 static void sk_colorspace_transfer_fn_named_2dot2 (SKColorSpaceTransferFn* transferFn) 2366 { 2367 .sk_colorspace_transfer_fn_named_2dot2 (transferFn); 2368 } 2369 2370 // void sk_colorspace_transfer_fn_named_hlg(sk_colorspace_transfer_fn_t* transferFn) 2371 static void sk_colorspace_transfer_fn_named_hlg (SKColorSpaceTransferFn* transferFn) 2372 { 2373 .sk_colorspace_transfer_fn_named_hlg (transferFn); 2374 } 2375 2376 // void sk_colorspace_transfer_fn_named_linear(sk_colorspace_transfer_fn_t* transferFn) 2377 static void sk_colorspace_transfer_fn_named_linear (SKColorSpaceTransferFn* transferFn) 2378 { 2379 .sk_colorspace_transfer_fn_named_linear (transferFn); 2380 } 2381 2382 // void sk_colorspace_transfer_fn_named_pq(sk_colorspace_transfer_fn_t* transferFn) 2383 static void sk_colorspace_transfer_fn_named_pq (SKColorSpaceTransferFn* transferFn) 2384 { 2385 .sk_colorspace_transfer_fn_named_pq (transferFn); 2386 } 2387 2388 // void sk_colorspace_transfer_fn_named_rec2020(sk_colorspace_transfer_fn_t* transferFn) 2389 static void sk_colorspace_transfer_fn_named_rec2020 (SKColorSpaceTransferFn* transferFn) 2390 { 2391 .sk_colorspace_transfer_fn_named_rec2020 (transferFn); 2392 } 2393 2394 // void sk_colorspace_transfer_fn_named_srgb(sk_colorspace_transfer_fn_t* transferFn) 2395 static void sk_colorspace_transfer_fn_named_srgb (SKColorSpaceTransferFn* transferFn) 2396 { 2397 .sk_colorspace_transfer_fn_named_srgb (transferFn); 2398 } 2399 2400 // void sk_colorspace_unref(sk_colorspace_t* colorspace) 2401 static void sk_colorspace_unref (sk_colorspace_t* colorspace) 2402 { 2403 .sk_colorspace_unref (colorspace); 2404 } 2405 2406 // void sk_colorspace_xyz_concat(const sk_colorspace_xyz_t* a, const sk_colorspace_xyz_t* b, sk_colorspace_xyz_t* result) 2407 static void sk_colorspace_xyz_concat (SKColorSpaceXyz* a, SKColorSpaceXyz* b, SKColorSpaceXyz* result) 2408 { 2409 .sk_colorspace_xyz_concat (a, b, result); 2410 } 2411 2412 // bool sk_colorspace_xyz_invert(const sk_colorspace_xyz_t* src, sk_colorspace_xyz_t* dst) 2413 static bool sk_colorspace_xyz_invert (SKColorSpaceXyz* src, SKColorSpaceXyz* dst) 2414 { 2415 return .sk_colorspace_xyz_invert (src, dst); 2416 } 2417 2418 // void sk_colorspace_xyz_named_adobe_rgb(sk_colorspace_xyz_t* xyz) 2419 static void sk_colorspace_xyz_named_adobe_rgb (SKColorSpaceXyz* xyz) 2420 { 2421 .sk_colorspace_xyz_named_adobe_rgb (xyz); 2422 } 2423 2424 // void sk_colorspace_xyz_named_dcip3(sk_colorspace_xyz_t* xyz) 2425 static void sk_colorspace_xyz_named_dcip3 (SKColorSpaceXyz* xyz) 2426 { 2427 .sk_colorspace_xyz_named_dcip3 (xyz); 2428 } 2429 2430 // void sk_colorspace_xyz_named_rec2020(sk_colorspace_xyz_t* xyz) 2431 static void sk_colorspace_xyz_named_rec2020 (SKColorSpaceXyz* xyz) 2432 { 2433 .sk_colorspace_xyz_named_rec2020 (xyz); 2434 } 2435 2436 // void sk_colorspace_xyz_named_srgb(sk_colorspace_xyz_t* xyz) 2437 static void sk_colorspace_xyz_named_srgb (SKColorSpaceXyz* xyz) 2438 { 2439 .sk_colorspace_xyz_named_srgb (xyz); 2440 } 2441 2442 // void sk_colorspace_xyz_named_xyz(sk_colorspace_xyz_t* xyz) 2443 static void sk_colorspace_xyz_named_xyz (SKColorSpaceXyz* xyz) 2444 { 2445 .sk_colorspace_xyz_named_xyz (xyz); 2446 } 2447 2448 // end header: sk_colorspace.h 2449 2450 // for header: sk_colortable.h 2451 2452 // int sk_colortable_count(const sk_colortable_t* ctable) 2453 static int sk_colortable_count (sk_colortable_t* ctable) 2454 { 2455 return .sk_colortable_count (ctable); 2456 } 2457 2458 // sk_colortable_t* sk_colortable_new(const sk_pmcolor_t* colors, int count) 2459 static sk_colortable_t* sk_colortable_new (uint* colors, int count) 2460 { 2461 return .sk_colortable_new (colors, count); 2462 } 2463 2464 // void sk_colortable_read_colors(const sk_colortable_t* ctable, sk_pmcolor_t** colors) 2465 static void sk_colortable_read_colors (sk_colortable_t* ctable, uint** colors) 2466 { 2467 .sk_colortable_read_colors (ctable, colors); 2468 } 2469 2470 // void sk_colortable_unref(sk_colortable_t* ctable) 2471 static void sk_colortable_unref (sk_colortable_t* ctable) 2472 { 2473 .sk_colortable_unref (ctable); 2474 } 2475 2476 // end header: sk_colortable.h 2477 2478 // for header: sk_data.h 2479 2480 // const uint8_t* sk_data_get_bytes(const sk_data_t*) 2481 static ubyte* sk_data_get_bytes (sk_data_t* param0) 2482 { 2483 return cast(ubyte*).sk_data_get_bytes (param0); 2484 } 2485 2486 // const(void)* sk_data_get_data(const sk_data_t*) 2487 static void* sk_data_get_data (sk_data_t* param0) 2488 { 2489 return .sk_data_get_data (param0); 2490 } 2491 2492 // size_t sk_data_get_size(const sk_data_t*) 2493 static size_t sk_data_get_size (sk_data_t* param0) 2494 { 2495 return .sk_data_get_size (param0); 2496 } 2497 2498 // sk_data_t* sk_data_new_empty() 2499 static sk_data_t* sk_data_new_empty () 2500 { 2501 return .sk_data_new_empty (); 2502 } 2503 2504 // sk_data_t* sk_data_new_from_file(const(char)* path) 2505 static sk_data_t* sk_data_new_from_file ( string path) 2506 { 2507 return .sk_data_new_from_file (path.toStringz()); 2508 } 2509 2510 // sk_data_t* sk_data_new_from_stream(sk_stream_t* stream, size_t length) 2511 static sk_data_t* sk_data_new_from_stream (sk_stream_t* stream, size_t length) 2512 { 2513 return .sk_data_new_from_stream (stream, length); 2514 } 2515 2516 // sk_data_t* sk_data_new_subset(const sk_data_t* src, size_t offset, size_t length) 2517 static sk_data_t* sk_data_new_subset (sk_data_t* src, size_t offset, size_t length) 2518 { 2519 return .sk_data_new_subset (src, offset, length); 2520 } 2521 2522 // sk_data_t* sk_data_new_uninitialized(size_t size) 2523 static sk_data_t* sk_data_new_uninitialized (size_t size) 2524 { 2525 return .sk_data_new_uninitialized (size); 2526 } 2527 2528 // sk_data_t* sk_data_new_with_copy(const(void)* src, size_t length) 2529 static sk_data_t* sk_data_new_with_copy (void* src, size_t length) 2530 { 2531 return .sk_data_new_with_copy (src, length); 2532 } 2533 2534 // sk_data_t* sk_data_new_with_proc(const(void)* ptr, size_t length, sk_data_release_proc proc, void* ctx) 2535 static sk_data_t* sk_data_new_with_proc (void* ptr, size_t length, SKDataReleaseProxyDelegate proc, void* ctx) 2536 { 2537 return .sk_data_new_with_proc (ptr, length, proc, ctx); 2538 } 2539 2540 // void sk_data_ref(const sk_data_t*) 2541 static void sk_data_ref (sk_data_t* param0) 2542 { 2543 .sk_data_ref (param0); 2544 } 2545 2546 // void sk_data_unref(const sk_data_t*) 2547 static void sk_data_unref (sk_data_t* param0) 2548 { 2549 .sk_data_unref (param0); 2550 } 2551 2552 // end header: sk_data.h 2553 2554 // for header: sk_document.h 2555 2556 // void sk_document_abort(sk_document_t* document) 2557 static void sk_document_abort (sk_document_t* document) 2558 { 2559 .sk_document_abort (document); 2560 } 2561 2562 // sk_canvas_t* sk_document_begin_page(sk_document_t* document, float width, float height, const sk_rect_t* content) 2563 static sk_canvas_t* sk_document_begin_page (sk_document_t* document, float width, float height, SKRect* content) 2564 { 2565 return .sk_document_begin_page (document, width, height, content); 2566 } 2567 2568 // void sk_document_close(sk_document_t* document) 2569 static void sk_document_close (sk_document_t* document) 2570 { 2571 .sk_document_close (document); 2572 } 2573 2574 // sk_document_t* sk_document_create_pdf_from_stream(sk_wstream_t* stream) 2575 static sk_document_t* sk_document_create_pdf_from_stream (sk_wstream_t* stream) 2576 { 2577 return .sk_document_create_pdf_from_stream (stream); 2578 } 2579 2580 // sk_document_t* sk_document_create_pdf_from_stream_with_metadata(sk_wstream_t* stream, const sk_document_pdf_metadata_t* metadata) 2581 static sk_document_t* sk_document_create_pdf_from_stream_with_metadata (sk_wstream_t* stream, SKDocumentPdfMetadataInternal* metadata) 2582 { 2583 return .sk_document_create_pdf_from_stream_with_metadata (stream, metadata); 2584 } 2585 2586 // sk_document_t* sk_document_create_xps_from_stream(sk_wstream_t* stream, float dpi) 2587 static sk_document_t* sk_document_create_xps_from_stream (sk_wstream_t* stream, float dpi) 2588 { 2589 return .sk_document_create_xps_from_stream (stream, dpi); 2590 } 2591 2592 // void sk_document_end_page(sk_document_t* document) 2593 static void sk_document_end_page (sk_document_t* document) 2594 { 2595 .sk_document_end_page (document); 2596 } 2597 2598 // void sk_document_unref(sk_document_t* document) 2599 static void sk_document_unref (sk_document_t* document) 2600 { 2601 .sk_document_unref (document); 2602 } 2603 2604 // end header: sk_document.h 2605 2606 // for header: sk_drawable.h 2607 2608 // void sk_drawable_draw(sk_drawable_t*, sk_canvas_t*, const sk_matrix_t*) 2609 static void sk_drawable_draw (sk_drawable_t* param0, sk_canvas_t* param1, SKMatrix* param2) 2610 { 2611 .sk_drawable_draw (param0, param1, param2); 2612 } 2613 2614 // void sk_drawable_get_bounds(sk_drawable_t*, sk_rect_t*) 2615 static void sk_drawable_get_bounds (sk_drawable_t* param0, SKRect* param1) 2616 { 2617 .sk_drawable_get_bounds (param0, param1); 2618 } 2619 2620 // uint32_t sk_drawable_get_generation_id(sk_drawable_t*) 2621 static uint sk_drawable_get_generation_id (sk_drawable_t* param0) 2622 { 2623 return .sk_drawable_get_generation_id (param0); 2624 } 2625 2626 // sk_picture_t* sk_drawable_new_picture_snapshot(sk_drawable_t*) 2627 static sk_picture_t* sk_drawable_new_picture_snapshot (sk_drawable_t* param0) 2628 { 2629 return .sk_drawable_new_picture_snapshot (param0); 2630 } 2631 2632 // void sk_drawable_notify_drawing_changed(sk_drawable_t*) 2633 static void sk_drawable_notify_drawing_changed (sk_drawable_t* param0) 2634 { 2635 .sk_drawable_notify_drawing_changed (param0); 2636 } 2637 2638 // void sk_drawable_unref(sk_drawable_t*) 2639 static void sk_drawable_unref (sk_drawable_t* param0) 2640 { 2641 .sk_drawable_unref (param0); 2642 } 2643 2644 // end header: sk_drawable.h 2645 2646 // for header: sk_font.h 2647 2648 // size_t sk_font_break_text(const sk_font_t* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, float maxWidth, float* measuredWidth, const sk_paint_t* paint) 2649 static size_t sk_font_break_text (sk_font_t* font, void* text, size_t byteLength, SKTextEncoding encoding, float maxWidth, float* measuredWidth, sk_paint_t* paint) 2650 { 2651 return .sk_font_break_text (font, text, byteLength, encoding, maxWidth, measuredWidth, paint); 2652 } 2653 2654 // void sk_font_delete(sk_font_t* font) 2655 static void sk_font_delete (sk_font_t* font) 2656 { 2657 .sk_font_delete (font); 2658 } 2659 2660 // sk_font_edging_t sk_font_get_edging(const sk_font_t* font) 2661 static SKFontEdging sk_font_get_edging (sk_font_t* font) 2662 { 2663 return .sk_font_get_edging (font); 2664 } 2665 2666 // sk_font_hinting_t sk_font_get_hinting(const sk_font_t* font) 2667 static SKFontHinting sk_font_get_hinting (sk_font_t* font) 2668 { 2669 return .sk_font_get_hinting (font); 2670 } 2671 2672 // float sk_font_get_metrics(const sk_font_t* font, sk_fontmetrics_t* metrics) 2673 static float sk_font_get_metrics (sk_font_t* font, SKFontMetrics* metrics) 2674 { 2675 return .sk_font_get_metrics (font, metrics); 2676 } 2677 2678 // bool sk_font_get_path(const sk_font_t* font, uint16_t glyph, sk_path_t* path) 2679 static bool sk_font_get_path (sk_font_t* font, ushort glyph, sk_path_t* path) 2680 { 2681 return .sk_font_get_path (font, glyph, path); 2682 } 2683 2684 // void sk_font_get_paths(const sk_font_t* font, uint16_t* glyphs, int count, const sk_glyph_path_proc glyphPathProc, void* context) 2685 static void sk_font_get_paths (sk_font_t* font, ushort* glyphs, int count, SKGlyphPathProxyDelegate glyphPathProc, void* context) 2686 { 2687 .sk_font_get_paths (font, glyphs, count, glyphPathProc, context); 2688 } 2689 2690 // void sk_font_get_pos(const sk_font_t* font, const uint16_t* glyphs, int count, sk_point_t* pos, sk_point_t* origin) 2691 static void sk_font_get_pos (sk_font_t* font, ushort* glyphs, int count, SKPoint* pos, SKPoint* origin) 2692 { 2693 .sk_font_get_pos (font, glyphs, count, pos, origin); 2694 } 2695 2696 // float sk_font_get_scale_x(const sk_font_t* font) 2697 static float sk_font_get_scale_x (sk_font_t* font) 2698 { 2699 return .sk_font_get_scale_x (font); 2700 } 2701 2702 // float sk_font_get_size(const sk_font_t* font) 2703 static float sk_font_get_size (sk_font_t* font) 2704 { 2705 return .sk_font_get_size (font); 2706 } 2707 2708 // float sk_font_get_skew_x(const sk_font_t* font) 2709 static float sk_font_get_skew_x (sk_font_t* font) 2710 { 2711 return .sk_font_get_skew_x (font); 2712 } 2713 2714 // sk_typeface_t* sk_font_get_typeface(const sk_font_t* font) 2715 static sk_typeface_t* sk_font_get_typeface (sk_font_t* font) 2716 { 2717 return .sk_font_get_typeface (font); 2718 } 2719 2720 // void sk_font_get_widths_bounds(const sk_font_t* font, const uint16_t* glyphs, int count, float* widths, sk_rect_t* bounds, const sk_paint_t* paint) 2721 static void sk_font_get_widths_bounds (sk_font_t* font, ushort* glyphs, int count, float* widths, SKRect* bounds, sk_paint_t* paint) 2722 { 2723 .sk_font_get_widths_bounds (font, glyphs, count, widths, bounds, paint); 2724 } 2725 2726 // void sk_font_get_xpos(const sk_font_t* font, const uint16_t* glyphs, int count, float* xpos, float origin) 2727 static void sk_font_get_xpos (sk_font_t* font, ushort* glyphs, int count, float* xpos, float origin) 2728 { 2729 .sk_font_get_xpos (font, glyphs, count, xpos, origin); 2730 } 2731 2732 // bool sk_font_is_baseline_snap(const sk_font_t* font) 2733 static bool sk_font_is_baseline_snap (sk_font_t* font) 2734 { 2735 return .sk_font_is_baseline_snap (font); 2736 } 2737 2738 // bool sk_font_is_embedded_bitmaps(const sk_font_t* font) 2739 static bool sk_font_is_embedded_bitmaps (sk_font_t* font) 2740 { 2741 return .sk_font_is_embedded_bitmaps (font); 2742 } 2743 2744 // bool sk_font_is_embolden(const sk_font_t* font) 2745 static bool sk_font_is_embolden (sk_font_t* font) 2746 { 2747 return .sk_font_is_embolden (font); 2748 } 2749 2750 // bool sk_font_is_force_auto_hinting(const sk_font_t* font) 2751 static bool sk_font_is_force_auto_hinting (sk_font_t* font) 2752 { 2753 return .sk_font_is_force_auto_hinting (font); 2754 } 2755 2756 // bool sk_font_is_linear_metrics(const sk_font_t* font) 2757 static bool sk_font_is_linear_metrics (sk_font_t* font) 2758 { 2759 return .sk_font_is_linear_metrics (font); 2760 } 2761 2762 // bool sk_font_is_subpixel(const sk_font_t* font) 2763 static bool sk_font_is_subpixel (sk_font_t* font) 2764 { 2765 return .sk_font_is_subpixel (font); 2766 } 2767 2768 // float sk_font_measure_text(const sk_font_t* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const sk_paint_t* paint) 2769 static float sk_font_measure_text (sk_font_t* font, void* text, size_t byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t* paint) 2770 { 2771 return .sk_font_measure_text (font, text, byteLength, encoding, bounds, paint); 2772 } 2773 2774 // void sk_font_measure_text_no_return(const sk_font_t* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, sk_rect_t* bounds, const sk_paint_t* paint, float* measuredWidth) 2775 static void sk_font_measure_text_no_return (sk_font_t* font, void* text, size_t byteLength, SKTextEncoding encoding, SKRect* bounds, sk_paint_t* paint, float* measuredWidth) 2776 { 2777 .sk_font_measure_text_no_return (font, text, byteLength, encoding, bounds, paint, measuredWidth); 2778 } 2779 2780 // sk_font_t* sk_font_new() 2781 static sk_font_t* sk_font_new () 2782 { 2783 return .sk_font_new (); 2784 } 2785 2786 // sk_font_t* sk_font_new_with_values(sk_typeface_t* typeface, float size, float scaleX, float skewX) 2787 static sk_font_t* sk_font_new_with_values (sk_typeface_t* typeface, float size, float scaleX, float skewX) 2788 { 2789 return .sk_font_new_with_values (typeface, size, scaleX, skewX); 2790 } 2791 2792 // void sk_font_set_baseline_snap(sk_font_t* font, bool value) 2793 static void sk_font_set_baseline_snap (sk_font_t* font, bool value) 2794 { 2795 .sk_font_set_baseline_snap (font, value); 2796 } 2797 2798 // void sk_font_set_edging(sk_font_t* font, sk_font_edging_t value) 2799 static void sk_font_set_edging (sk_font_t* font, SKFontEdging value) 2800 { 2801 .sk_font_set_edging (font, value); 2802 } 2803 2804 // void sk_font_set_embedded_bitmaps(sk_font_t* font, bool value) 2805 static void sk_font_set_embedded_bitmaps (sk_font_t* font, bool value) 2806 { 2807 .sk_font_set_embedded_bitmaps (font, value); 2808 } 2809 2810 // void sk_font_set_embolden(sk_font_t* font, bool value) 2811 static void sk_font_set_embolden (sk_font_t* font, bool value) 2812 { 2813 .sk_font_set_embolden (font, value); 2814 } 2815 2816 // void sk_font_set_force_auto_hinting(sk_font_t* font, bool value) 2817 static void sk_font_set_force_auto_hinting (sk_font_t* font, bool value) 2818 { 2819 .sk_font_set_force_auto_hinting (font, value); 2820 } 2821 2822 // void sk_font_set_hinting(sk_font_t* font, sk_font_hinting_t value) 2823 static void sk_font_set_hinting (sk_font_t* font, SKFontHinting value) 2824 { 2825 .sk_font_set_hinting (font, value); 2826 } 2827 2828 // void sk_font_set_linear_metrics(sk_font_t* font, bool value) 2829 static void sk_font_set_linear_metrics (sk_font_t* font, bool value) 2830 { 2831 .sk_font_set_linear_metrics (font, value); 2832 } 2833 2834 // void sk_font_set_scale_x(sk_font_t* font, float value) 2835 static void sk_font_set_scale_x (sk_font_t* font, float value) 2836 { 2837 .sk_font_set_scale_x (font, value); 2838 } 2839 2840 // void sk_font_set_size(sk_font_t* font, float value) 2841 static void sk_font_set_size (sk_font_t* font, float value) 2842 { 2843 .sk_font_set_size (font, value); 2844 } 2845 2846 // void sk_font_set_skew_x(sk_font_t* font, float value) 2847 static void sk_font_set_skew_x (sk_font_t* font, float value) 2848 { 2849 .sk_font_set_skew_x (font, value); 2850 } 2851 2852 // void sk_font_set_subpixel(sk_font_t* font, bool value) 2853 static void sk_font_set_subpixel (sk_font_t* font, bool value) 2854 { 2855 .sk_font_set_subpixel (font, value); 2856 } 2857 2858 // void sk_font_set_typeface(sk_font_t* font, sk_typeface_t* value) 2859 static void sk_font_set_typeface (sk_font_t* font, sk_typeface_t* value) 2860 { 2861 .sk_font_set_typeface (font, value); 2862 } 2863 2864 // int sk_font_text_to_glyphs(const sk_font_t* font, const(void)* text, size_t byteLength, sk_text_encoding_t encoding, uint16_t* glyphs, int maxGlyphCount) 2865 static int sk_font_text_to_glyphs (sk_font_t* font, void* text, size_t byteLength, SKTextEncoding encoding, ushort* glyphs, int maxGlyphCount) 2866 { 2867 return .sk_font_text_to_glyphs (font, text, byteLength, encoding, glyphs, maxGlyphCount); 2868 } 2869 2870 // uint16_t sk_font_unichar_to_glyph(const sk_font_t* font, int32_t uni) 2871 static ushort sk_font_unichar_to_glyph (sk_font_t* font, int uni) 2872 { 2873 return .sk_font_unichar_to_glyph (font, uni); 2874 } 2875 2876 // void sk_font_unichars_to_glyphs(const sk_font_t* font, const int32_t* uni, int count, uint16_t* glyphs) 2877 static void sk_font_unichars_to_glyphs (sk_font_t* font, int* uni, int count, ushort* glyphs) 2878 { 2879 .sk_font_unichars_to_glyphs (font, uni, count, glyphs); 2880 } 2881 2882 // void sk_text_utils_get_path(const(void)* text, size_t length, sk_text_encoding_t encoding, float x, float y, const sk_font_t* font, sk_path_t* path) 2883 static void sk_text_utils_get_path (void* text, size_t length, SKTextEncoding encoding, float x, float y, sk_font_t* font, sk_path_t* path) 2884 { 2885 .sk_text_utils_get_path (text, length, encoding, x, y, font, path); 2886 } 2887 2888 // void sk_text_utils_get_pos_path(const(void)* text, size_t length, sk_text_encoding_t encoding, const sk_point_t* pos, const sk_font_t* font, sk_path_t* path) 2889 static void sk_text_utils_get_pos_path (void* text, size_t length, SKTextEncoding encoding, SKPoint* pos, sk_font_t* font, sk_path_t* path) 2890 { 2891 .sk_text_utils_get_pos_path (text, length, encoding, pos, font, path); 2892 } 2893 2894 // end header: sk_font.h 2895 2896 // for header: sk_general.h 2897 2898 // sk_colortype_t sk_colortype_get_default_8888() 2899 static SKColorTypeNative sk_colortype_get_default_8888 () 2900 { 2901 return .sk_colortype_get_default_8888 (); 2902 } 2903 2904 // int sk_nvrefcnt_get_ref_count(const sk_nvrefcnt_t* refcnt) 2905 static int sk_nvrefcnt_get_ref_count (sk_nvrefcnt_t* refcnt) 2906 { 2907 return .sk_nvrefcnt_get_ref_count (refcnt); 2908 } 2909 2910 // void sk_nvrefcnt_safe_ref(sk_nvrefcnt_t* refcnt) 2911 static void sk_nvrefcnt_safe_ref (sk_nvrefcnt_t* refcnt) 2912 { 2913 .sk_nvrefcnt_safe_ref (refcnt); 2914 } 2915 2916 // void sk_nvrefcnt_safe_unref(sk_nvrefcnt_t* refcnt) 2917 static void sk_nvrefcnt_safe_unref (sk_nvrefcnt_t* refcnt) 2918 { 2919 .sk_nvrefcnt_safe_unref (refcnt); 2920 } 2921 2922 // bool sk_nvrefcnt_unique(const sk_nvrefcnt_t* refcnt) 2923 static bool sk_nvrefcnt_unique (sk_nvrefcnt_t* refcnt) 2924 { 2925 return .sk_nvrefcnt_unique (refcnt); 2926 } 2927 2928 // int sk_refcnt_get_ref_count(const sk_refcnt_t* refcnt) 2929 static int sk_refcnt_get_ref_count (sk_refcnt_t* refcnt) 2930 { 2931 return .sk_refcnt_get_ref_count (refcnt); 2932 } 2933 2934 // void sk_refcnt_safe_ref(sk_refcnt_t* refcnt) 2935 static void sk_refcnt_safe_ref (sk_refcnt_t* refcnt) 2936 { 2937 .sk_refcnt_safe_ref (refcnt); 2938 } 2939 2940 // void sk_refcnt_safe_unref(sk_refcnt_t* refcnt) 2941 static void sk_refcnt_safe_unref (sk_refcnt_t* refcnt) 2942 { 2943 .sk_refcnt_safe_unref (refcnt); 2944 } 2945 2946 // bool sk_refcnt_unique(const sk_refcnt_t* refcnt) 2947 static bool sk_refcnt_unique (sk_refcnt_t* refcnt) 2948 { 2949 return .sk_refcnt_unique (refcnt); 2950 } 2951 2952 // int sk_version_get_increment() 2953 static int sk_version_get_increment () 2954 { 2955 return .sk_version_get_increment (); 2956 } 2957 2958 // int sk_version_get_milestone() 2959 static int sk_version_get_milestone () 2960 { 2961 return .sk_version_get_milestone (); 2962 } 2963 2964 // const(char)* sk_version_get_string() 2965 static string sk_version_get_string () 2966 { 2967 const(char)* v = .sk_version_get_string (); 2968 return cast(string)v.fromStringz(); 2969 } 2970 2971 // end header: sk_general.h 2972 2973 // for header: sk_graphics.h 2974 2975 // void sk_graphics_dump_memory_statistics(sk_tracememorydump_t* dump) 2976 static void sk_graphics_dump_memory_statistics (sk_tracememorydump_t* dump) 2977 { 2978 .sk_graphics_dump_memory_statistics (dump); 2979 } 2980 2981 // int sk_graphics_get_font_cache_count_limit() 2982 static int sk_graphics_get_font_cache_count_limit () 2983 { 2984 return .sk_graphics_get_font_cache_count_limit (); 2985 } 2986 2987 // int sk_graphics_get_font_cache_count_used() 2988 static int sk_graphics_get_font_cache_count_used () 2989 { 2990 return .sk_graphics_get_font_cache_count_used (); 2991 } 2992 2993 // size_t sk_graphics_get_font_cache_limit() 2994 static size_t sk_graphics_get_font_cache_limit () 2995 { 2996 return .sk_graphics_get_font_cache_limit (); 2997 } 2998 2999 // int sk_graphics_get_font_cache_point_size_limit() 3000 static int sk_graphics_get_font_cache_point_size_limit () 3001 { 3002 return .sk_graphics_get_font_cache_point_size_limit (); 3003 } 3004 3005 // size_t sk_graphics_get_font_cache_used() 3006 static size_t sk_graphics_get_font_cache_used () 3007 { 3008 return .sk_graphics_get_font_cache_used (); 3009 } 3010 3011 // size_t sk_graphics_get_resource_cache_single_allocation_byte_limit() 3012 static size_t sk_graphics_get_resource_cache_single_allocation_byte_limit () 3013 { 3014 return .sk_graphics_get_resource_cache_single_allocation_byte_limit (); 3015 } 3016 3017 // size_t sk_graphics_get_resource_cache_total_byte_limit() 3018 static size_t sk_graphics_get_resource_cache_total_byte_limit () 3019 { 3020 return .sk_graphics_get_resource_cache_total_byte_limit (); 3021 } 3022 3023 // size_t sk_graphics_get_resource_cache_total_bytes_used() 3024 static size_t sk_graphics_get_resource_cache_total_bytes_used () 3025 { 3026 return .sk_graphics_get_resource_cache_total_bytes_used (); 3027 } 3028 3029 // void sk_graphics_init() 3030 static void sk_graphics_init () 3031 { 3032 .sk_graphics_init (); 3033 } 3034 3035 // void sk_graphics_purge_all_caches() 3036 static void sk_graphics_purge_all_caches () 3037 { 3038 .sk_graphics_purge_all_caches (); 3039 } 3040 3041 // void sk_graphics_purge_font_cache() 3042 static void sk_graphics_purge_font_cache () 3043 { 3044 .sk_graphics_purge_font_cache (); 3045 } 3046 3047 // void sk_graphics_purge_resource_cache() 3048 static void sk_graphics_purge_resource_cache () 3049 { 3050 .sk_graphics_purge_resource_cache (); 3051 } 3052 3053 // int sk_graphics_set_font_cache_count_limit(int count) 3054 static int sk_graphics_set_font_cache_count_limit (int count) 3055 { 3056 return .sk_graphics_set_font_cache_count_limit (count); 3057 } 3058 3059 // size_t sk_graphics_set_font_cache_limit(size_t bytes) 3060 static size_t sk_graphics_set_font_cache_limit (size_t bytes) 3061 { 3062 return .sk_graphics_set_font_cache_limit (bytes); 3063 } 3064 3065 // int sk_graphics_set_font_cache_point_size_limit(int maxPointSize) 3066 static int sk_graphics_set_font_cache_point_size_limit (int maxPointSize) 3067 { 3068 return .sk_graphics_set_font_cache_point_size_limit (maxPointSize); 3069 } 3070 3071 // size_t sk_graphics_set_resource_cache_single_allocation_byte_limit(size_t newLimit) 3072 static size_t sk_graphics_set_resource_cache_single_allocation_byte_limit (size_t newLimit) 3073 { 3074 return .sk_graphics_set_resource_cache_single_allocation_byte_limit (newLimit); 3075 } 3076 3077 // size_t sk_graphics_set_resource_cache_total_byte_limit(size_t newLimit) 3078 static size_t sk_graphics_set_resource_cache_total_byte_limit (size_t newLimit) 3079 { 3080 return .sk_graphics_set_resource_cache_total_byte_limit (newLimit); 3081 } 3082 3083 // end header: sk_graphics.h 3084 3085 // for header: sk_image.h 3086 3087 // sk_data_t* sk_image_encode(const sk_image_t*) 3088 static sk_data_t* sk_image_encode (sk_image_t* param0) 3089 { 3090 return .sk_image_encode (param0); 3091 } 3092 3093 // sk_data_t* sk_image_encode_specific(const sk_image_t* cimage, sk_encoded_image_format_t encoder, int quality) 3094 static sk_data_t* sk_image_encode_specific (sk_image_t* cimage, SKEncodedImageFormat encoder, int quality) 3095 { 3096 return .sk_image_encode_specific (cimage, encoder, quality); 3097 } 3098 3099 // sk_alphatype_t sk_image_get_alpha_type(const sk_image_t*) 3100 static SKAlphaType sk_image_get_alpha_type (sk_image_t* param0) 3101 { 3102 return .sk_image_get_alpha_type (param0); 3103 } 3104 3105 // sk_colortype_t sk_image_get_color_type(const sk_image_t*) 3106 static SKColorTypeNative sk_image_get_color_type (sk_image_t* param0) 3107 { 3108 return .sk_image_get_color_type (param0); 3109 } 3110 3111 // sk_colorspace_t* sk_image_get_colorspace(const sk_image_t*) 3112 static sk_colorspace_t* sk_image_get_colorspace (sk_image_t* param0) 3113 { 3114 return .sk_image_get_colorspace (param0); 3115 } 3116 3117 // int sk_image_get_height(const sk_image_t*) 3118 static int sk_image_get_height (sk_image_t* param0) 3119 { 3120 return .sk_image_get_height (param0); 3121 } 3122 3123 // uint32_t sk_image_get_unique_id(const sk_image_t*) 3124 static uint sk_image_get_unique_id (sk_image_t* param0) 3125 { 3126 return .sk_image_get_unique_id (param0); 3127 } 3128 3129 // int sk_image_get_width(const sk_image_t*) 3130 static int sk_image_get_width (sk_image_t* param0) 3131 { 3132 return .sk_image_get_width (param0); 3133 } 3134 3135 // bool sk_image_is_alpha_only(const sk_image_t*) 3136 static bool sk_image_is_alpha_only (sk_image_t* param0) 3137 { 3138 return .sk_image_is_alpha_only (param0); 3139 } 3140 3141 // bool sk_image_is_lazy_generated(const sk_image_t* image) 3142 static bool sk_image_is_lazy_generated (sk_image_t* image) 3143 { 3144 return .sk_image_is_lazy_generated (image); 3145 } 3146 3147 // bool sk_image_is_texture_backed(const sk_image_t* image) 3148 static bool sk_image_is_texture_backed (sk_image_t* image) 3149 { 3150 return .sk_image_is_texture_backed (image); 3151 } 3152 3153 // bool sk_image_is_valid(const sk_image_t* image, gr_context_t* context) 3154 static bool sk_image_is_valid (sk_image_t* image, gr_context_t* context) 3155 { 3156 return .sk_image_is_valid (image, context); 3157 } 3158 3159 // sk_image_t* sk_image_make_non_texture_image(const sk_image_t* cimage) 3160 static sk_image_t* sk_image_make_non_texture_image (sk_image_t* cimage) 3161 { 3162 return .sk_image_make_non_texture_image (cimage); 3163 } 3164 3165 // sk_image_t* sk_image_make_raster_image(const sk_image_t* cimage) 3166 static sk_image_t* sk_image_make_raster_image (sk_image_t* cimage) 3167 { 3168 return .sk_image_make_raster_image (cimage); 3169 } 3170 3171 // sk_shader_t* sk_image_make_shader(const sk_image_t*, sk_shader_tilemode_t tileX, sk_shader_tilemode_t tileY, const sk_matrix_t* localMatrix) 3172 static sk_shader_t* sk_image_make_shader (sk_image_t* param0, SKShaderTileMode tileX, SKShaderTileMode tileY, SKMatrix* localMatrix) 3173 { 3174 return .sk_image_make_shader (param0, tileX, tileY, localMatrix); 3175 } 3176 3177 // sk_image_t* sk_image_make_subset(const sk_image_t* cimage, const sk_irect_t* subset) 3178 static sk_image_t* sk_image_make_subset (sk_image_t* cimage, SKRectI* subset) 3179 { 3180 return .sk_image_make_subset (cimage, subset); 3181 } 3182 3183 // sk_image_t* sk_image_make_texture_image(const sk_image_t* cimage, gr_context_t* context, bool mipmapped) 3184 static sk_image_t* sk_image_make_texture_image (sk_image_t* cimage, gr_context_t* context, bool mipmapped) 3185 { 3186 return .sk_image_make_texture_image (cimage, context, mipmapped); 3187 } 3188 3189 // sk_image_t* sk_image_make_with_filter(const sk_image_t* cimage, const sk_imagefilter_t* filter, const sk_irect_t* subset, const sk_irect_t* clipBounds, sk_irect_t* outSubset, sk_ipoint_t* outOffset) 3190 static sk_image_t* sk_image_make_with_filter (sk_image_t* cimage, sk_imagefilter_t* filter, SKRectI* subset, SKRectI* clipBounds, SKRectI* outSubset, SKPointI* outOffset) 3191 { 3192 return .sk_image_make_with_filter (cimage, filter, subset, clipBounds, outSubset, outOffset); 3193 } 3194 3195 // sk_image_t* sk_image_new_from_adopted_texture(gr_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_alphatype_t alpha, sk_colorspace_t* colorSpace) 3196 static sk_image_t* sk_image_new_from_adopted_texture (gr_context_t* context, gr_backendtexture_t* texture, GRSurfaceOrigin origin, SKColorTypeNative colorType, SKAlphaType alpha, sk_colorspace_t* colorSpace) 3197 { 3198 return .sk_image_new_from_adopted_texture (context, texture, origin, colorType, alpha, colorSpace); 3199 } 3200 3201 // sk_image_t* sk_image_new_from_bitmap(const sk_bitmap_t* cbitmap) 3202 static sk_image_t* sk_image_new_from_bitmap (sk_bitmap_t* cbitmap) 3203 { 3204 return .sk_image_new_from_bitmap (cbitmap); 3205 } 3206 3207 // sk_image_t* sk_image_new_from_encoded(sk_data_t* encoded, const sk_irect_t* subset) 3208 static sk_image_t* sk_image_new_from_encoded (sk_data_t* encoded, SKRectI* subset) 3209 { 3210 return .sk_image_new_from_encoded (encoded, subset); 3211 } 3212 3213 // sk_image_t* sk_image_new_from_picture(sk_picture_t* picture, const sk_isize_t* dimensions, const sk_matrix_t* matrix, const sk_paint_t* paint) 3214 static sk_image_t* sk_image_new_from_picture (sk_picture_t* picture, SKSizeI* dimensions, SKMatrix* matrix, sk_paint_t* paint) 3215 { 3216 return .sk_image_new_from_picture (picture, dimensions, matrix, paint); 3217 } 3218 3219 // sk_image_t* sk_image_new_from_texture(gr_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_alphatype_t alpha, sk_colorspace_t* colorSpace, sk_image_texture_release_proc releaseProc, void* releaseContext) 3220 static sk_image_t* sk_image_new_from_texture (gr_context_t* context, gr_backendtexture_t* texture, GRSurfaceOrigin origin, SKColorTypeNative colorType, SKAlphaType alpha, sk_colorspace_t* colorSpace, SKImageTextureReleaseProxyDelegate releaseProc, void* releaseContext) 3221 { 3222 return .sk_image_new_from_texture (context, texture, origin, colorType, alpha, colorSpace, releaseProc, releaseContext); 3223 } 3224 3225 // sk_image_t* sk_image_new_raster(const sk_pixmap_t* pixmap, sk_image_raster_release_proc releaseProc, void* context) 3226 static sk_image_t* sk_image_new_raster (sk_pixmap_t* pixmap, SKImageRasterReleaseProxyDelegate releaseProc, void* context) 3227 { 3228 return .sk_image_new_raster (pixmap, releaseProc, context); 3229 } 3230 3231 // sk_image_t* sk_image_new_raster_copy(const sk_imageinfo_t*, const(void)* pixels, size_t rowBytes) 3232 static sk_image_t* sk_image_new_raster_copy (SKImageInfoNative* param0, void* pixels, size_t rowBytes) 3233 { 3234 return .sk_image_new_raster_copy (param0, pixels, rowBytes); 3235 } 3236 3237 // sk_image_t* sk_image_new_raster_copy_with_pixmap(const sk_pixmap_t* pixmap) 3238 static sk_image_t* sk_image_new_raster_copy_with_pixmap (sk_pixmap_t* pixmap) 3239 { 3240 return .sk_image_new_raster_copy_with_pixmap (pixmap); 3241 } 3242 3243 // sk_image_t* sk_image_new_raster_data(const sk_imageinfo_t* cinfo, sk_data_t* pixels, size_t rowBytes) 3244 static sk_image_t* sk_image_new_raster_data (SKImageInfoNative* cinfo, sk_data_t* pixels, size_t rowBytes) 3245 { 3246 return .sk_image_new_raster_data (cinfo, pixels, rowBytes); 3247 } 3248 3249 // bool sk_image_peek_pixels(const sk_image_t* image, sk_pixmap_t* pixmap) 3250 static bool sk_image_peek_pixels (sk_image_t* image, sk_pixmap_t* pixmap) 3251 { 3252 return .sk_image_peek_pixels (image, pixmap); 3253 } 3254 3255 // bool sk_image_read_pixels(const sk_image_t* image, const sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY, sk_image_caching_hint_t cachingHint) 3256 static bool sk_image_read_pixels (sk_image_t* image, SKImageInfoNative* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY, SKImageCachingHint cachingHint) 3257 { 3258 return .sk_image_read_pixels (image, dstInfo, dstPixels, dstRowBytes, srcX, srcY, cachingHint); 3259 } 3260 3261 // bool sk_image_read_pixels_into_pixmap(const sk_image_t* image, const sk_pixmap_t* dst, int srcX, int srcY, sk_image_caching_hint_t cachingHint) 3262 static bool sk_image_read_pixels_into_pixmap (sk_image_t* image, sk_pixmap_t* dst, int srcX, int srcY, SKImageCachingHint cachingHint) 3263 { 3264 return .sk_image_read_pixels_into_pixmap (image, dst, srcX, srcY, cachingHint); 3265 } 3266 3267 // void sk_image_ref(const sk_image_t*) 3268 static void sk_image_ref (sk_image_t* param0) 3269 { 3270 .sk_image_ref (param0); 3271 } 3272 3273 // sk_data_t* sk_image_ref_encoded(const sk_image_t*) 3274 static sk_data_t* sk_image_ref_encoded (sk_image_t* param0) 3275 { 3276 return .sk_image_ref_encoded (param0); 3277 } 3278 3279 // bool sk_image_scale_pixels(const sk_image_t* image, const sk_pixmap_t* dst, sk_filter_quality_t quality, sk_image_caching_hint_t cachingHint) 3280 static bool sk_image_scale_pixels (sk_image_t* image, sk_pixmap_t* dst, SKFilterQuality quality, SKImageCachingHint cachingHint) 3281 { 3282 return .sk_image_scale_pixels (image, dst, quality, cachingHint); 3283 } 3284 3285 // void sk_image_unref(const sk_image_t*) 3286 static void sk_image_unref (sk_image_t* param0) 3287 { 3288 .sk_image_unref (param0); 3289 } 3290 3291 // end header: sk_image.h 3292 3293 // for header: sk_imagefilter.h 3294 3295 // void sk_imagefilter_croprect_destructor(sk_imagefilter_croprect_t* cropRect) 3296 static void sk_imagefilter_croprect_destructor (sk_imagefilter_croprect_t* cropRect) 3297 { 3298 .sk_imagefilter_croprect_destructor (cropRect); 3299 } 3300 3301 // uint32_t sk_imagefilter_croprect_get_flags(sk_imagefilter_croprect_t* cropRect) 3302 static uint sk_imagefilter_croprect_get_flags (sk_imagefilter_croprect_t* cropRect) 3303 { 3304 return .sk_imagefilter_croprect_get_flags (cropRect); 3305 } 3306 3307 // void sk_imagefilter_croprect_get_rect(sk_imagefilter_croprect_t* cropRect, sk_rect_t* rect) 3308 static void sk_imagefilter_croprect_get_rect (sk_imagefilter_croprect_t* cropRect, SKRect* rect) 3309 { 3310 .sk_imagefilter_croprect_get_rect (cropRect, rect); 3311 } 3312 3313 // sk_imagefilter_croprect_t* sk_imagefilter_croprect_new() 3314 static sk_imagefilter_croprect_t* sk_imagefilter_croprect_new () 3315 { 3316 return .sk_imagefilter_croprect_new (); 3317 } 3318 3319 // sk_imagefilter_croprect_t* sk_imagefilter_croprect_new_with_rect(const sk_rect_t* rect, uint32_t flags) 3320 static sk_imagefilter_croprect_t* sk_imagefilter_croprect_new_with_rect (SKRect* rect, uint flags) 3321 { 3322 return .sk_imagefilter_croprect_new_with_rect (rect, flags); 3323 } 3324 3325 // sk_imagefilter_t* sk_imagefilter_new_alpha_threshold(const sk_region_t* region, float innerThreshold, float outerThreshold, sk_imagefilter_t* input) 3326 static sk_imagefilter_t* sk_imagefilter_new_alpha_threshold (sk_region_t* region, float innerThreshold, float outerThreshold, sk_imagefilter_t* input) 3327 { 3328 return .sk_imagefilter_new_alpha_threshold (region, innerThreshold, outerThreshold, input); 3329 } 3330 3331 // sk_imagefilter_t* sk_imagefilter_new_arithmetic(float k1, float k2, float k3, float k4, bool enforcePMColor, sk_imagefilter_t* background, sk_imagefilter_t* foreground, const sk_imagefilter_croprect_t* cropRect) 3332 static sk_imagefilter_t* sk_imagefilter_new_arithmetic (float k1, float k2, float k3, float k4, bool enforcePMColor, sk_imagefilter_t* background, sk_imagefilter_t* foreground, sk_imagefilter_croprect_t* cropRect) 3333 { 3334 return .sk_imagefilter_new_arithmetic (k1, k2, k3, k4, enforcePMColor, background, foreground, cropRect); 3335 } 3336 3337 // sk_imagefilter_t* sk_imagefilter_new_blur(float sigmaX, float sigmaY, sk_shader_tilemode_t tileMode, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3338 static sk_imagefilter_t* sk_imagefilter_new_blur (float sigmaX, float sigmaY, SKShaderTileMode tileMode, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3339 { 3340 return .sk_imagefilter_new_blur (sigmaX, sigmaY, tileMode, input, cropRect); 3341 } 3342 3343 // sk_imagefilter_t* sk_imagefilter_new_color_filter(sk_colorfilter_t* cf, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3344 static sk_imagefilter_t* sk_imagefilter_new_color_filter (sk_colorfilter_t* cf, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3345 { 3346 return .sk_imagefilter_new_color_filter (cf, input, cropRect); 3347 } 3348 3349 // sk_imagefilter_t* sk_imagefilter_new_compose(sk_imagefilter_t* outer, sk_imagefilter_t* inner) 3350 static sk_imagefilter_t* sk_imagefilter_new_compose (sk_imagefilter_t* outer, sk_imagefilter_t* inner) 3351 { 3352 return .sk_imagefilter_new_compose (outer, inner); 3353 } 3354 3355 // sk_imagefilter_t* sk_imagefilter_new_dilate(int radiusX, int radiusY, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3356 static sk_imagefilter_t* sk_imagefilter_new_dilate (int radiusX, int radiusY, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3357 { 3358 return .sk_imagefilter_new_dilate (radiusX, radiusY, input, cropRect); 3359 } 3360 3361 // sk_imagefilter_t* sk_imagefilter_new_displacement_map_effect(sk_color_channel_t xChannelSelector, sk_color_channel_t yChannelSelector, float scale, sk_imagefilter_t* displacement, sk_imagefilter_t* color, const sk_imagefilter_croprect_t* cropRect) 3362 static sk_imagefilter_t* sk_imagefilter_new_displacement_map_effect (SKColorChannel xChannelSelector, SKColorChannel yChannelSelector, float scale, sk_imagefilter_t* displacement, sk_imagefilter_t* color, sk_imagefilter_croprect_t* cropRect) 3363 { 3364 return .sk_imagefilter_new_displacement_map_effect (xChannelSelector, yChannelSelector, scale, displacement, color, cropRect); 3365 } 3366 3367 // sk_imagefilter_t* sk_imagefilter_new_distant_lit_diffuse(const sk_point3_t* direction, sk_color_t lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3368 static sk_imagefilter_t* sk_imagefilter_new_distant_lit_diffuse (SKPoint3* direction, uint lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3369 { 3370 return .sk_imagefilter_new_distant_lit_diffuse (direction, lightColor, surfaceScale, kd, input, cropRect); 3371 } 3372 3373 // sk_imagefilter_t* sk_imagefilter_new_distant_lit_specular(const sk_point3_t* direction, sk_color_t lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3374 static sk_imagefilter_t* sk_imagefilter_new_distant_lit_specular (SKPoint3* direction, uint lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3375 { 3376 return .sk_imagefilter_new_distant_lit_specular (direction, lightColor, surfaceScale, ks, shininess, input, cropRect); 3377 } 3378 3379 // sk_imagefilter_t* sk_imagefilter_new_drop_shadow(float dx, float dy, float sigmaX, float sigmaY, sk_color_t color, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3380 static sk_imagefilter_t* sk_imagefilter_new_drop_shadow (float dx, float dy, float sigmaX, float sigmaY, uint color, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3381 { 3382 return .sk_imagefilter_new_drop_shadow (dx, dy, sigmaX, sigmaY, color, input, cropRect); 3383 } 3384 3385 // sk_imagefilter_t* sk_imagefilter_new_drop_shadow_only(float dx, float dy, float sigmaX, float sigmaY, sk_color_t color, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3386 static sk_imagefilter_t* sk_imagefilter_new_drop_shadow_only (float dx, float dy, float sigmaX, float sigmaY, uint color, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3387 { 3388 return .sk_imagefilter_new_drop_shadow_only (dx, dy, sigmaX, sigmaY, color, input, cropRect); 3389 } 3390 3391 // sk_imagefilter_t* sk_imagefilter_new_erode(int radiusX, int radiusY, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3392 static sk_imagefilter_t* sk_imagefilter_new_erode (int radiusX, int radiusY, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3393 { 3394 return .sk_imagefilter_new_erode (radiusX, radiusY, input, cropRect); 3395 } 3396 3397 // sk_imagefilter_t* sk_imagefilter_new_image_source(sk_image_t* image, const sk_rect_t* srcRect, const sk_rect_t* dstRect, sk_filter_quality_t filterQuality) 3398 static sk_imagefilter_t* sk_imagefilter_new_image_source (sk_image_t* image, SKRect* srcRect, SKRect* dstRect, SKFilterQuality filterQuality) 3399 { 3400 return .sk_imagefilter_new_image_source (image, srcRect, dstRect, filterQuality); 3401 } 3402 3403 // sk_imagefilter_t* sk_imagefilter_new_image_source_default(sk_image_t* image) 3404 static sk_imagefilter_t* sk_imagefilter_new_image_source_default (sk_image_t* image) 3405 { 3406 return .sk_imagefilter_new_image_source_default (image); 3407 } 3408 3409 // sk_imagefilter_t* sk_imagefilter_new_magnifier(const sk_rect_t* src, float inset, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3410 static sk_imagefilter_t* sk_imagefilter_new_magnifier (SKRect* src, float inset, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3411 { 3412 return .sk_imagefilter_new_magnifier (src, inset, input, cropRect); 3413 } 3414 3415 // sk_imagefilter_t* sk_imagefilter_new_matrix(const sk_matrix_t* matrix, sk_filter_quality_t quality, sk_imagefilter_t* input) 3416 static sk_imagefilter_t* sk_imagefilter_new_matrix (SKMatrix* matrix, SKFilterQuality quality, sk_imagefilter_t* input) 3417 { 3418 return .sk_imagefilter_new_matrix (matrix, quality, input); 3419 } 3420 3421 // sk_imagefilter_t* sk_imagefilter_new_matrix_convolution(const sk_isize_t* kernelSize, const float* kernel, float gain, float bias, const sk_ipoint_t* kernelOffset, sk_shader_tilemode_t tileMode, bool convolveAlpha, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3422 static sk_imagefilter_t* sk_imagefilter_new_matrix_convolution (SKSizeI* kernelSize, float* kernel, float gain, float bias, SKPointI* kernelOffset, SKShaderTileMode tileMode, bool convolveAlpha, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3423 { 3424 return .sk_imagefilter_new_matrix_convolution (kernelSize, kernel, gain, bias, kernelOffset, tileMode, convolveAlpha, input, cropRect); 3425 } 3426 3427 // sk_imagefilter_t* sk_imagefilter_new_merge(sk_imagefilter_t** filters, int count, const sk_imagefilter_croprect_t* cropRect) 3428 static sk_imagefilter_t* sk_imagefilter_new_merge (sk_imagefilter_t** filters, int count, sk_imagefilter_croprect_t* cropRect) 3429 { 3430 return .sk_imagefilter_new_merge (filters, count, cropRect); 3431 } 3432 3433 // sk_imagefilter_t* sk_imagefilter_new_offset(float dx, float dy, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3434 static sk_imagefilter_t* sk_imagefilter_new_offset (float dx, float dy, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3435 { 3436 return .sk_imagefilter_new_offset (dx, dy, input, cropRect); 3437 } 3438 3439 // sk_imagefilter_t* sk_imagefilter_new_paint(const sk_paint_t* paint, const sk_imagefilter_croprect_t* cropRect) 3440 static sk_imagefilter_t* sk_imagefilter_new_paint (sk_paint_t* paint, sk_imagefilter_croprect_t* cropRect) 3441 { 3442 return .sk_imagefilter_new_paint (paint, cropRect); 3443 } 3444 3445 // sk_imagefilter_t* sk_imagefilter_new_picture(sk_picture_t* picture) 3446 static sk_imagefilter_t* sk_imagefilter_new_picture (sk_picture_t* picture) 3447 { 3448 return .sk_imagefilter_new_picture (picture); 3449 } 3450 3451 // sk_imagefilter_t* sk_imagefilter_new_picture_with_croprect(sk_picture_t* picture, const sk_rect_t* cropRect) 3452 static sk_imagefilter_t* sk_imagefilter_new_picture_with_croprect (sk_picture_t* picture, SKRect* cropRect) 3453 { 3454 return .sk_imagefilter_new_picture_with_croprect (picture, cropRect); 3455 } 3456 3457 // sk_imagefilter_t* sk_imagefilter_new_point_lit_diffuse(const sk_point3_t* location, sk_color_t lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3458 static sk_imagefilter_t* sk_imagefilter_new_point_lit_diffuse (SKPoint3* location, uint lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3459 { 3460 return .sk_imagefilter_new_point_lit_diffuse (location, lightColor, surfaceScale, kd, input, cropRect); 3461 } 3462 3463 // sk_imagefilter_t* sk_imagefilter_new_point_lit_specular(const sk_point3_t* location, sk_color_t lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3464 static sk_imagefilter_t* sk_imagefilter_new_point_lit_specular (SKPoint3* location, uint lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3465 { 3466 return .sk_imagefilter_new_point_lit_specular (location, lightColor, surfaceScale, ks, shininess, input, cropRect); 3467 } 3468 3469 // sk_imagefilter_t* sk_imagefilter_new_spot_lit_diffuse(const sk_point3_t* location, const sk_point3_t* target, float specularExponent, float cutoffAngle, sk_color_t lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3470 static sk_imagefilter_t* sk_imagefilter_new_spot_lit_diffuse (SKPoint3* location, SKPoint3* target, float specularExponent, float cutoffAngle, uint lightColor, float surfaceScale, float kd, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3471 { 3472 return .sk_imagefilter_new_spot_lit_diffuse (location, target, specularExponent, cutoffAngle, lightColor, surfaceScale, kd, input, cropRect); 3473 } 3474 3475 // sk_imagefilter_t* sk_imagefilter_new_spot_lit_specular(const sk_point3_t* location, const sk_point3_t* target, float specularExponent, float cutoffAngle, sk_color_t lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, const sk_imagefilter_croprect_t* cropRect) 3476 static sk_imagefilter_t* sk_imagefilter_new_spot_lit_specular (SKPoint3* location, SKPoint3* target, float specularExponent, float cutoffAngle, uint lightColor, float surfaceScale, float ks, float shininess, sk_imagefilter_t* input, sk_imagefilter_croprect_t* cropRect) 3477 { 3478 return .sk_imagefilter_new_spot_lit_specular (location, target, specularExponent, cutoffAngle, lightColor, surfaceScale, ks, shininess, input, cropRect); 3479 } 3480 3481 // sk_imagefilter_t* sk_imagefilter_new_tile(const sk_rect_t* src, const sk_rect_t* dst, sk_imagefilter_t* input) 3482 static sk_imagefilter_t* sk_imagefilter_new_tile (SKRect* src, SKRect* dst, sk_imagefilter_t* input) 3483 { 3484 return .sk_imagefilter_new_tile (src, dst, input); 3485 } 3486 3487 // sk_imagefilter_t* sk_imagefilter_new_xfermode(sk_blendmode_t mode, sk_imagefilter_t* background, sk_imagefilter_t* foreground, const sk_imagefilter_croprect_t* cropRect) 3488 static sk_imagefilter_t* sk_imagefilter_new_xfermode (SKBlendMode mode, sk_imagefilter_t* background, sk_imagefilter_t* foreground, sk_imagefilter_croprect_t* cropRect) 3489 { 3490 return .sk_imagefilter_new_xfermode (mode, background, foreground, cropRect); 3491 } 3492 3493 // void sk_imagefilter_unref(sk_imagefilter_t*) 3494 static void sk_imagefilter_unref (sk_imagefilter_t* param0) 3495 { 3496 .sk_imagefilter_unref (param0); 3497 } 3498 3499 // end header: sk_imagefilter.h 3500 3501 // for header: sk_mask.h 3502 3503 // uint8_t* sk_mask_alloc_image(size_t bytes) 3504 static ubyte* sk_mask_alloc_image (size_t bytes) 3505 { 3506 return cast(ubyte*).sk_mask_alloc_image (bytes); 3507 } 3508 3509 // size_t sk_mask_compute_image_size(sk_mask_t* cmask) 3510 static size_t sk_mask_compute_image_size (SKMask* cmask) 3511 { 3512 return .sk_mask_compute_image_size (cmask); 3513 } 3514 3515 // size_t sk_mask_compute_total_image_size(sk_mask_t* cmask) 3516 static size_t sk_mask_compute_total_image_size (SKMask* cmask) 3517 { 3518 return .sk_mask_compute_total_image_size (cmask); 3519 } 3520 3521 // void sk_mask_free_image(void* image) 3522 static void sk_mask_free_image (void* image) 3523 { 3524 .sk_mask_free_image (image); 3525 } 3526 3527 // void* sk_mask_get_addr(sk_mask_t* cmask, int x, int y) 3528 static void* sk_mask_get_addr (SKMask* cmask, int x, int y) 3529 { 3530 return .sk_mask_get_addr (cmask, x, y); 3531 } 3532 3533 // uint8_t* sk_mask_get_addr_1(sk_mask_t* cmask, int x, int y) 3534 static ubyte* sk_mask_get_addr_1 (SKMask* cmask, int x, int y) 3535 { 3536 return cast(ubyte*).sk_mask_get_addr_1 (cmask, x, y); 3537 } 3538 3539 // uint32_t* sk_mask_get_addr_32(sk_mask_t* cmask, int x, int y) 3540 static uint* sk_mask_get_addr_32 (SKMask* cmask, int x, int y) 3541 { 3542 return .sk_mask_get_addr_32 (cmask, x, y); 3543 } 3544 3545 // uint8_t* sk_mask_get_addr_8(sk_mask_t* cmask, int x, int y) 3546 static ubyte* sk_mask_get_addr_8 (SKMask* cmask, int x, int y) 3547 { 3548 return cast(ubyte*).sk_mask_get_addr_8 (cmask, x, y); 3549 } 3550 3551 // uint16_t* sk_mask_get_addr_lcd_16(sk_mask_t* cmask, int x, int y) 3552 static ushort* sk_mask_get_addr_lcd_16 (SKMask* cmask, int x, int y) 3553 { 3554 return .sk_mask_get_addr_lcd_16 (cmask, x, y); 3555 } 3556 3557 // bool sk_mask_is_empty(sk_mask_t* cmask) 3558 static bool sk_mask_is_empty (SKMask* cmask) 3559 { 3560 return .sk_mask_is_empty (cmask); 3561 } 3562 3563 // end header: sk_mask.h 3564 3565 // for header: sk_maskfilter.h 3566 3567 // sk_maskfilter_t* sk_maskfilter_new_blur(sk_blurstyle_t, float sigma) 3568 static sk_maskfilter_t* sk_maskfilter_new_blur (SKBlurStyle param0, float sigma) 3569 { 3570 return .sk_maskfilter_new_blur (param0, sigma); 3571 } 3572 3573 // sk_maskfilter_t* sk_maskfilter_new_blur_with_flags(sk_blurstyle_t, float sigma, bool respectCTM) 3574 static sk_maskfilter_t* sk_maskfilter_new_blur_with_flags (SKBlurStyle param0, float sigma, bool respectCTM) 3575 { 3576 return .sk_maskfilter_new_blur_with_flags (param0, sigma, respectCTM); 3577 } 3578 3579 // sk_maskfilter_t* sk_maskfilter_new_clip(uint8_t min, uint8_t max) 3580 static sk_maskfilter_t* sk_maskfilter_new_clip (ubyte min, ubyte max) 3581 { 3582 return .sk_maskfilter_new_clip (min, max); 3583 } 3584 3585 // sk_maskfilter_t* sk_maskfilter_new_gamma(float gamma) 3586 static sk_maskfilter_t* sk_maskfilter_new_gamma (float gamma) 3587 { 3588 return .sk_maskfilter_new_gamma (gamma); 3589 } 3590 3591 // sk_maskfilter_t* sk_maskfilter_new_shader(sk_shader_t* cshader) 3592 static sk_maskfilter_t* sk_maskfilter_new_shader (sk_shader_t* cshader) 3593 { 3594 return .sk_maskfilter_new_shader (cshader); 3595 } 3596 3597 // sk_maskfilter_t* sk_maskfilter_new_table(const uint8_t[256] table = 256) 3598 static sk_maskfilter_t* sk_maskfilter_new_table (ubyte* table) 3599 { 3600 return .sk_maskfilter_new_table (table); 3601 } 3602 3603 // void sk_maskfilter_ref(sk_maskfilter_t*) 3604 static void sk_maskfilter_ref (sk_maskfilter_t* param0) 3605 { 3606 .sk_maskfilter_ref (param0); 3607 } 3608 3609 // void sk_maskfilter_unref(sk_maskfilter_t*) 3610 static void sk_maskfilter_unref (sk_maskfilter_t* param0) 3611 { 3612 .sk_maskfilter_unref (param0); 3613 } 3614 3615 // end header: sk_maskfilter.h 3616 3617 // for header: sk_matrix.h 3618 3619 // void sk_3dview_apply_to_canvas(sk_3dview_t* cview, sk_canvas_t* ccanvas) 3620 static void sk_3dview_apply_to_canvas (sk_3dview_t* cview, sk_canvas_t* ccanvas) 3621 { 3622 .sk_3dview_apply_to_canvas (cview, ccanvas); 3623 } 3624 3625 // void sk_3dview_destroy(sk_3dview_t* cview) 3626 static void sk_3dview_destroy (sk_3dview_t* cview) 3627 { 3628 .sk_3dview_destroy (cview); 3629 } 3630 3631 // float sk_3dview_dot_with_normal(sk_3dview_t* cview, float dx, float dy, float dz) 3632 static float sk_3dview_dot_with_normal (sk_3dview_t* cview, float dx, float dy, float dz) 3633 { 3634 return .sk_3dview_dot_with_normal (cview, dx, dy, dz); 3635 } 3636 3637 // void sk_3dview_get_matrix(sk_3dview_t* cview, sk_matrix_t* cmatrix) 3638 static void sk_3dview_get_matrix (sk_3dview_t* cview, SKMatrix* cmatrix) 3639 { 3640 .sk_3dview_get_matrix (cview, cmatrix); 3641 } 3642 3643 // sk_3dview_t* sk_3dview_new() 3644 static sk_3dview_t* sk_3dview_new () 3645 { 3646 return .sk_3dview_new (); 3647 } 3648 3649 // void sk_3dview_restore(sk_3dview_t* cview) 3650 static void sk_3dview_restore (sk_3dview_t* cview) 3651 { 3652 .sk_3dview_restore (cview); 3653 } 3654 3655 // void sk_3dview_rotate_x_degrees(sk_3dview_t* cview, float degrees) 3656 static void sk_3dview_rotate_x_degrees (sk_3dview_t* cview, float degrees) 3657 { 3658 .sk_3dview_rotate_x_degrees (cview, degrees); 3659 } 3660 3661 // void sk_3dview_rotate_x_radians(sk_3dview_t* cview, float radians) 3662 static void sk_3dview_rotate_x_radians (sk_3dview_t* cview, float radians) 3663 { 3664 .sk_3dview_rotate_x_radians (cview, radians); 3665 } 3666 3667 // void sk_3dview_rotate_y_degrees(sk_3dview_t* cview, float degrees) 3668 static void sk_3dview_rotate_y_degrees (sk_3dview_t* cview, float degrees) 3669 { 3670 .sk_3dview_rotate_y_degrees (cview, degrees); 3671 } 3672 3673 // void sk_3dview_rotate_y_radians(sk_3dview_t* cview, float radians) 3674 static void sk_3dview_rotate_y_radians (sk_3dview_t* cview, float radians) 3675 { 3676 .sk_3dview_rotate_y_radians (cview, radians); 3677 } 3678 3679 // void sk_3dview_rotate_z_degrees(sk_3dview_t* cview, float degrees) 3680 static void sk_3dview_rotate_z_degrees (sk_3dview_t* cview, float degrees) 3681 { 3682 .sk_3dview_rotate_z_degrees (cview, degrees); 3683 } 3684 3685 // void sk_3dview_rotate_z_radians(sk_3dview_t* cview, float radians) 3686 static void sk_3dview_rotate_z_radians (sk_3dview_t* cview, float radians) 3687 { 3688 .sk_3dview_rotate_z_radians (cview, radians); 3689 } 3690 3691 // void sk_3dview_save(sk_3dview_t* cview) 3692 static void sk_3dview_save (sk_3dview_t* cview) 3693 { 3694 .sk_3dview_save (cview); 3695 } 3696 3697 // void sk_3dview_translate(sk_3dview_t* cview, float x, float y, float z) 3698 static void sk_3dview_translate (sk_3dview_t* cview, float x, float y, float z) 3699 { 3700 .sk_3dview_translate (cview, x, y, z); 3701 } 3702 3703 // void sk_matrix_concat(sk_matrix_t* result, sk_matrix_t* first, sk_matrix_t* second) 3704 static void sk_matrix_concat (SKMatrix* result, SKMatrix* first, SKMatrix* second) 3705 { 3706 .sk_matrix_concat (result, first, second); 3707 } 3708 3709 // void sk_matrix_map_points(sk_matrix_t* matrix, sk_point_t* dst, sk_point_t* src, int count) 3710 static void sk_matrix_map_points (SKMatrix* matrix, SKPoint* dst, SKPoint* src, int count) 3711 { 3712 .sk_matrix_map_points (matrix, dst, src, count); 3713 } 3714 3715 // float sk_matrix_map_radius(sk_matrix_t* matrix, float radius) 3716 static float sk_matrix_map_radius (SKMatrix* matrix, float radius) 3717 { 3718 return .sk_matrix_map_radius (matrix, radius); 3719 } 3720 3721 // void sk_matrix_map_rect(sk_matrix_t* matrix, sk_rect_t* dest, sk_rect_t* source) 3722 static void sk_matrix_map_rect (SKMatrix* matrix, SKRect* dest, SKRect* source) 3723 { 3724 .sk_matrix_map_rect (matrix, dest, source); 3725 } 3726 3727 // void sk_matrix_map_vector(sk_matrix_t* matrix, float x, float y, sk_point_t* result) 3728 static void sk_matrix_map_vector (SKMatrix* matrix, float x, float y, SKPoint* result) 3729 { 3730 .sk_matrix_map_vector (matrix, x, y, result); 3731 } 3732 3733 // void sk_matrix_map_vectors(sk_matrix_t* matrix, sk_point_t* dst, sk_point_t* src, int count) 3734 static void sk_matrix_map_vectors (SKMatrix* matrix, SKPoint* dst, SKPoint* src, int count) 3735 { 3736 .sk_matrix_map_vectors (matrix, dst, src, count); 3737 } 3738 3739 // void sk_matrix_map_xy(sk_matrix_t* matrix, float x, float y, sk_point_t* result) 3740 static void sk_matrix_map_xy (SKMatrix* matrix, float x, float y, SKPoint* result) 3741 { 3742 .sk_matrix_map_xy (matrix, x, y, result); 3743 } 3744 3745 // void sk_matrix_post_concat(sk_matrix_t* result, sk_matrix_t* matrix) 3746 static void sk_matrix_post_concat (SKMatrix* result, SKMatrix* matrix) 3747 { 3748 .sk_matrix_post_concat (result, matrix); 3749 } 3750 3751 // void sk_matrix_pre_concat(sk_matrix_t* result, sk_matrix_t* matrix) 3752 static void sk_matrix_pre_concat (SKMatrix* result, SKMatrix* matrix) 3753 { 3754 .sk_matrix_pre_concat (result, matrix); 3755 } 3756 3757 // bool sk_matrix_try_invert(sk_matrix_t* matrix, sk_matrix_t* result) 3758 static bool sk_matrix_try_invert (SKMatrix* matrix, SKMatrix* result) 3759 { 3760 return .sk_matrix_try_invert (matrix, result); 3761 } 3762 3763 // void sk_matrix44_as_col_major(sk_matrix44_t* matrix, float* dst) 3764 static void sk_matrix44_as_col_major (sk_matrix44_t* matrix, float* dst) 3765 { 3766 .sk_matrix44_as_col_major (matrix, dst); 3767 } 3768 3769 // void sk_matrix44_as_row_major(sk_matrix44_t* matrix, float* dst) 3770 static void sk_matrix44_as_row_major (sk_matrix44_t* matrix, float* dst) 3771 { 3772 .sk_matrix44_as_row_major (matrix, dst); 3773 } 3774 3775 // void sk_matrix44_destroy(sk_matrix44_t* matrix) 3776 static void sk_matrix44_destroy (sk_matrix44_t* matrix) 3777 { 3778 .sk_matrix44_destroy (matrix); 3779 } 3780 3781 // double sk_matrix44_determinant(sk_matrix44_t* matrix) 3782 static double sk_matrix44_determinant (sk_matrix44_t* matrix) 3783 { 3784 return .sk_matrix44_determinant (matrix); 3785 } 3786 3787 // bool sk_matrix44_equals(sk_matrix44_t* matrix, const sk_matrix44_t* other) 3788 static bool sk_matrix44_equals (sk_matrix44_t* matrix, sk_matrix44_t* other) 3789 { 3790 return .sk_matrix44_equals (matrix, other); 3791 } 3792 3793 // float sk_matrix44_get(sk_matrix44_t* matrix, int row, int col) 3794 static float sk_matrix44_get (sk_matrix44_t* matrix, int row, int col) 3795 { 3796 return .sk_matrix44_get (matrix, row, col); 3797 } 3798 3799 // sk_matrix44_type_mask_t sk_matrix44_get_type(sk_matrix44_t* matrix) 3800 static SKMatrix44TypeMask sk_matrix44_get_type (sk_matrix44_t* matrix) 3801 { 3802 return .sk_matrix44_get_type (matrix); 3803 } 3804 3805 // bool sk_matrix44_invert(sk_matrix44_t* matrix, sk_matrix44_t* inverse) 3806 static bool sk_matrix44_invert (sk_matrix44_t* matrix, sk_matrix44_t* inverse) 3807 { 3808 return .sk_matrix44_invert (matrix, inverse); 3809 } 3810 3811 // void sk_matrix44_map_scalars(sk_matrix44_t* matrix, const float* src, float* dst) 3812 static void sk_matrix44_map_scalars (sk_matrix44_t* matrix, float* src, float* dst) 3813 { 3814 .sk_matrix44_map_scalars (matrix, src, dst); 3815 } 3816 3817 // void sk_matrix44_map2(sk_matrix44_t* matrix, const float* src2, int count, float* dst4) 3818 static void sk_matrix44_map2 (sk_matrix44_t* matrix, float* src2, int count, float* dst4) 3819 { 3820 .sk_matrix44_map2 (matrix, src2, count, dst4); 3821 } 3822 3823 // sk_matrix44_t* sk_matrix44_new() 3824 static sk_matrix44_t* sk_matrix44_new () 3825 { 3826 return .sk_matrix44_new (); 3827 } 3828 3829 // sk_matrix44_t* sk_matrix44_new_concat(const sk_matrix44_t* a, const sk_matrix44_t* b) 3830 static sk_matrix44_t* sk_matrix44_new_concat (sk_matrix44_t* a, sk_matrix44_t* b) 3831 { 3832 return .sk_matrix44_new_concat (a, b); 3833 } 3834 3835 // sk_matrix44_t* sk_matrix44_new_copy(const sk_matrix44_t* src) 3836 static sk_matrix44_t* sk_matrix44_new_copy (sk_matrix44_t* src) 3837 { 3838 return .sk_matrix44_new_copy (src); 3839 } 3840 3841 // sk_matrix44_t* sk_matrix44_new_identity() 3842 static sk_matrix44_t* sk_matrix44_new_identity () 3843 { 3844 return .sk_matrix44_new_identity (); 3845 } 3846 3847 // sk_matrix44_t* sk_matrix44_new_matrix(const sk_matrix_t* src) 3848 static sk_matrix44_t* sk_matrix44_new_matrix (SKMatrix* src) 3849 { 3850 return .sk_matrix44_new_matrix (src); 3851 } 3852 3853 // void sk_matrix44_post_concat(sk_matrix44_t* matrix, const sk_matrix44_t* m) 3854 static void sk_matrix44_post_concat (sk_matrix44_t* matrix, sk_matrix44_t* m) 3855 { 3856 .sk_matrix44_post_concat (matrix, m); 3857 } 3858 3859 // void sk_matrix44_post_scale(sk_matrix44_t* matrix, float sx, float sy, float sz) 3860 static void sk_matrix44_post_scale (sk_matrix44_t* matrix, float sx, float sy, float sz) 3861 { 3862 .sk_matrix44_post_scale (matrix, sx, sy, sz); 3863 } 3864 3865 // void sk_matrix44_post_translate(sk_matrix44_t* matrix, float dx, float dy, float dz) 3866 static void sk_matrix44_post_translate (sk_matrix44_t* matrix, float dx, float dy, float dz) 3867 { 3868 .sk_matrix44_post_translate (matrix, dx, dy, dz); 3869 } 3870 3871 // void sk_matrix44_pre_concat(sk_matrix44_t* matrix, const sk_matrix44_t* m) 3872 static void sk_matrix44_pre_concat (sk_matrix44_t* matrix, sk_matrix44_t* m) 3873 { 3874 .sk_matrix44_pre_concat (matrix, m); 3875 } 3876 3877 // void sk_matrix44_pre_scale(sk_matrix44_t* matrix, float sx, float sy, float sz) 3878 static void sk_matrix44_pre_scale (sk_matrix44_t* matrix, float sx, float sy, float sz) 3879 { 3880 .sk_matrix44_pre_scale (matrix, sx, sy, sz); 3881 } 3882 3883 // void sk_matrix44_pre_translate(sk_matrix44_t* matrix, float dx, float dy, float dz) 3884 static void sk_matrix44_pre_translate (sk_matrix44_t* matrix, float dx, float dy, float dz) 3885 { 3886 .sk_matrix44_pre_translate (matrix, dx, dy, dz); 3887 } 3888 3889 // bool sk_matrix44_preserves_2d_axis_alignment(sk_matrix44_t* matrix, float epsilon) 3890 static bool sk_matrix44_preserves_2d_axis_alignment (sk_matrix44_t* matrix, float epsilon) 3891 { 3892 return .sk_matrix44_preserves_2d_axis_alignment (matrix, epsilon); 3893 } 3894 3895 // void sk_matrix44_set(sk_matrix44_t* matrix, int row, int col, float value) 3896 static void sk_matrix44_set (sk_matrix44_t* matrix, int row, int col, float value) 3897 { 3898 .sk_matrix44_set (matrix, row, col, value); 3899 } 3900 3901 // void sk_matrix44_set_3x3_row_major(sk_matrix44_t* matrix, float* dst) 3902 static void sk_matrix44_set_3x3_row_major (sk_matrix44_t* matrix, float* dst) 3903 { 3904 .sk_matrix44_set_3x3_row_major (matrix, dst); 3905 } 3906 3907 // void sk_matrix44_set_col_major(sk_matrix44_t* matrix, float* dst) 3908 static void sk_matrix44_set_col_major (sk_matrix44_t* matrix, float* dst) 3909 { 3910 .sk_matrix44_set_col_major (matrix, dst); 3911 } 3912 3913 // void sk_matrix44_set_concat(sk_matrix44_t* matrix, const sk_matrix44_t* a, const sk_matrix44_t* b) 3914 static void sk_matrix44_set_concat (sk_matrix44_t* matrix, sk_matrix44_t* a, sk_matrix44_t* b) 3915 { 3916 .sk_matrix44_set_concat (matrix, a, b); 3917 } 3918 3919 // void sk_matrix44_set_identity(sk_matrix44_t* matrix) 3920 static void sk_matrix44_set_identity (sk_matrix44_t* matrix) 3921 { 3922 .sk_matrix44_set_identity (matrix); 3923 } 3924 3925 // void sk_matrix44_set_rotate_about_degrees(sk_matrix44_t* matrix, float x, float y, float z, float degrees) 3926 static void sk_matrix44_set_rotate_about_degrees (sk_matrix44_t* matrix, float x, float y, float z, float degrees) 3927 { 3928 .sk_matrix44_set_rotate_about_degrees (matrix, x, y, z, degrees); 3929 } 3930 3931 // void sk_matrix44_set_rotate_about_radians(sk_matrix44_t* matrix, float x, float y, float z, float radians) 3932 static void sk_matrix44_set_rotate_about_radians (sk_matrix44_t* matrix, float x, float y, float z, float radians) 3933 { 3934 .sk_matrix44_set_rotate_about_radians (matrix, x, y, z, radians); 3935 } 3936 3937 // void sk_matrix44_set_rotate_about_radians_unit(sk_matrix44_t* matrix, float x, float y, float z, float radians) 3938 static void sk_matrix44_set_rotate_about_radians_unit (sk_matrix44_t* matrix, float x, float y, float z, float radians) 3939 { 3940 .sk_matrix44_set_rotate_about_radians_unit (matrix, x, y, z, radians); 3941 } 3942 3943 // void sk_matrix44_set_row_major(sk_matrix44_t* matrix, float* dst) 3944 static void sk_matrix44_set_row_major (sk_matrix44_t* matrix, float* dst) 3945 { 3946 .sk_matrix44_set_row_major (matrix, dst); 3947 } 3948 3949 // void sk_matrix44_set_scale(sk_matrix44_t* matrix, float sx, float sy, float sz) 3950 static void sk_matrix44_set_scale (sk_matrix44_t* matrix, float sx, float sy, float sz) 3951 { 3952 .sk_matrix44_set_scale (matrix, sx, sy, sz); 3953 } 3954 3955 // void sk_matrix44_set_translate(sk_matrix44_t* matrix, float dx, float dy, float dz) 3956 static void sk_matrix44_set_translate (sk_matrix44_t* matrix, float dx, float dy, float dz) 3957 { 3958 .sk_matrix44_set_translate (matrix, dx, dy, dz); 3959 } 3960 3961 // void sk_matrix44_to_matrix(sk_matrix44_t* matrix, sk_matrix_t* dst) 3962 static void sk_matrix44_to_matrix (sk_matrix44_t* matrix, SKMatrix* dst) 3963 { 3964 .sk_matrix44_to_matrix (matrix, dst); 3965 } 3966 3967 // void sk_matrix44_transpose(sk_matrix44_t* matrix) 3968 static void sk_matrix44_transpose (sk_matrix44_t* matrix) 3969 { 3970 .sk_matrix44_transpose (matrix); 3971 } 3972 3973 // end header: sk_matrix.h 3974 3975 // for header: sk_paint.h 3976 3977 // sk_paint_t* sk_paint_clone(sk_paint_t*) 3978 static sk_paint_t* sk_paint_clone (sk_paint_t* param0) 3979 { 3980 return .sk_paint_clone (param0); 3981 } 3982 3983 // void sk_paint_delete(sk_paint_t*) 3984 static void sk_paint_delete (sk_paint_t* param0) 3985 { 3986 .sk_paint_delete (param0); 3987 } 3988 3989 // sk_blendmode_t sk_paint_get_blendmode(sk_paint_t*) 3990 static SKBlendMode sk_paint_get_blendmode (sk_paint_t* param0) 3991 { 3992 return .sk_paint_get_blendmode (param0); 3993 } 3994 3995 // sk_color_t sk_paint_get_color(const sk_paint_t*) 3996 static uint sk_paint_get_color (sk_paint_t* param0) 3997 { 3998 return .sk_paint_get_color (param0); 3999 } 4000 4001 // void sk_paint_get_color4f(const sk_paint_t* paint, sk_color4f_t* color) 4002 static void sk_paint_get_color4f (sk_paint_t* paint, SKColorF* color) 4003 { 4004 .sk_paint_get_color4f (paint, color); 4005 } 4006 4007 // sk_colorfilter_t* sk_paint_get_colorfilter(sk_paint_t*) 4008 static sk_colorfilter_t* sk_paint_get_colorfilter (sk_paint_t* param0) 4009 { 4010 return .sk_paint_get_colorfilter (param0); 4011 } 4012 4013 // bool sk_paint_get_fill_path(const sk_paint_t*, const sk_path_t* src, sk_path_t* dst, const sk_rect_t* cullRect, float resScale) 4014 static bool sk_paint_get_fill_path (sk_paint_t* param0, sk_path_t* src, sk_path_t* dst, SKRect* cullRect, float resScale) 4015 { 4016 return .sk_paint_get_fill_path (param0, src, dst, cullRect, resScale); 4017 } 4018 4019 // sk_filter_quality_t sk_paint_get_filter_quality(sk_paint_t*) 4020 static SKFilterQuality sk_paint_get_filter_quality (sk_paint_t* param0) 4021 { 4022 return .sk_paint_get_filter_quality (param0); 4023 } 4024 4025 // sk_imagefilter_t* sk_paint_get_imagefilter(sk_paint_t*) 4026 static sk_imagefilter_t* sk_paint_get_imagefilter (sk_paint_t* param0) 4027 { 4028 return .sk_paint_get_imagefilter (param0); 4029 } 4030 4031 // sk_maskfilter_t* sk_paint_get_maskfilter(sk_paint_t*) 4032 static sk_maskfilter_t* sk_paint_get_maskfilter (sk_paint_t* param0) 4033 { 4034 return .sk_paint_get_maskfilter (param0); 4035 } 4036 4037 // sk_path_effect_t* sk_paint_get_path_effect(sk_paint_t* cpaint) 4038 static sk_path_effect_t* sk_paint_get_path_effect (sk_paint_t* cpaint) 4039 { 4040 return .sk_paint_get_path_effect (cpaint); 4041 } 4042 4043 // sk_shader_t* sk_paint_get_shader(sk_paint_t*) 4044 static sk_shader_t* sk_paint_get_shader (sk_paint_t* param0) 4045 { 4046 return .sk_paint_get_shader (param0); 4047 } 4048 4049 // sk_stroke_cap_t sk_paint_get_stroke_cap(const sk_paint_t*) 4050 static SKStrokeCap sk_paint_get_stroke_cap (sk_paint_t* param0) 4051 { 4052 return .sk_paint_get_stroke_cap (param0); 4053 } 4054 4055 // sk_stroke_join_t sk_paint_get_stroke_join(const sk_paint_t*) 4056 static SKStrokeJoin sk_paint_get_stroke_join (sk_paint_t* param0) 4057 { 4058 return .sk_paint_get_stroke_join (param0); 4059 } 4060 4061 // float sk_paint_get_stroke_miter(const sk_paint_t*) 4062 static float sk_paint_get_stroke_miter (sk_paint_t* param0) 4063 { 4064 return .sk_paint_get_stroke_miter (param0); 4065 } 4066 4067 // float sk_paint_get_stroke_width(const sk_paint_t*) 4068 static float sk_paint_get_stroke_width (sk_paint_t* param0) 4069 { 4070 return .sk_paint_get_stroke_width (param0); 4071 } 4072 4073 // sk_paint_style_t sk_paint_get_style(const sk_paint_t*) 4074 static SKPaintStyle sk_paint_get_style (sk_paint_t* param0) 4075 { 4076 return .sk_paint_get_style (param0); 4077 } 4078 4079 // bool sk_paint_is_antialias(const sk_paint_t*) 4080 static bool sk_paint_is_antialias (sk_paint_t* param0) 4081 { 4082 return .sk_paint_is_antialias (param0); 4083 } 4084 4085 // bool sk_paint_is_dither(const sk_paint_t*) 4086 static bool sk_paint_is_dither (sk_paint_t* param0) 4087 { 4088 return .sk_paint_is_dither (param0); 4089 } 4090 4091 // sk_paint_t* sk_paint_new() 4092 static sk_paint_t* sk_paint_new () 4093 { 4094 return .sk_paint_new (); 4095 } 4096 4097 // void sk_paint_reset(sk_paint_t*) 4098 static void sk_paint_reset (sk_paint_t* param0) 4099 { 4100 .sk_paint_reset (param0); 4101 } 4102 4103 // void sk_paint_set_antialias(sk_paint_t*, bool) 4104 static void sk_paint_set_antialias (sk_paint_t* param0, bool param1) 4105 { 4106 .sk_paint_set_antialias (param0, param1); 4107 } 4108 4109 // void sk_paint_set_blendmode(sk_paint_t*, sk_blendmode_t) 4110 static void sk_paint_set_blendmode (sk_paint_t* param0, SKBlendMode param1) 4111 { 4112 .sk_paint_set_blendmode (param0, param1); 4113 } 4114 4115 // void sk_paint_set_color(sk_paint_t*, sk_color_t) 4116 static void sk_paint_set_color (sk_paint_t* param0, uint param1) 4117 { 4118 .sk_paint_set_color (param0, param1); 4119 } 4120 4121 // void sk_paint_set_color4f(sk_paint_t* paint, sk_color4f_t* color, sk_colorspace_t* colorspace) 4122 static void sk_paint_set_color4f (sk_paint_t* paint, SKColorF* color, sk_colorspace_t* colorspace) 4123 { 4124 .sk_paint_set_color4f (paint, color, colorspace); 4125 } 4126 4127 // void sk_paint_set_colorfilter(sk_paint_t*, sk_colorfilter_t*) 4128 static void sk_paint_set_colorfilter (sk_paint_t* param0, sk_colorfilter_t* param1) 4129 { 4130 .sk_paint_set_colorfilter (param0, param1); 4131 } 4132 4133 // void sk_paint_set_dither(sk_paint_t*, bool) 4134 static void sk_paint_set_dither (sk_paint_t* param0, bool param1) 4135 { 4136 .sk_paint_set_dither (param0, param1); 4137 } 4138 4139 // void sk_paint_set_filter_quality(sk_paint_t*, sk_filter_quality_t) 4140 static void sk_paint_set_filter_quality (sk_paint_t* param0, SKFilterQuality param1) 4141 { 4142 .sk_paint_set_filter_quality (param0, param1); 4143 } 4144 4145 // void sk_paint_set_imagefilter(sk_paint_t*, sk_imagefilter_t*) 4146 static void sk_paint_set_imagefilter (sk_paint_t* param0, sk_imagefilter_t* param1) 4147 { 4148 .sk_paint_set_imagefilter (param0, param1); 4149 } 4150 4151 // void sk_paint_set_maskfilter(sk_paint_t*, sk_maskfilter_t*) 4152 static void sk_paint_set_maskfilter (sk_paint_t* param0, sk_maskfilter_t* param1) 4153 { 4154 .sk_paint_set_maskfilter (param0, param1); 4155 } 4156 4157 // void sk_paint_set_path_effect(sk_paint_t* cpaint, sk_path_effect_t* effect) 4158 static void sk_paint_set_path_effect (sk_paint_t* cpaint, sk_path_effect_t* effect) 4159 { 4160 .sk_paint_set_path_effect (cpaint, effect); 4161 } 4162 4163 // void sk_paint_set_shader(sk_paint_t*, sk_shader_t*) 4164 static void sk_paint_set_shader (sk_paint_t* param0, sk_shader_t* param1) 4165 { 4166 .sk_paint_set_shader (param0, param1); 4167 } 4168 4169 // void sk_paint_set_stroke_cap(sk_paint_t*, sk_stroke_cap_t) 4170 static void sk_paint_set_stroke_cap (sk_paint_t* param0, SKStrokeCap param1) 4171 { 4172 .sk_paint_set_stroke_cap (param0, param1); 4173 } 4174 4175 // void sk_paint_set_stroke_join(sk_paint_t*, sk_stroke_join_t) 4176 static void sk_paint_set_stroke_join (sk_paint_t* param0, SKStrokeJoin param1) 4177 { 4178 .sk_paint_set_stroke_join (param0, param1); 4179 } 4180 4181 // void sk_paint_set_stroke_miter(sk_paint_t*, float miter) 4182 static void sk_paint_set_stroke_miter (sk_paint_t* param0, float miter) 4183 { 4184 .sk_paint_set_stroke_miter (param0, miter); 4185 } 4186 4187 // void sk_paint_set_stroke_width(sk_paint_t*, float width) 4188 static void sk_paint_set_stroke_width (sk_paint_t* param0, float width) 4189 { 4190 .sk_paint_set_stroke_width (param0, width); 4191 } 4192 4193 // void sk_paint_set_style(sk_paint_t*, sk_paint_style_t) 4194 static void sk_paint_set_style (sk_paint_t* param0, SKPaintStyle param1) 4195 { 4196 .sk_paint_set_style (param0, param1); 4197 } 4198 4199 // end header: sk_paint.h 4200 4201 // for header: sk_path.h 4202 4203 // void sk_opbuilder_add(sk_opbuilder_t* builder, const sk_path_t* path, sk_pathop_t op) 4204 static void sk_opbuilder_add (sk_opbuilder_t* builder, sk_path_t* path, SKPathOp op) 4205 { 4206 .sk_opbuilder_add (builder, path, op); 4207 } 4208 4209 // void sk_opbuilder_destroy(sk_opbuilder_t* builder) 4210 static void sk_opbuilder_destroy (sk_opbuilder_t* builder) 4211 { 4212 .sk_opbuilder_destroy (builder); 4213 } 4214 4215 // sk_opbuilder_t* sk_opbuilder_new() 4216 static sk_opbuilder_t* sk_opbuilder_new () 4217 { 4218 return .sk_opbuilder_new (); 4219 } 4220 4221 // bool sk_opbuilder_resolve(sk_opbuilder_t* builder, sk_path_t* result) 4222 static bool sk_opbuilder_resolve (sk_opbuilder_t* builder, sk_path_t* result) 4223 { 4224 return .sk_opbuilder_resolve (builder, result); 4225 } 4226 4227 // void sk_path_add_arc(sk_path_t* cpath, const sk_rect_t* crect, float startAngle, float sweepAngle) 4228 static void sk_path_add_arc (sk_path_t* cpath, SKRect* crect, float startAngle, float sweepAngle) 4229 { 4230 .sk_path_add_arc (cpath, crect, startAngle, sweepAngle); 4231 } 4232 4233 // void sk_path_add_circle(sk_path_t*, float x, float y, float radius, sk_path_direction_t dir) 4234 static void sk_path_add_circle (sk_path_t* param0, float x, float y, float radius, SKPathDirection dir) 4235 { 4236 .sk_path_add_circle (param0, x, y, radius, dir); 4237 } 4238 4239 // void sk_path_add_oval(sk_path_t*, const sk_rect_t*, sk_path_direction_t) 4240 static void sk_path_add_oval (sk_path_t* param0, SKRect* param1, SKPathDirection param2) 4241 { 4242 .sk_path_add_oval (param0, param1, param2); 4243 } 4244 4245 // void sk_path_add_path(sk_path_t* cpath, sk_path_t* other, sk_path_add_mode_t add_mode) 4246 static void sk_path_add_path (sk_path_t* cpath, sk_path_t* other, SKPathAddMode add_mode) 4247 { 4248 .sk_path_add_path (cpath, other, add_mode); 4249 } 4250 4251 // void sk_path_add_path_matrix(sk_path_t* cpath, sk_path_t* other, sk_matrix_t* matrix, sk_path_add_mode_t add_mode) 4252 static void sk_path_add_path_matrix (sk_path_t* cpath, sk_path_t* other, SKMatrix* matrix, SKPathAddMode add_mode) 4253 { 4254 .sk_path_add_path_matrix (cpath, other, matrix, add_mode); 4255 } 4256 4257 // void sk_path_add_path_offset(sk_path_t* cpath, sk_path_t* other, float dx, float dy, sk_path_add_mode_t add_mode) 4258 static void sk_path_add_path_offset (sk_path_t* cpath, sk_path_t* other, float dx, float dy, SKPathAddMode add_mode) 4259 { 4260 .sk_path_add_path_offset (cpath, other, dx, dy, add_mode); 4261 } 4262 4263 // void sk_path_add_path_reverse(sk_path_t* cpath, sk_path_t* other) 4264 static void sk_path_add_path_reverse (sk_path_t* cpath, sk_path_t* other) 4265 { 4266 .sk_path_add_path_reverse (cpath, other); 4267 } 4268 4269 // void sk_path_add_poly(sk_path_t* cpath, const sk_point_t* points, int count, bool close) 4270 static void sk_path_add_poly (sk_path_t* cpath, SKPoint* points, int count, bool close) 4271 { 4272 .sk_path_add_poly (cpath, points, count, close); 4273 } 4274 4275 // void sk_path_add_rect(sk_path_t*, const sk_rect_t*, sk_path_direction_t) 4276 static void sk_path_add_rect (sk_path_t* param0, SKRect* param1, SKPathDirection param2) 4277 { 4278 .sk_path_add_rect (param0, param1, param2); 4279 } 4280 4281 // void sk_path_add_rect_start(sk_path_t* cpath, const sk_rect_t* crect, sk_path_direction_t cdir, uint32_t startIndex) 4282 static void sk_path_add_rect_start (sk_path_t* cpath, SKRect* crect, SKPathDirection cdir, uint startIndex) 4283 { 4284 .sk_path_add_rect_start (cpath, crect, cdir, startIndex); 4285 } 4286 4287 // void sk_path_add_rounded_rect(sk_path_t*, const sk_rect_t*, float, float, sk_path_direction_t) 4288 static void sk_path_add_rounded_rect (sk_path_t* param0, SKRect* param1, float param2, float param3, SKPathDirection param4) 4289 { 4290 .sk_path_add_rounded_rect (param0, param1, param2, param3, param4); 4291 } 4292 4293 // void sk_path_add_rrect(sk_path_t*, const sk_rrect_t*, sk_path_direction_t) 4294 static void sk_path_add_rrect (sk_path_t* param0, sk_rrect_t* param1, SKPathDirection param2) 4295 { 4296 .sk_path_add_rrect (param0, param1, param2); 4297 } 4298 4299 // void sk_path_add_rrect_start(sk_path_t*, const sk_rrect_t*, sk_path_direction_t, uint32_t) 4300 static void sk_path_add_rrect_start (sk_path_t* param0, sk_rrect_t* param1, SKPathDirection param2, uint param3) 4301 { 4302 .sk_path_add_rrect_start (param0, param1, param2, param3); 4303 } 4304 4305 // void sk_path_arc_to(sk_path_t*, float rx, float ry, float xAxisRotate, sk_path_arc_size_t largeArc, sk_path_direction_t sweep, float x, float y) 4306 static void sk_path_arc_to (sk_path_t* param0, float rx, float ry, float xAxisRotate, SKPathArcSize largeArc, SKPathDirection sweep, float x, float y) 4307 { 4308 .sk_path_arc_to (param0, rx, ry, xAxisRotate, largeArc, sweep, x, y); 4309 } 4310 4311 // void sk_path_arc_to_with_oval(sk_path_t*, const sk_rect_t* oval, float startAngle, float sweepAngle, bool forceMoveTo) 4312 static void sk_path_arc_to_with_oval (sk_path_t* param0, SKRect* oval, float startAngle, float sweepAngle, bool forceMoveTo) 4313 { 4314 .sk_path_arc_to_with_oval (param0, oval, startAngle, sweepAngle, forceMoveTo); 4315 } 4316 4317 // void sk_path_arc_to_with_points(sk_path_t*, float x1, float y1, float x2, float y2, float radius) 4318 static void sk_path_arc_to_with_points (sk_path_t* param0, float x1, float y1, float x2, float y2, float radius) 4319 { 4320 .sk_path_arc_to_with_points (param0, x1, y1, x2, y2, radius); 4321 } 4322 4323 // sk_path_t* sk_path_clone(const sk_path_t* cpath) 4324 static sk_path_t* sk_path_clone (sk_path_t* cpath) 4325 { 4326 return .sk_path_clone (cpath); 4327 } 4328 4329 // void sk_path_close(sk_path_t*) 4330 static void sk_path_close (sk_path_t* param0) 4331 { 4332 .sk_path_close (param0); 4333 } 4334 4335 // void sk_path_compute_tight_bounds(const sk_path_t*, sk_rect_t*) 4336 static void sk_path_compute_tight_bounds (sk_path_t* param0, SKRect* param1) 4337 { 4338 .sk_path_compute_tight_bounds (param0, param1); 4339 } 4340 4341 // void sk_path_conic_to(sk_path_t*, float x0, float y0, float x1, float y1, float w) 4342 static void sk_path_conic_to (sk_path_t* param0, float x0, float y0, float x1, float y1, float w) 4343 { 4344 .sk_path_conic_to (param0, x0, y0, x1, y1, w); 4345 } 4346 4347 // bool sk_path_contains(const sk_path_t* cpath, float x, float y) 4348 static bool sk_path_contains (sk_path_t* cpath, float x, float y) 4349 { 4350 return .sk_path_contains (cpath, x, y); 4351 } 4352 4353 // int sk_path_convert_conic_to_quads(const sk_point_t* p0, const sk_point_t* p1, const sk_point_t* p2, float w, sk_point_t* pts, int pow2) 4354 static int sk_path_convert_conic_to_quads (SKPoint* p0, SKPoint* p1, SKPoint* p2, float w, SKPoint* pts, int pow2) 4355 { 4356 return .sk_path_convert_conic_to_quads (p0, p1, p2, w, pts, pow2); 4357 } 4358 4359 // int sk_path_count_points(const sk_path_t* cpath) 4360 static int sk_path_count_points (sk_path_t* cpath) 4361 { 4362 return .sk_path_count_points (cpath); 4363 } 4364 4365 // int sk_path_count_verbs(const sk_path_t* cpath) 4366 static int sk_path_count_verbs (sk_path_t* cpath) 4367 { 4368 return .sk_path_count_verbs (cpath); 4369 } 4370 4371 // sk_path_iterator_t* sk_path_create_iter(sk_path_t* cpath, int forceClose) 4372 static sk_path_iterator_t* sk_path_create_iter (sk_path_t* cpath, int forceClose) 4373 { 4374 return .sk_path_create_iter (cpath, forceClose); 4375 } 4376 4377 // sk_path_rawiterator_t* sk_path_create_rawiter(sk_path_t* cpath) 4378 static sk_path_rawiterator_t* sk_path_create_rawiter (sk_path_t* cpath) 4379 { 4380 return .sk_path_create_rawiter (cpath); 4381 } 4382 4383 // void sk_path_cubic_to(sk_path_t*, float x0, float y0, float x1, float y1, float x2, float y2) 4384 static void sk_path_cubic_to (sk_path_t* param0, float x0, float y0, float x1, float y1, float x2, float y2) 4385 { 4386 .sk_path_cubic_to (param0, x0, y0, x1, y1, x2, y2); 4387 } 4388 4389 // void sk_path_delete(sk_path_t*) 4390 static void sk_path_delete (sk_path_t* param0) 4391 { 4392 .sk_path_delete (param0); 4393 } 4394 4395 // void sk_path_get_bounds(const sk_path_t*, sk_rect_t*) 4396 static void sk_path_get_bounds (sk_path_t* param0, SKRect* param1) 4397 { 4398 .sk_path_get_bounds (param0, param1); 4399 } 4400 4401 // sk_path_convexity_t sk_path_get_convexity(const sk_path_t* cpath) 4402 static SKPathConvexity sk_path_get_convexity (sk_path_t* cpath) 4403 { 4404 return .sk_path_get_convexity (cpath); 4405 } 4406 4407 // sk_path_filltype_t sk_path_get_filltype(sk_path_t*) 4408 static SKPathFillType sk_path_get_filltype (sk_path_t* param0) 4409 { 4410 return .sk_path_get_filltype (param0); 4411 } 4412 4413 // bool sk_path_get_last_point(const sk_path_t* cpath, sk_point_t* point) 4414 static bool sk_path_get_last_point (sk_path_t* cpath, SKPoint* point) 4415 { 4416 return .sk_path_get_last_point (cpath, point); 4417 } 4418 4419 // void sk_path_get_point(const sk_path_t* cpath, int index, sk_point_t* point) 4420 static void sk_path_get_point (sk_path_t* cpath, int index, SKPoint* point) 4421 { 4422 .sk_path_get_point (cpath, index, point); 4423 } 4424 4425 // int sk_path_get_points(const sk_path_t* cpath, sk_point_t* points, int max) 4426 static int sk_path_get_points (sk_path_t* cpath, SKPoint* points, int max) 4427 { 4428 return .sk_path_get_points (cpath, points, max); 4429 } 4430 4431 // uint32_t sk_path_get_segment_masks(sk_path_t* cpath) 4432 static uint sk_path_get_segment_masks (sk_path_t* cpath) 4433 { 4434 return .sk_path_get_segment_masks (cpath); 4435 } 4436 4437 // bool sk_path_is_line(sk_path_t* cpath, sk_point_t[2] line = 2) 4438 static bool sk_path_is_line (sk_path_t* cpath, SKPoint* line) 4439 { 4440 return .sk_path_is_line (cpath, line); 4441 } 4442 4443 // bool sk_path_is_oval(sk_path_t* cpath, sk_rect_t* bounds) 4444 static bool sk_path_is_oval (sk_path_t* cpath, SKRect* bounds) 4445 { 4446 return .sk_path_is_oval (cpath, bounds); 4447 } 4448 4449 // bool sk_path_is_rect(sk_path_t* cpath, sk_rect_t* rect, bool* isClosed, sk_path_direction_t* direction) 4450 static bool sk_path_is_rect (sk_path_t* cpath, SKRect* rect, bool* isClosed, SKPathDirection* direction) 4451 { 4452 return .sk_path_is_rect (cpath, rect, isClosed , direction); 4453 } 4454 4455 // bool sk_path_is_rrect(sk_path_t* cpath, sk_rrect_t* bounds) 4456 static bool sk_path_is_rrect (sk_path_t* cpath, sk_rrect_t* bounds) 4457 { 4458 return .sk_path_is_rrect (cpath, bounds); 4459 } 4460 4461 // float sk_path_iter_conic_weight(sk_path_iterator_t* iterator) 4462 static float sk_path_iter_conic_weight (sk_path_iterator_t* iterator) 4463 { 4464 return .sk_path_iter_conic_weight (iterator); 4465 } 4466 4467 // void sk_path_iter_destroy(sk_path_iterator_t* iterator) 4468 static void sk_path_iter_destroy (sk_path_iterator_t* iterator) 4469 { 4470 .sk_path_iter_destroy (iterator); 4471 } 4472 4473 // int sk_path_iter_is_close_line(sk_path_iterator_t* iterator) 4474 static int sk_path_iter_is_close_line (sk_path_iterator_t* iterator) 4475 { 4476 return .sk_path_iter_is_close_line (iterator); 4477 } 4478 4479 // int sk_path_iter_is_closed_contour(sk_path_iterator_t* iterator) 4480 static int sk_path_iter_is_closed_contour (sk_path_iterator_t* iterator) 4481 { 4482 return .sk_path_iter_is_closed_contour (iterator); 4483 } 4484 4485 // sk_path_verb_t sk_path_iter_next(sk_path_iterator_t* iterator, sk_point_t[4] points = 4) 4486 static SKPathVerb sk_path_iter_next (sk_path_iterator_t* iterator, SKPoint* points) 4487 { 4488 return .sk_path_iter_next (iterator, points); 4489 } 4490 4491 // void sk_path_line_to(sk_path_t*, float x, float y) 4492 static void sk_path_line_to (sk_path_t* param0, float x, float y) 4493 { 4494 .sk_path_line_to (param0, x, y); 4495 } 4496 4497 // void sk_path_move_to(sk_path_t*, float x, float y) 4498 static void sk_path_move_to (sk_path_t* param0, float x, float y) 4499 { 4500 .sk_path_move_to (param0, x, y); 4501 } 4502 4503 // sk_path_t* sk_path_new() 4504 static sk_path_t* sk_path_new () 4505 { 4506 return .sk_path_new (); 4507 } 4508 4509 // bool sk_path_parse_svg_string(sk_path_t* cpath, const(char)* str) 4510 static bool sk_path_parse_svg_string (sk_path_t* cpath, string str) 4511 { 4512 return .sk_path_parse_svg_string (cpath, str.toStringz()); 4513 } 4514 4515 // void sk_path_quad_to(sk_path_t*, float x0, float y0, float x1, float y1) 4516 static void sk_path_quad_to (sk_path_t* param0, float x0, float y0, float x1, float y1) 4517 { 4518 .sk_path_quad_to (param0, x0, y0, x1, y1); 4519 } 4520 4521 // void sk_path_rarc_to(sk_path_t*, float rx, float ry, float xAxisRotate, sk_path_arc_size_t largeArc, sk_path_direction_t sweep, float x, float y) 4522 static void sk_path_rarc_to (sk_path_t* param0, float rx, float ry, float xAxisRotate, SKPathArcSize largeArc, SKPathDirection sweep, float x, float y) 4523 { 4524 .sk_path_rarc_to (param0, rx, ry, xAxisRotate, largeArc, sweep, x, y); 4525 } 4526 4527 // float sk_path_rawiter_conic_weight(sk_path_rawiterator_t* iterator) 4528 static float sk_path_rawiter_conic_weight (sk_path_rawiterator_t* iterator) 4529 { 4530 return .sk_path_rawiter_conic_weight (iterator); 4531 } 4532 4533 // void sk_path_rawiter_destroy(sk_path_rawiterator_t* iterator) 4534 static void sk_path_rawiter_destroy (sk_path_rawiterator_t* iterator) 4535 { 4536 .sk_path_rawiter_destroy (iterator); 4537 } 4538 4539 // sk_path_verb_t sk_path_rawiter_next(sk_path_rawiterator_t* iterator, sk_point_t[4] points = 4) 4540 static SKPathVerb sk_path_rawiter_next (sk_path_rawiterator_t* iterator, SKPoint* points) 4541 { 4542 return .sk_path_rawiter_next (iterator, points); 4543 } 4544 4545 // sk_path_verb_t sk_path_rawiter_peek(sk_path_rawiterator_t* iterator) 4546 static SKPathVerb sk_path_rawiter_peek (sk_path_rawiterator_t* iterator) 4547 { 4548 return .sk_path_rawiter_peek (iterator); 4549 } 4550 4551 // void sk_path_rconic_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1, float w) 4552 static void sk_path_rconic_to (sk_path_t* param0, float dx0, float dy0, float dx1, float dy1, float w) 4553 { 4554 .sk_path_rconic_to (param0, dx0, dy0, dx1, dy1, w); 4555 } 4556 4557 // void sk_path_rcubic_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1, float dx2, float dy2) 4558 static void sk_path_rcubic_to (sk_path_t* param0, float dx0, float dy0, float dx1, float dy1, float dx2, float dy2) 4559 { 4560 .sk_path_rcubic_to (param0, dx0, dy0, dx1, dy1, dx2, dy2); 4561 } 4562 4563 // void sk_path_reset(sk_path_t* cpath) 4564 static void sk_path_reset (sk_path_t* cpath) 4565 { 4566 .sk_path_reset (cpath); 4567 } 4568 4569 // void sk_path_rewind(sk_path_t* cpath) 4570 static void sk_path_rewind (sk_path_t* cpath) 4571 { 4572 .sk_path_rewind (cpath); 4573 } 4574 4575 // void sk_path_rline_to(sk_path_t*, float dx, float yd) 4576 static void sk_path_rline_to (sk_path_t* param0, float dx, float yd) 4577 { 4578 .sk_path_rline_to (param0, dx, yd); 4579 } 4580 4581 // void sk_path_rmove_to(sk_path_t*, float dx, float dy) 4582 static void sk_path_rmove_to (sk_path_t* param0, float dx, float dy) 4583 { 4584 .sk_path_rmove_to (param0, dx, dy); 4585 } 4586 4587 // void sk_path_rquad_to(sk_path_t*, float dx0, float dy0, float dx1, float dy1) 4588 static void sk_path_rquad_to (sk_path_t* param0, float dx0, float dy0, float dx1, float dy1) 4589 { 4590 .sk_path_rquad_to (param0, dx0, dy0, dx1, dy1); 4591 } 4592 4593 // void sk_path_set_convexity(sk_path_t* cpath, sk_path_convexity_t convexity) 4594 static void sk_path_set_convexity (sk_path_t* cpath, SKPathConvexity convexity) 4595 { 4596 .sk_path_set_convexity (cpath, convexity); 4597 } 4598 4599 // void sk_path_set_filltype(sk_path_t*, sk_path_filltype_t) 4600 static void sk_path_set_filltype (sk_path_t* param0, SKPathFillType param1) 4601 { 4602 .sk_path_set_filltype (param0, param1); 4603 } 4604 4605 // void sk_path_to_svg_string(const sk_path_t* cpath, sk_string_t* str) 4606 static void sk_path_to_svg_string (sk_path_t* cpath, sk_string_t* str) 4607 { 4608 .sk_path_to_svg_string (cpath, str); 4609 } 4610 4611 // void sk_path_transform(sk_path_t* cpath, const sk_matrix_t* cmatrix) 4612 static void sk_path_transform (sk_path_t* cpath, SKMatrix* cmatrix) 4613 { 4614 .sk_path_transform (cpath, cmatrix); 4615 } 4616 4617 // void sk_path_transform_to_dest(const sk_path_t* cpath, const sk_matrix_t* cmatrix, sk_path_t* destination) 4618 static void sk_path_transform_to_dest (sk_path_t* cpath, SKMatrix* cmatrix, sk_path_t* destination) 4619 { 4620 .sk_path_transform_to_dest (cpath, cmatrix, destination); 4621 } 4622 4623 // void sk_pathmeasure_destroy(sk_pathmeasure_t* pathMeasure) 4624 static void sk_pathmeasure_destroy (sk_pathmeasure_t* pathMeasure) 4625 { 4626 .sk_pathmeasure_destroy (pathMeasure); 4627 } 4628 4629 // float sk_pathmeasure_get_length(sk_pathmeasure_t* pathMeasure) 4630 static float sk_pathmeasure_get_length (sk_pathmeasure_t* pathMeasure) 4631 { 4632 return .sk_pathmeasure_get_length (pathMeasure); 4633 } 4634 4635 // bool sk_pathmeasure_get_matrix(sk_pathmeasure_t* pathMeasure, float distance, sk_matrix_t* matrix, sk_pathmeasure_matrixflags_t flags) 4636 static bool sk_pathmeasure_get_matrix (sk_pathmeasure_t* pathMeasure, float distance, SKMatrix* matrix, SKPathMeasureMatrixFlags flags) 4637 { 4638 return .sk_pathmeasure_get_matrix (pathMeasure, distance, matrix, flags); 4639 } 4640 4641 // bool sk_pathmeasure_get_pos_tan(sk_pathmeasure_t* pathMeasure, float distance, sk_point_t* position, sk_vector_t* tangent) 4642 static bool sk_pathmeasure_get_pos_tan (sk_pathmeasure_t* pathMeasure, float distance, SKPoint* position, SKPoint* tangent) 4643 { 4644 return .sk_pathmeasure_get_pos_tan (pathMeasure, distance, position, tangent); 4645 } 4646 4647 // bool sk_pathmeasure_get_segment(sk_pathmeasure_t* pathMeasure, float start, float stop, sk_path_t* dst, bool startWithMoveTo) 4648 static bool sk_pathmeasure_get_segment (sk_pathmeasure_t* pathMeasure, float start, float stop, sk_path_t* dst, bool startWithMoveTo) 4649 { 4650 return .sk_pathmeasure_get_segment (pathMeasure, start, stop, dst, startWithMoveTo); 4651 } 4652 4653 // bool sk_pathmeasure_is_closed(sk_pathmeasure_t* pathMeasure) 4654 static bool sk_pathmeasure_is_closed (sk_pathmeasure_t* pathMeasure) 4655 { 4656 return .sk_pathmeasure_is_closed (pathMeasure); 4657 } 4658 4659 // sk_pathmeasure_t* sk_pathmeasure_new() 4660 static sk_pathmeasure_t* sk_pathmeasure_new () 4661 { 4662 return .sk_pathmeasure_new (); 4663 } 4664 4665 // sk_pathmeasure_t* sk_pathmeasure_new_with_path(const sk_path_t* path, bool forceClosed, float resScale) 4666 static sk_pathmeasure_t* sk_pathmeasure_new_with_path (sk_path_t* path, bool forceClosed, float resScale) 4667 { 4668 return .sk_pathmeasure_new_with_path (path, forceClosed, resScale); 4669 } 4670 4671 // bool sk_pathmeasure_next_contour(sk_pathmeasure_t* pathMeasure) 4672 static bool sk_pathmeasure_next_contour (sk_pathmeasure_t* pathMeasure) 4673 { 4674 return .sk_pathmeasure_next_contour (pathMeasure); 4675 } 4676 4677 // void sk_pathmeasure_set_path(sk_pathmeasure_t* pathMeasure, const sk_path_t* path, bool forceClosed) 4678 static void sk_pathmeasure_set_path (sk_pathmeasure_t* pathMeasure, sk_path_t* path, bool forceClosed) 4679 { 4680 .sk_pathmeasure_set_path (pathMeasure, path, forceClosed); 4681 } 4682 4683 // bool sk_pathop_as_winding(const sk_path_t* path, sk_path_t* result) 4684 static bool sk_pathop_as_winding (sk_path_t* path, sk_path_t* result) 4685 { 4686 return .sk_pathop_as_winding (path, result); 4687 } 4688 4689 // bool sk_pathop_op(const sk_path_t* one, const sk_path_t* two, sk_pathop_t op, sk_path_t* result) 4690 static bool sk_pathop_op (sk_path_t* one, sk_path_t* two, SKPathOp op, sk_path_t* result) 4691 { 4692 return .sk_pathop_op (one, two, op, result); 4693 } 4694 4695 // bool sk_pathop_simplify(const sk_path_t* path, sk_path_t* result) 4696 static bool sk_pathop_simplify (sk_path_t* path, sk_path_t* result) 4697 { 4698 return .sk_pathop_simplify (path, result); 4699 } 4700 4701 // bool sk_pathop_tight_bounds(const sk_path_t* path, sk_rect_t* result) 4702 static bool sk_pathop_tight_bounds (sk_path_t* path, SKRect* result) 4703 { 4704 return .sk_pathop_tight_bounds (path, result); 4705 } 4706 4707 // end header: sk_path.h 4708 4709 // for header: sk_patheffect.h 4710 4711 // sk_path_effect_t* sk_path_effect_create_1d_path(const sk_path_t* path, float advance, float phase, sk_path_effect_1d_style_t style) 4712 static sk_path_effect_t* sk_path_effect_create_1d_path (sk_path_t* path, float advance, float phase, SKPath1DPathEffectStyle style) 4713 { 4714 return .sk_path_effect_create_1d_path (path, advance, phase, style); 4715 } 4716 4717 // sk_path_effect_t* sk_path_effect_create_2d_line(float width, const sk_matrix_t* matrix) 4718 static sk_path_effect_t* sk_path_effect_create_2d_line (float width, SKMatrix* matrix) 4719 { 4720 return .sk_path_effect_create_2d_line (width, matrix); 4721 } 4722 4723 // sk_path_effect_t* sk_path_effect_create_2d_path(const sk_matrix_t* matrix, const sk_path_t* path) 4724 static sk_path_effect_t* sk_path_effect_create_2d_path (SKMatrix* matrix, sk_path_t* path) 4725 { 4726 return .sk_path_effect_create_2d_path (matrix, path); 4727 } 4728 4729 // sk_path_effect_t* sk_path_effect_create_compose(sk_path_effect_t* outer, sk_path_effect_t* inner) 4730 static sk_path_effect_t* sk_path_effect_create_compose (sk_path_effect_t* outer, sk_path_effect_t* inner) 4731 { 4732 return .sk_path_effect_create_compose (outer, inner); 4733 } 4734 4735 // sk_path_effect_t* sk_path_effect_create_corner(float radius) 4736 static sk_path_effect_t* sk_path_effect_create_corner (float radius) 4737 { 4738 return .sk_path_effect_create_corner (radius); 4739 } 4740 4741 // sk_path_effect_t* sk_path_effect_create_dash(const float* intervals, int count, float phase) 4742 static sk_path_effect_t* sk_path_effect_create_dash (float* intervals, int count, float phase) 4743 { 4744 return .sk_path_effect_create_dash (intervals, count, phase); 4745 } 4746 4747 // sk_path_effect_t* sk_path_effect_create_discrete(float segLength, float deviation, uint32_t seedAssist) 4748 static sk_path_effect_t* sk_path_effect_create_discrete (float segLength, float deviation, uint seedAssist) 4749 { 4750 return .sk_path_effect_create_discrete (segLength, deviation, seedAssist); 4751 } 4752 4753 // sk_path_effect_t* sk_path_effect_create_sum(sk_path_effect_t* first, sk_path_effect_t* second) 4754 static sk_path_effect_t* sk_path_effect_create_sum (sk_path_effect_t* first, sk_path_effect_t* second) 4755 { 4756 return .sk_path_effect_create_sum (first, second); 4757 } 4758 4759 // sk_path_effect_t* sk_path_effect_create_trim(float start, float stop, sk_path_effect_trim_mode_t mode) 4760 static sk_path_effect_t* sk_path_effect_create_trim (float start, float stop, SKTrimPathEffectMode mode) 4761 { 4762 return .sk_path_effect_create_trim (start, stop, mode); 4763 } 4764 4765 // void sk_path_effect_unref(sk_path_effect_t* t) 4766 static void sk_path_effect_unref (sk_path_effect_t* t) 4767 { 4768 .sk_path_effect_unref (t); 4769 } 4770 4771 // end header: sk_patheffect.h 4772 4773 // for header: sk_picture.h 4774 4775 // sk_picture_t* sk_picture_deserialize_from_data(sk_data_t* data) 4776 // static sk_picture_t* sk_picture_deserialize_from_data (sk_data_t* data) 4777 // { 4778 // return .sk_picture_deserialize_from_data (data); 4779 // } 4780 4781 // // sk_picture_t* sk_picture_deserialize_from_memory(void* buffer, size_t length) 4782 // static sk_picture_t* sk_picture_deserialize_from_memory (void* buffer, size_t length) 4783 // { 4784 // return .sk_picture_deserialize_from_memory (buffer, length); 4785 // } 4786 4787 // // sk_picture_t* sk_picture_deserialize_from_stream(sk_stream_t* stream) 4788 // static sk_picture_t* sk_picture_deserialize_from_stream (sk_stream_t* stream) 4789 // { 4790 // return .sk_picture_deserialize_from_stream (stream); 4791 // } 4792 4793 // void sk_picture_get_cull_rect(sk_picture_t*, sk_rect_t*) 4794 static void sk_picture_get_cull_rect (sk_picture_t* param0, SKRect* param1) 4795 { 4796 .sk_picture_get_cull_rect (param0, param1); 4797 } 4798 4799 // sk_canvas_t* sk_picture_get_recording_canvas(sk_picture_recorder_t* crec) 4800 static sk_canvas_t* sk_picture_get_recording_canvas (sk_picture_recorder_t* crec) 4801 { 4802 return .sk_picture_get_recording_canvas (crec); 4803 } 4804 4805 // uint32_t sk_picture_get_unique_id(sk_picture_t*) 4806 static uint sk_picture_get_unique_id (sk_picture_t* param0) 4807 { 4808 return .sk_picture_get_unique_id (param0); 4809 } 4810 4811 // sk_shader_t* sk_picture_make_shader(sk_picture_t* src, sk_shader_tilemode_t tmx, sk_shader_tilemode_t tmy, const sk_matrix_t* localMatrix, const sk_rect_t* tile) 4812 static sk_shader_t* sk_picture_make_shader (sk_picture_t* src, SKShaderTileMode tmx, SKShaderTileMode tmy, SKMatrix* localMatrix, SKRect* tile) 4813 { 4814 return .sk_picture_make_shader (src, tmx, tmy, localMatrix, tile); 4815 } 4816 4817 // sk_canvas_t* sk_picture_recorder_begin_recording(sk_picture_recorder_t*, const sk_rect_t*) 4818 static sk_canvas_t* sk_picture_recorder_begin_recording (sk_picture_recorder_t* param0, SKRect* param1) 4819 { 4820 return .sk_picture_recorder_begin_recording (param0, param1); 4821 } 4822 4823 // void sk_picture_recorder_delete(sk_picture_recorder_t*) 4824 static void sk_picture_recorder_delete (sk_picture_recorder_t* param0) 4825 { 4826 .sk_picture_recorder_delete (param0); 4827 } 4828 4829 // sk_picture_t* sk_picture_recorder_end_recording(sk_picture_recorder_t*) 4830 static sk_picture_t* sk_picture_recorder_end_recording (sk_picture_recorder_t* param0) 4831 { 4832 return .sk_picture_recorder_end_recording (param0); 4833 } 4834 4835 // sk_drawable_t* sk_picture_recorder_end_recording_as_drawable(sk_picture_recorder_t*) 4836 static sk_drawable_t* sk_picture_recorder_end_recording_as_drawable (sk_picture_recorder_t* param0) 4837 { 4838 return .sk_picture_recorder_end_recording_as_drawable (param0); 4839 } 4840 4841 // sk_picture_recorder_t* sk_picture_recorder_new() 4842 static sk_picture_recorder_t* sk_picture_recorder_new () 4843 { 4844 return .sk_picture_recorder_new (); 4845 } 4846 4847 // void sk_picture_ref(sk_picture_t*) 4848 static void sk_picture_ref (sk_picture_t* param0) 4849 { 4850 .sk_picture_ref (param0); 4851 } 4852 4853 // // sk_data_t* sk_picture_serialize_to_data(const sk_picture_t* picture) 4854 // static sk_data_t* sk_picture_serialize_to_data (sk_picture_t* picture) 4855 // { 4856 // return .sk_picture_serialize_to_data (picture); 4857 // } 4858 4859 // // void sk_picture_serialize_to_stream(const sk_picture_t* picture, sk_wstream_t* stream) 4860 // static void sk_picture_serialize_to_stream (sk_picture_t* picture, sk_wstream_t* stream) 4861 // { 4862 // .sk_picture_serialize_to_stream (picture, stream); 4863 // } 4864 4865 // void sk_picture_unref(sk_picture_t*) 4866 static void sk_picture_unref (sk_picture_t* param0) 4867 { 4868 .sk_picture_unref (param0); 4869 } 4870 4871 // end header: sk_picture.h 4872 4873 // for header: sk_pixmap.h 4874 4875 // void sk_color_get_bit_shift(int* a, int* r, int* g, int* b) 4876 static void sk_color_get_bit_shift (int* a, int* r, int* g, int* b) 4877 { 4878 .sk_color_get_bit_shift (a, r, g, b); 4879 } 4880 4881 // sk_pmcolor_t sk_color_premultiply(const sk_color_t color) 4882 static uint sk_color_premultiply (uint color) 4883 { 4884 return .sk_color_premultiply (color); 4885 } 4886 4887 // void sk_color_premultiply_array(const sk_color_t* colors, int size, sk_pmcolor_t* pmcolors) 4888 static void sk_color_premultiply_array (uint* colors, int size, uint* pmcolors) 4889 { 4890 .sk_color_premultiply_array (colors, size, pmcolors); 4891 } 4892 4893 // sk_color_t sk_color_unpremultiply(const sk_pmcolor_t pmcolor) 4894 static uint sk_color_unpremultiply (uint pmcolor) 4895 { 4896 return .sk_color_unpremultiply (pmcolor); 4897 } 4898 4899 // void sk_color_unpremultiply_array(const sk_pmcolor_t* pmcolors, int size, sk_color_t* colors) 4900 static void sk_color_unpremultiply_array (uint* pmcolors, int size, uint* colors) 4901 { 4902 .sk_color_unpremultiply_array (pmcolors, size, colors); 4903 } 4904 4905 // bool sk_jpegencoder_encode(sk_wstream_t* dst, const sk_pixmap_t* src, const sk_jpegencoder_options_t* options) 4906 static bool sk_jpegencoder_encode (sk_wstream_t* dst, sk_pixmap_t* src, SKJpegEncoderOptions* options) 4907 { 4908 return .sk_jpegencoder_encode (dst, src, options); 4909 } 4910 4911 // void sk_pixmap_destructor(sk_pixmap_t* cpixmap) 4912 static void sk_pixmap_destructor (sk_pixmap_t* cpixmap) 4913 { 4914 .sk_pixmap_destructor (cpixmap); 4915 } 4916 4917 // bool sk_pixmap_encode_image(sk_wstream_t* dst, const sk_pixmap_t* src, sk_encoded_image_format_t encoder, int quality) 4918 static bool sk_pixmap_encode_image (sk_wstream_t* dst, sk_pixmap_t* src, SKEncodedImageFormat encoder, int quality) 4919 { 4920 return .sk_pixmap_encode_image (dst, src, encoder, quality); 4921 } 4922 4923 // bool sk_pixmap_erase_color(const sk_pixmap_t* cpixmap, sk_color_t color, const sk_irect_t* subset) 4924 static bool sk_pixmap_erase_color (sk_pixmap_t* cpixmap, uint color, SKRectI* subset) 4925 { 4926 return .sk_pixmap_erase_color (cpixmap, color, subset); 4927 } 4928 4929 // bool sk_pixmap_erase_color4f(const sk_pixmap_t* cpixmap, const sk_color4f_t* color, const sk_irect_t* subset) 4930 static bool sk_pixmap_erase_color4f (sk_pixmap_t* cpixmap, SKColorF* color, SKRectI* subset) 4931 { 4932 return .sk_pixmap_erase_color4f (cpixmap, color, subset); 4933 } 4934 4935 // bool sk_pixmap_extract_subset(const sk_pixmap_t* cpixmap, sk_pixmap_t* result, const sk_irect_t* subset) 4936 static bool sk_pixmap_extract_subset (sk_pixmap_t* cpixmap, sk_pixmap_t* result, SKRectI* subset) 4937 { 4938 return .sk_pixmap_extract_subset (cpixmap, result, subset); 4939 } 4940 4941 // void sk_pixmap_get_info(const sk_pixmap_t* cpixmap, sk_imageinfo_t* cinfo) 4942 static void sk_pixmap_get_info (sk_pixmap_t* cpixmap, SKImageInfoNative* cinfo) 4943 { 4944 .sk_pixmap_get_info (cpixmap, cinfo); 4945 } 4946 4947 // sk_color_t sk_pixmap_get_pixel_color(const sk_pixmap_t* cpixmap, int x, int y) 4948 static uint sk_pixmap_get_pixel_color (sk_pixmap_t* cpixmap, int x, int y) 4949 { 4950 return .sk_pixmap_get_pixel_color (cpixmap, x, y); 4951 } 4952 4953 // const(void)* sk_pixmap_get_pixels(const sk_pixmap_t* cpixmap) 4954 static const(void)* sk_pixmap_get_pixels (sk_pixmap_t* cpixmap) 4955 { 4956 return .sk_pixmap_get_pixels (cpixmap); 4957 } 4958 4959 // const(void)* sk_pixmap_get_pixels_with_xy(const sk_pixmap_t* cpixmap, int x, int y) 4960 static const(void)* sk_pixmap_get_pixels_with_xy (sk_pixmap_t* cpixmap, int x, int y) 4961 { 4962 return .sk_pixmap_get_pixels_with_xy (cpixmap, x, y); 4963 } 4964 4965 // size_t sk_pixmap_get_row_bytes(const sk_pixmap_t* cpixmap) 4966 static size_t sk_pixmap_get_row_bytes (sk_pixmap_t* cpixmap) 4967 { 4968 return .sk_pixmap_get_row_bytes (cpixmap); 4969 } 4970 4971 // void* sk_pixmap_get_writable_addr(const sk_pixmap_t* cpixmap) 4972 static void* sk_pixmap_get_writable_addr (sk_pixmap_t* cpixmap) 4973 { 4974 return .sk_pixmap_get_writable_addr (cpixmap); 4975 } 4976 4977 // sk_pixmap_t* sk_pixmap_new() 4978 static sk_pixmap_t* sk_pixmap_new () 4979 { 4980 return .sk_pixmap_new (); 4981 } 4982 4983 // sk_pixmap_t* sk_pixmap_new_with_params(const sk_imageinfo_t* cinfo, const(void)* addr, size_t rowBytes) 4984 static sk_pixmap_t* sk_pixmap_new_with_params (SKImageInfoNative* cinfo, void* addr, size_t rowBytes) 4985 { 4986 return .sk_pixmap_new_with_params (cinfo, addr, rowBytes); 4987 } 4988 4989 // bool sk_pixmap_read_pixels(const sk_pixmap_t* cpixmap, const sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) 4990 static bool sk_pixmap_read_pixels (sk_pixmap_t* cpixmap, SKImageInfoNative* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) 4991 { 4992 return .sk_pixmap_read_pixels (cpixmap, dstInfo, dstPixels, dstRowBytes, srcX, srcY); 4993 } 4994 4995 // void sk_pixmap_reset(sk_pixmap_t* cpixmap) 4996 static void sk_pixmap_reset (sk_pixmap_t* cpixmap) 4997 { 4998 .sk_pixmap_reset (cpixmap); 4999 } 5000 5001 // void sk_pixmap_reset_with_params(sk_pixmap_t* cpixmap, const sk_imageinfo_t* cinfo, const(void)* addr, size_t rowBytes) 5002 static void sk_pixmap_reset_with_params (sk_pixmap_t* cpixmap, SKImageInfoNative* cinfo, void* addr, size_t rowBytes) 5003 { 5004 .sk_pixmap_reset_with_params (cpixmap, cinfo, addr, rowBytes); 5005 } 5006 5007 // bool sk_pixmap_scale_pixels(const sk_pixmap_t* cpixmap, const sk_pixmap_t* dst, sk_filter_quality_t quality) 5008 static bool sk_pixmap_scale_pixels (sk_pixmap_t* cpixmap, sk_pixmap_t* dst, SKFilterQuality quality) 5009 { 5010 return .sk_pixmap_scale_pixels (cpixmap, dst, quality); 5011 } 5012 5013 // bool sk_pngencoder_encode(sk_wstream_t* dst, const sk_pixmap_t* src, const sk_pngencoder_options_t* options) 5014 static bool sk_pngencoder_encode (sk_wstream_t* dst, sk_pixmap_t* src, SKPngEncoderOptions* options) 5015 { 5016 return .sk_pngencoder_encode (dst, src, options); 5017 } 5018 5019 // void sk_swizzle_swap_rb(uint32_t* dest, const uint32_t* src, int count) 5020 static void sk_swizzle_swap_rb (uint* dest, uint* src, int count) 5021 { 5022 .sk_swizzle_swap_rb (dest, src, count); 5023 } 5024 5025 // bool sk_webpencoder_encode(sk_wstream_t* dst, const sk_pixmap_t* src, const sk_webpencoder_options_t* options) 5026 static bool sk_webpencoder_encode (sk_wstream_t* dst, sk_pixmap_t* src, SKWebpEncoderOptions* options) 5027 { 5028 return .sk_webpencoder_encode (dst, src, options); 5029 } 5030 5031 // end header: sk_pixmap.h 5032 5033 // for header: sk_region.h 5034 5035 // void sk_region_cliperator_delete(sk_region_cliperator_t* iter) 5036 static void sk_region_cliperator_delete (sk_region_cliperator_t* iter) 5037 { 5038 .sk_region_cliperator_delete (iter); 5039 } 5040 5041 // bool sk_region_cliperator_done(sk_region_cliperator_t* iter) 5042 static bool sk_region_cliperator_done (sk_region_cliperator_t* iter) 5043 { 5044 return .sk_region_cliperator_done (iter); 5045 } 5046 5047 // sk_region_cliperator_t* sk_region_cliperator_new(const sk_region_t* region, const sk_irect_t* clip) 5048 static sk_region_cliperator_t* sk_region_cliperator_new (sk_region_t* region, SKRectI* clip) 5049 { 5050 return .sk_region_cliperator_new (region, clip); 5051 } 5052 5053 // void sk_region_cliperator_next(sk_region_cliperator_t* iter) 5054 static void sk_region_cliperator_next (sk_region_cliperator_t* iter) 5055 { 5056 .sk_region_cliperator_next (iter); 5057 } 5058 5059 // void sk_region_cliperator_rect(const sk_region_cliperator_t* iter, sk_irect_t* rect) 5060 static void sk_region_cliperator_rect (sk_region_cliperator_t* iter, SKRectI* rect) 5061 { 5062 .sk_region_cliperator_rect (iter, rect); 5063 } 5064 5065 // bool sk_region_contains(const sk_region_t* r, const sk_region_t* region) 5066 static bool sk_region_contains (sk_region_t* r, sk_region_t* region) 5067 { 5068 return .sk_region_contains (r, region); 5069 } 5070 5071 // bool sk_region_contains_point(const sk_region_t* r, int x, int y) 5072 static bool sk_region_contains_point (sk_region_t* r, int x, int y) 5073 { 5074 return .sk_region_contains_point (r, x, y); 5075 } 5076 5077 // bool sk_region_contains_rect(const sk_region_t* r, const sk_irect_t* rect) 5078 static bool sk_region_contains_rect (sk_region_t* r, SKRectI* rect) 5079 { 5080 return .sk_region_contains_rect (r, rect); 5081 } 5082 5083 // void sk_region_delete(sk_region_t* r) 5084 static void sk_region_delete (sk_region_t* r) 5085 { 5086 .sk_region_delete (r); 5087 } 5088 5089 // bool sk_region_get_boundary_path(const sk_region_t* r, sk_path_t* path) 5090 static bool sk_region_get_boundary_path (sk_region_t* r, sk_path_t* path) 5091 { 5092 return .sk_region_get_boundary_path (r, path); 5093 } 5094 5095 // void sk_region_get_bounds(const sk_region_t* r, sk_irect_t* rect) 5096 static void sk_region_get_bounds (sk_region_t* r, SKRectI* rect) 5097 { 5098 .sk_region_get_bounds (r, rect); 5099 } 5100 5101 // bool sk_region_intersects(const sk_region_t* r, const sk_region_t* src) 5102 static bool sk_region_intersects (sk_region_t* r, sk_region_t* src) 5103 { 5104 return .sk_region_intersects (r, src); 5105 } 5106 5107 // bool sk_region_intersects_rect(const sk_region_t* r, const sk_irect_t* rect) 5108 static bool sk_region_intersects_rect (sk_region_t* r, SKRectI* rect) 5109 { 5110 return .sk_region_intersects_rect (r, rect); 5111 } 5112 5113 // bool sk_region_is_complex(const sk_region_t* r) 5114 static bool sk_region_is_complex (sk_region_t* r) 5115 { 5116 return .sk_region_is_complex (r); 5117 } 5118 5119 // bool sk_region_is_empty(const sk_region_t* r) 5120 static bool sk_region_is_empty (sk_region_t* r) 5121 { 5122 return .sk_region_is_empty (r); 5123 } 5124 5125 // bool sk_region_is_rect(const sk_region_t* r) 5126 static bool sk_region_is_rect (sk_region_t* r) 5127 { 5128 return .sk_region_is_rect (r); 5129 } 5130 5131 // void sk_region_iterator_delete(sk_region_iterator_t* iter) 5132 static void sk_region_iterator_delete (sk_region_iterator_t* iter) 5133 { 5134 .sk_region_iterator_delete (iter); 5135 } 5136 5137 // bool sk_region_iterator_done(const sk_region_iterator_t* iter) 5138 static bool sk_region_iterator_done (sk_region_iterator_t* iter) 5139 { 5140 return .sk_region_iterator_done (iter); 5141 } 5142 5143 // sk_region_iterator_t* sk_region_iterator_new(const sk_region_t* region) 5144 static sk_region_iterator_t* sk_region_iterator_new (sk_region_t* region) 5145 { 5146 return .sk_region_iterator_new (region); 5147 } 5148 5149 // void sk_region_iterator_next(sk_region_iterator_t* iter) 5150 static void sk_region_iterator_next (sk_region_iterator_t* iter) 5151 { 5152 .sk_region_iterator_next (iter); 5153 } 5154 5155 // void sk_region_iterator_rect(const sk_region_iterator_t* iter, sk_irect_t* rect) 5156 static void sk_region_iterator_rect (sk_region_iterator_t* iter, SKRectI* rect) 5157 { 5158 .sk_region_iterator_rect (iter, rect); 5159 } 5160 5161 // bool sk_region_iterator_rewind(sk_region_iterator_t* iter) 5162 static bool sk_region_iterator_rewind (sk_region_iterator_t* iter) 5163 { 5164 return .sk_region_iterator_rewind (iter); 5165 } 5166 5167 // sk_region_t* sk_region_new() 5168 static sk_region_t* sk_region_new () 5169 { 5170 return .sk_region_new (); 5171 } 5172 5173 // bool sk_region_op(sk_region_t* r, const sk_region_t* region, sk_region_op_t op) 5174 static bool sk_region_op (sk_region_t* r, sk_region_t* region, SKRegionOperation op) 5175 { 5176 return .sk_region_op (r, region, op); 5177 } 5178 5179 // bool sk_region_op_rect(sk_region_t* r, const sk_irect_t* rect, sk_region_op_t op) 5180 static bool sk_region_op_rect (sk_region_t* r, SKRectI* rect, SKRegionOperation op) 5181 { 5182 return .sk_region_op_rect (r, rect, op); 5183 } 5184 5185 // bool sk_region_quick_contains(const sk_region_t* r, const sk_irect_t* rect) 5186 static bool sk_region_quick_contains (sk_region_t* r, SKRectI* rect) 5187 { 5188 return .sk_region_quick_contains (r, rect); 5189 } 5190 5191 // bool sk_region_quick_reject(const sk_region_t* r, const sk_region_t* region) 5192 static bool sk_region_quick_reject (sk_region_t* r, sk_region_t* region) 5193 { 5194 return .sk_region_quick_reject (r, region); 5195 } 5196 5197 // bool sk_region_quick_reject_rect(const sk_region_t* r, const sk_irect_t* rect) 5198 static bool sk_region_quick_reject_rect (sk_region_t* r, SKRectI* rect) 5199 { 5200 return .sk_region_quick_reject_rect (r, rect); 5201 } 5202 5203 // bool sk_region_set_empty(sk_region_t* r) 5204 static bool sk_region_set_empty (sk_region_t* r) 5205 { 5206 return .sk_region_set_empty (r); 5207 } 5208 5209 // bool sk_region_set_path(sk_region_t* r, const sk_path_t* t, const sk_region_t* clip) 5210 static bool sk_region_set_path (sk_region_t* r, sk_path_t* t, sk_region_t* clip) 5211 { 5212 return .sk_region_set_path (r, t, clip); 5213 } 5214 5215 // bool sk_region_set_rect(sk_region_t* r, const sk_irect_t* rect) 5216 static bool sk_region_set_rect (sk_region_t* r, SKRectI* rect) 5217 { 5218 return .sk_region_set_rect (r, rect); 5219 } 5220 5221 // bool sk_region_set_rects(sk_region_t* r, const sk_irect_t* rects, int count) 5222 static bool sk_region_set_rects (sk_region_t* r, SKRectI* rects, int count) 5223 { 5224 return .sk_region_set_rects (r, rects, count); 5225 } 5226 5227 // bool sk_region_set_region(sk_region_t* r, const sk_region_t* region) 5228 static bool sk_region_set_region (sk_region_t* r, sk_region_t* region) 5229 { 5230 return .sk_region_set_region (r, region); 5231 } 5232 5233 // void sk_region_spanerator_delete(sk_region_spanerator_t* iter) 5234 static void sk_region_spanerator_delete (sk_region_spanerator_t* iter) 5235 { 5236 .sk_region_spanerator_delete (iter); 5237 } 5238 5239 // sk_region_spanerator_t* sk_region_spanerator_new(const sk_region_t* region, int y, int left, int right) 5240 static sk_region_spanerator_t* sk_region_spanerator_new (sk_region_t* region, int y, int left, int right) 5241 { 5242 return .sk_region_spanerator_new (region, y, left, right); 5243 } 5244 5245 // bool sk_region_spanerator_next(sk_region_spanerator_t* iter, int* left, int* right) 5246 static bool sk_region_spanerator_next (sk_region_spanerator_t* iter, int* left, int* right) 5247 { 5248 return .sk_region_spanerator_next (iter, left, right); 5249 } 5250 5251 // void sk_region_translate(sk_region_t* r, int x, int y) 5252 static void sk_region_translate (sk_region_t* r, int x, int y) 5253 { 5254 .sk_region_translate (r, x, y); 5255 } 5256 5257 // end header: sk_region.h 5258 5259 // for header: sk_rrect.h 5260 5261 // bool sk_rrect_contains(const sk_rrect_t* rrect, const sk_rect_t* rect) 5262 static bool sk_rrect_contains (sk_rrect_t* rrect, SKRect* rect) 5263 { 5264 return .sk_rrect_contains (rrect, rect); 5265 } 5266 5267 // void sk_rrect_delete(const sk_rrect_t* rrect) 5268 static void sk_rrect_delete (sk_rrect_t* rrect) 5269 { 5270 .sk_rrect_delete (rrect); 5271 } 5272 5273 // float sk_rrect_get_height(const sk_rrect_t* rrect) 5274 static float sk_rrect_get_height (sk_rrect_t* rrect) 5275 { 5276 return .sk_rrect_get_height (rrect); 5277 } 5278 5279 // void sk_rrect_get_radii(const sk_rrect_t* rrect, sk_rrect_corner_t corner, sk_vector_t* radii) 5280 static void sk_rrect_get_radii (sk_rrect_t* rrect, SKRoundRectCorner corner, SKPoint* radii) 5281 { 5282 .sk_rrect_get_radii (rrect, corner, radii); 5283 } 5284 5285 // void sk_rrect_get_rect(const sk_rrect_t* rrect, sk_rect_t* rect) 5286 static void sk_rrect_get_rect (sk_rrect_t* rrect, SKRect* rect) 5287 { 5288 .sk_rrect_get_rect (rrect, rect); 5289 } 5290 5291 // sk_rrect_type_t sk_rrect_get_type(const sk_rrect_t* rrect) 5292 static SKRoundRectType sk_rrect_get_type (sk_rrect_t* rrect) 5293 { 5294 return .sk_rrect_get_type (rrect); 5295 } 5296 5297 // float sk_rrect_get_width(const sk_rrect_t* rrect) 5298 static float sk_rrect_get_width (sk_rrect_t* rrect) 5299 { 5300 return .sk_rrect_get_width (rrect); 5301 } 5302 5303 // void sk_rrect_inset(sk_rrect_t* rrect, float dx, float dy) 5304 static void sk_rrect_inset (sk_rrect_t* rrect, float dx, float dy) 5305 { 5306 .sk_rrect_inset (rrect, dx, dy); 5307 } 5308 5309 // bool sk_rrect_is_valid(const sk_rrect_t* rrect) 5310 static bool sk_rrect_is_valid (sk_rrect_t* rrect) 5311 { 5312 return .sk_rrect_is_valid (rrect); 5313 } 5314 5315 // sk_rrect_t* sk_rrect_new() 5316 static sk_rrect_t* sk_rrect_new () 5317 { 5318 return .sk_rrect_new (); 5319 } 5320 5321 // sk_rrect_t* sk_rrect_new_copy(const sk_rrect_t* rrect) 5322 static sk_rrect_t* sk_rrect_new_copy (sk_rrect_t* rrect) 5323 { 5324 return .sk_rrect_new_copy (rrect); 5325 } 5326 5327 // void sk_rrect_offset(sk_rrect_t* rrect, float dx, float dy) 5328 static void sk_rrect_offset (sk_rrect_t* rrect, float dx, float dy) 5329 { 5330 .sk_rrect_offset (rrect, dx, dy); 5331 } 5332 5333 // void sk_rrect_outset(sk_rrect_t* rrect, float dx, float dy) 5334 static void sk_rrect_outset (sk_rrect_t* rrect, float dx, float dy) 5335 { 5336 .sk_rrect_outset (rrect, dx, dy); 5337 } 5338 5339 // void sk_rrect_set_empty(sk_rrect_t* rrect) 5340 static void sk_rrect_set_empty (sk_rrect_t* rrect) 5341 { 5342 .sk_rrect_set_empty (rrect); 5343 } 5344 5345 // void sk_rrect_set_nine_patch(sk_rrect_t* rrect, const sk_rect_t* rect, float leftRad, float topRad, float rightRad, float bottomRad) 5346 static void sk_rrect_set_nine_patch (sk_rrect_t* rrect, SKRect* rect, float leftRad, float topRad, float rightRad, float bottomRad) 5347 { 5348 .sk_rrect_set_nine_patch (rrect, rect, leftRad, topRad, rightRad, bottomRad); 5349 } 5350 5351 // void sk_rrect_set_oval(sk_rrect_t* rrect, const sk_rect_t* rect) 5352 static void sk_rrect_set_oval (sk_rrect_t* rrect, SKRect* rect) 5353 { 5354 .sk_rrect_set_oval (rrect, rect); 5355 } 5356 5357 // void sk_rrect_set_rect(sk_rrect_t* rrect, const sk_rect_t* rect) 5358 static void sk_rrect_set_rect (sk_rrect_t* rrect, SKRect* rect) 5359 { 5360 .sk_rrect_set_rect (rrect, rect); 5361 } 5362 5363 // void sk_rrect_set_rect_radii(sk_rrect_t* rrect, const sk_rect_t* rect, const sk_vector_t* radii) 5364 static void sk_rrect_set_rect_radii (sk_rrect_t* rrect, SKRect* rect, SKPoint* radii) 5365 { 5366 .sk_rrect_set_rect_radii (rrect, rect, radii); 5367 } 5368 5369 // void sk_rrect_set_rect_xy(sk_rrect_t* rrect, const sk_rect_t* rect, float xRad, float yRad) 5370 static void sk_rrect_set_rect_xy (sk_rrect_t* rrect, SKRect* rect, float xRad, float yRad) 5371 { 5372 .sk_rrect_set_rect_xy (rrect, rect, xRad, yRad); 5373 } 5374 5375 // bool sk_rrect_transform(sk_rrect_t* rrect, const sk_matrix_t* matrix, sk_rrect_t* dest) 5376 static bool sk_rrect_transform (sk_rrect_t* rrect, SKMatrix* matrix, sk_rrect_t* dest) 5377 { 5378 return .sk_rrect_transform (rrect, matrix, dest); 5379 } 5380 5381 // end header: sk_rrect.h 5382 5383 // // for header: sk_runtimeeffect.h 5384 5385 // // void sk_runtimeeffect_get_child_name(const sk_runtimeeffect_t* effect, int index, sk_string_t* name) 5386 // static void sk_runtimeeffect_get_child_name (sk_runtimeeffect_t effect, int index, sk_string_t* name) 5387 // { 5388 // .sk_runtimeeffect_get_child_name (effect, index, name); 5389 // } 5390 5391 // // size_t sk_runtimeeffect_get_children_count(const sk_runtimeeffect_t* effect) 5392 // static size_t sk_runtimeeffect_get_children_count (sk_runtimeeffect_t effect) 5393 // { 5394 // return .sk_runtimeeffect_get_children_count (effect); 5395 // } 5396 5397 // // const sk_runtimeeffect_variable_t* sk_runtimeeffect_get_input_from_index(const sk_runtimeeffect_t* effect, int index) 5398 // static sk_runtimeeffect_variable_t sk_runtimeeffect_get_input_from_index (sk_runtimeeffect_t effect, int index) 5399 // { 5400 // return .sk_runtimeeffect_get_input_from_index (effect, index); 5401 // } 5402 5403 // // const sk_runtimeeffect_variable_t* sk_runtimeeffect_get_input_from_name(const sk_runtimeeffect_t* effect, const(char)* name, size_t len) 5404 // static sk_runtimeeffect_variable_t sk_runtimeeffect_get_input_from_name (sk_runtimeeffect_t effect, void* name, void* len) 5405 // { 5406 // return .sk_runtimeeffect_get_input_from_name (effect, name, len); 5407 // } 5408 5409 // // void sk_runtimeeffect_get_input_name(const sk_runtimeeffect_t* effect, int index, sk_string_t* name) 5410 // static void sk_runtimeeffect_get_input_name (sk_runtimeeffect_t effect, int index, sk_string_t* name) 5411 // { 5412 // .sk_runtimeeffect_get_input_name (effect, index, name); 5413 // } 5414 5415 // // size_t sk_runtimeeffect_get_input_size(const sk_runtimeeffect_t* effect) 5416 // static size_t sk_runtimeeffect_get_input_size (sk_runtimeeffect_t effect) 5417 // { 5418 // return .sk_runtimeeffect_get_input_size (effect); 5419 // } 5420 5421 // // size_t sk_runtimeeffect_get_inputs_count(const sk_runtimeeffect_t* effect) 5422 // static size_t sk_runtimeeffect_get_inputs_count (sk_runtimeeffect_t effect) 5423 // { 5424 // return .sk_runtimeeffect_get_inputs_count (effect); 5425 // } 5426 5427 // // sk_runtimeeffect_t* sk_runtimeeffect_make(sk_string_t* sksl, sk_string_t* error) 5428 // static sk_runtimeeffect_t sk_runtimeeffect_make (sk_string_t* sksl, sk_string_t* error) 5429 // { 5430 // return .sk_runtimeeffect_make (sksl, error); 5431 // } 5432 5433 // // sk_colorfilter_t* sk_runtimeeffect_make_color_filter(sk_runtimeeffect_t* effect, sk_data_t* inputs, sk_colorfilter_t** children, size_t childCount) 5434 // static sk_colorfilter_t* sk_runtimeeffect_make_color_filter (sk_runtimeeffect_t effect, sk_data_t* inputs, sk_colorfilter_t* children, void* childCount) 5435 // { 5436 // return .sk_runtimeeffect_make_color_filter (effect, inputs, children, childCount); 5437 // } 5438 5439 // // sk_shader_t* sk_runtimeeffect_make_shader(sk_runtimeeffect_t* effect, sk_data_t* inputs, sk_shader_t** children, size_t childCount, const sk_matrix_t* localMatrix, bool isOpaque) 5440 // static sk_shader_t* sk_runtimeeffect_make_shader (sk_runtimeeffect_t effect, sk_data_t* inputs, sk_shader_t* children, void* childCount, SKMatrix* localMatrix, bool isOpaque) 5441 // { 5442 // return .sk_runtimeeffect_make_shader (effect, inputs, children, childCount, localMatrix, isOpaque); 5443 // } 5444 5445 // // void sk_runtimeeffect_unref(sk_runtimeeffect_t* effect) 5446 // static void sk_runtimeeffect_unref (sk_runtimeeffect_t effect) 5447 // { 5448 // .sk_runtimeeffect_unref (effect); 5449 // } 5450 5451 // // size_t sk_runtimeeffect_variable_get_offset(const sk_runtimeeffect_variable_t* variable) 5452 // static size_t sk_runtimeeffect_variable_get_offset (sk_runtimeeffect_variable_t variable) 5453 // { 5454 // return .sk_runtimeeffect_variable_get_offset (variable); 5455 // } 5456 5457 // // size_t sk_runtimeeffect_variable_get_size_in_bytes(const sk_runtimeeffect_variable_t* variable) 5458 // static size_t sk_runtimeeffect_variable_get_size_in_bytes (sk_runtimeeffect_variable_t variable) 5459 // { 5460 // return .sk_runtimeeffect_variable_get_size_in_bytes (variable); 5461 // } 5462 5463 // // end header: sk_runtimeeffect.h 5464 5465 // for header: sk_shader.h 5466 5467 // sk_shader_t* sk_shader_new_blend(sk_blendmode_t mode, const sk_shader_t* dst, const sk_shader_t* src) 5468 static sk_shader_t* sk_shader_new_blend (SKBlendMode mode, sk_shader_t* dst, sk_shader_t* src) 5469 { 5470 return .sk_shader_new_blend (mode, dst, src); 5471 } 5472 5473 // sk_shader_t* sk_shader_new_color(sk_color_t color) 5474 static sk_shader_t* sk_shader_new_color (uint color) 5475 { 5476 return .sk_shader_new_color (color); 5477 } 5478 5479 // sk_shader_t* sk_shader_new_color4f(const sk_color4f_t* color, const sk_colorspace_t* colorspace) 5480 static sk_shader_t* sk_shader_new_color4f (SKColorF* color, sk_colorspace_t* colorspace) 5481 { 5482 return .sk_shader_new_color4f (color, colorspace); 5483 } 5484 5485 // sk_shader_t* sk_shader_new_empty() 5486 static sk_shader_t* sk_shader_new_empty () 5487 { 5488 return .sk_shader_new_empty (); 5489 } 5490 5491 // sk_shader_t* sk_shader_new_lerp(float t, const sk_shader_t* dst, const sk_shader_t* src) 5492 static sk_shader_t* sk_shader_new_lerp (float t, sk_shader_t* dst, sk_shader_t* src) 5493 { 5494 return .sk_shader_new_lerp (t, dst, src); 5495 } 5496 5497 // sk_shader_t* sk_shader_new_linear_gradient(const sk_point_t[2] points = 2, const sk_color_t* colors, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) 5498 static sk_shader_t* sk_shader_new_linear_gradient (SKPoint* points, uint* colors, float* colorPos, int colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix) 5499 { 5500 return .sk_shader_new_linear_gradient (points, colors, colorPos, colorCount, tileMode, localMatrix); 5501 } 5502 5503 // sk_shader_t* sk_shader_new_linear_gradient_color4f(const sk_point_t[2] points = 2, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) 5504 static sk_shader_t* sk_shader_new_linear_gradient_color4f (SKPoint* points, SKColorF* colors, sk_colorspace_t* colorspace, float* colorPos, int colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix) 5505 { 5506 return .sk_shader_new_linear_gradient_color4f (points, colors, colorspace, colorPos, colorCount, tileMode, localMatrix); 5507 } 5508 5509 // sk_shader_t* sk_shader_new_perlin_noise_fractal_noise(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, const sk_isize_t* tileSize) 5510 static sk_shader_t* sk_shader_new_perlin_noise_fractal_noise (float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, SKSizeI* tileSize) 5511 { 5512 return .sk_shader_new_perlin_noise_fractal_noise (baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize); 5513 } 5514 5515 // sk_shader_t* sk_shader_new_perlin_noise_improved_noise(float baseFrequencyX, float baseFrequencyY, int numOctaves, float z) 5516 static sk_shader_t* sk_shader_new_perlin_noise_improved_noise (float baseFrequencyX, float baseFrequencyY, int numOctaves, float z) 5517 { 5518 return .sk_shader_new_perlin_noise_improved_noise (baseFrequencyX, baseFrequencyY, numOctaves, z); 5519 } 5520 5521 // sk_shader_t* sk_shader_new_perlin_noise_turbulence(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, const sk_isize_t* tileSize) 5522 static sk_shader_t* sk_shader_new_perlin_noise_turbulence (float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, SKSizeI* tileSize) 5523 { 5524 return .sk_shader_new_perlin_noise_turbulence (baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize); 5525 } 5526 5527 // sk_shader_t* sk_shader_new_radial_gradient(const sk_point_t* center, float radius, const sk_color_t* colors, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) 5528 static sk_shader_t* sk_shader_new_radial_gradient (SKPoint* center, float radius, uint* colors, float* colorPos, int colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix) 5529 { 5530 return .sk_shader_new_radial_gradient (center, radius, colors, colorPos, colorCount, tileMode, localMatrix); 5531 } 5532 5533 // sk_shader_t* sk_shader_new_radial_gradient_color4f(const sk_point_t* center, float radius, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) 5534 static sk_shader_t* sk_shader_new_radial_gradient_color4f (SKPoint* center, float radius, SKColorF* colors, sk_colorspace_t* colorspace, float* colorPos, int colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix) 5535 { 5536 return .sk_shader_new_radial_gradient_color4f (center, radius, colors, colorspace, colorPos, colorCount, tileMode, localMatrix); 5537 } 5538 5539 // sk_shader_t* sk_shader_new_sweep_gradient(const sk_point_t* center, const sk_color_t* colors, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, float startAngle, float endAngle, const sk_matrix_t* localMatrix) 5540 static sk_shader_t* sk_shader_new_sweep_gradient (SKPoint* center, uint* colors, float* colorPos, int colorCount, SKShaderTileMode tileMode, float startAngle, float endAngle, SKMatrix* localMatrix) 5541 { 5542 return .sk_shader_new_sweep_gradient (center, colors, colorPos, colorCount, tileMode, startAngle, endAngle, localMatrix); 5543 } 5544 5545 // sk_shader_t* sk_shader_new_sweep_gradient_color4f(const sk_point_t* center, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, float startAngle, float endAngle, const sk_matrix_t* localMatrix) 5546 static sk_shader_t* sk_shader_new_sweep_gradient_color4f (SKPoint* center, SKColorF* colors, sk_colorspace_t* colorspace, float* colorPos, int colorCount, SKShaderTileMode tileMode, float startAngle, float endAngle, SKMatrix* localMatrix) 5547 { 5548 return .sk_shader_new_sweep_gradient_color4f (center, colors, colorspace, colorPos, colorCount, tileMode, startAngle, endAngle, localMatrix); 5549 } 5550 5551 // sk_shader_t* sk_shader_new_two_point_conical_gradient(const sk_point_t* start, float startRadius, const sk_point_t* end, float endRadius, const sk_color_t* colors, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) 5552 static sk_shader_t* sk_shader_new_two_point_conical_gradient (SKPoint* start, float startRadius, SKPoint* end, float endRadius, uint* colors, float* colorPos, int colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix) 5553 { 5554 return .sk_shader_new_two_point_conical_gradient (start, startRadius, end, endRadius, colors, colorPos, colorCount, tileMode, localMatrix); 5555 } 5556 5557 // sk_shader_t* sk_shader_new_two_point_conical_gradient_color4f(const sk_point_t* start, float startRadius, const sk_point_t* end, float endRadius, const sk_color4f_t* colors, const sk_colorspace_t* colorspace, const float* colorPos, int colorCount, sk_shader_tilemode_t tileMode, const sk_matrix_t* localMatrix) 5558 static sk_shader_t* sk_shader_new_two_point_conical_gradient_color4f (SKPoint* start, float startRadius, SKPoint* end, float endRadius, SKColorF* colors, sk_colorspace_t* colorspace, float* colorPos, int colorCount, SKShaderTileMode tileMode, SKMatrix* localMatrix) 5559 { 5560 return .sk_shader_new_two_point_conical_gradient_color4f (start, startRadius, end, endRadius, colors, colorspace, colorPos, colorCount, tileMode, localMatrix); 5561 } 5562 5563 // void sk_shader_ref(sk_shader_t* shader) 5564 static void sk_shader_ref (sk_shader_t* shader) 5565 { 5566 .sk_shader_ref (shader); 5567 } 5568 5569 // void sk_shader_unref(sk_shader_t* shader) 5570 static void sk_shader_unref (sk_shader_t* shader) 5571 { 5572 .sk_shader_unref (shader); 5573 } 5574 5575 // sk_shader_t* sk_shader_with_color_filter(const sk_shader_t* shader, const sk_colorfilter_t* filter) 5576 static sk_shader_t* sk_shader_with_color_filter (sk_shader_t* shader, sk_colorfilter_t* filter) 5577 { 5578 return .sk_shader_with_color_filter (shader, filter); 5579 } 5580 5581 // sk_shader_t* sk_shader_with_local_matrix(const sk_shader_t* shader, const sk_matrix_t* localMatrix) 5582 static sk_shader_t* sk_shader_with_local_matrix (sk_shader_t* shader, SKMatrix* localMatrix) 5583 { 5584 return .sk_shader_with_local_matrix (shader, localMatrix); 5585 } 5586 5587 // end header: sk_shader.h 5588 5589 // for header: sk_stream.h 5590 5591 // void sk_dynamicmemorywstream_copy_to(sk_wstream_dynamicmemorystream_t* cstream, void* data) 5592 static void sk_dynamicmemorywstream_copy_to (sk_wstream_dynamicmemorystream_t* cstream, void* data) 5593 { 5594 .sk_dynamicmemorywstream_copy_to (cstream, data); 5595 } 5596 5597 // void sk_dynamicmemorywstream_destroy(sk_wstream_dynamicmemorystream_t* cstream) 5598 static void sk_dynamicmemorywstream_destroy (sk_wstream_dynamicmemorystream_t* cstream) 5599 { 5600 .sk_dynamicmemorywstream_destroy (cstream); 5601 } 5602 5603 // sk_data_t* sk_dynamicmemorywstream_detach_as_data(sk_wstream_dynamicmemorystream_t* cstream) 5604 static sk_data_t* sk_dynamicmemorywstream_detach_as_data (sk_wstream_dynamicmemorystream_t* cstream) 5605 { 5606 return .sk_dynamicmemorywstream_detach_as_data (cstream); 5607 } 5608 5609 // sk_stream_asset_t* sk_dynamicmemorywstream_detach_as_stream(sk_wstream_dynamicmemorystream_t* cstream) 5610 static sk_stream_asset_t* sk_dynamicmemorywstream_detach_as_stream (sk_wstream_dynamicmemorystream_t* cstream) 5611 { 5612 return .sk_dynamicmemorywstream_detach_as_stream (cstream); 5613 } 5614 5615 // sk_wstream_dynamicmemorystream_t* sk_dynamicmemorywstream_new() 5616 static sk_wstream_dynamicmemorystream_t* sk_dynamicmemorywstream_new () 5617 { 5618 return .sk_dynamicmemorywstream_new (); 5619 } 5620 5621 // bool sk_dynamicmemorywstream_write_to_stream(sk_wstream_dynamicmemorystream_t* cstream, sk_wstream_t* dst) 5622 static bool sk_dynamicmemorywstream_write_to_stream (sk_wstream_dynamicmemorystream_t* cstream, sk_wstream_t* dst) 5623 { 5624 return .sk_dynamicmemorywstream_write_to_stream (cstream, dst); 5625 } 5626 5627 // void sk_filestream_destroy(sk_stream_filestream_t* cstream) 5628 static void sk_filestream_destroy (sk_stream_filestream_t* cstream) 5629 { 5630 .sk_filestream_destroy (cstream); 5631 } 5632 5633 // bool sk_filestream_is_valid(sk_stream_filestream_t* cstream) 5634 static bool sk_filestream_is_valid (sk_stream_filestream_t* cstream) 5635 { 5636 return .sk_filestream_is_valid (cstream); 5637 } 5638 5639 // sk_stream_filestream_t* sk_filestream_new(const(char)* path) 5640 static sk_stream_filestream_t* sk_filestream_new ( string path) 5641 { 5642 return .sk_filestream_new (path.toStringz()); 5643 } 5644 5645 // void sk_filewstream_destroy(sk_wstream_filestream_t* cstream) 5646 static void sk_filewstream_destroy (sk_wstream_filestream_t* cstream) 5647 { 5648 .sk_filewstream_destroy (cstream); 5649 } 5650 5651 // bool sk_filewstream_is_valid(sk_wstream_filestream_t* cstream) 5652 static bool sk_filewstream_is_valid (sk_wstream_filestream_t* cstream) 5653 { 5654 return .sk_filewstream_is_valid (cstream); 5655 } 5656 5657 // sk_wstream_filestream_t* sk_filewstream_new(const(char)* path) 5658 static sk_wstream_filestream_t* sk_filewstream_new ( string path) 5659 { 5660 return .sk_filewstream_new (path.toStringz()); 5661 } 5662 5663 // void sk_memorystream_destroy(sk_stream_memorystream_t* cstream) 5664 static void sk_memorystream_destroy (sk_stream_memorystream_t* cstream) 5665 { 5666 .sk_memorystream_destroy (cstream); 5667 } 5668 5669 // sk_stream_memorystream_t* sk_memorystream_new() 5670 static sk_stream_memorystream_t* sk_memorystream_new () 5671 { 5672 return .sk_memorystream_new (); 5673 } 5674 5675 // sk_stream_memorystream_t* sk_memorystream_new_with_data(const(void)* data, size_t length, bool copyData) 5676 static sk_stream_memorystream_t* sk_memorystream_new_with_data (void* data, size_t length, bool copyData) 5677 { 5678 return .sk_memorystream_new_with_data (data, length, copyData); 5679 } 5680 5681 // sk_stream_memorystream_t* sk_memorystream_new_with_length(size_t length) 5682 static sk_stream_memorystream_t* sk_memorystream_new_with_length (size_t length) 5683 { 5684 return .sk_memorystream_new_with_length (length); 5685 } 5686 5687 // sk_stream_memorystream_t* sk_memorystream_new_with_skdata(sk_data_t* data) 5688 static sk_stream_memorystream_t* sk_memorystream_new_with_skdata (sk_data_t* data) 5689 { 5690 return .sk_memorystream_new_with_skdata (data); 5691 } 5692 5693 // void sk_memorystream_set_memory(sk_stream_memorystream_t* cmemorystream, const(void)* data, size_t length, bool copyData) 5694 static void sk_memorystream_set_memory (sk_stream_memorystream_t* cmemorystream, void* data, size_t length, bool copyData) 5695 { 5696 .sk_memorystream_set_memory (cmemorystream, data, length, copyData); 5697 } 5698 5699 // void sk_stream_asset_destroy(sk_stream_asset_t* cstream) 5700 static void sk_stream_asset_destroy (sk_stream_asset_t* cstream) 5701 { 5702 .sk_stream_asset_destroy (cstream); 5703 } 5704 5705 // void sk_stream_destroy(sk_stream_t* cstream) 5706 static void sk_stream_destroy (sk_stream_t* cstream) 5707 { 5708 .sk_stream_destroy (cstream); 5709 } 5710 5711 // sk_stream_t* sk_stream_duplicate(sk_stream_t* cstream) 5712 static sk_stream_t* sk_stream_duplicate (sk_stream_t* cstream) 5713 { 5714 return .sk_stream_duplicate (cstream); 5715 } 5716 5717 // sk_stream_t* sk_stream_fork(sk_stream_t* cstream) 5718 static sk_stream_t* sk_stream_fork (sk_stream_t* cstream) 5719 { 5720 return .sk_stream_fork (cstream); 5721 } 5722 5723 // size_t sk_stream_get_length(sk_stream_t* cstream) 5724 static size_t sk_stream_get_length (sk_stream_t* cstream) 5725 { 5726 return .sk_stream_get_length (cstream); 5727 } 5728 5729 // const(void)* sk_stream_get_memory_base(sk_stream_t* cstream) 5730 static const(void)* sk_stream_get_memory_base (sk_stream_t* cstream) 5731 { 5732 return .sk_stream_get_memory_base (cstream); 5733 } 5734 5735 // size_t sk_stream_get_position(sk_stream_t* cstream) 5736 static size_t sk_stream_get_position (sk_stream_t* cstream) 5737 { 5738 return .sk_stream_get_position (cstream); 5739 } 5740 5741 // bool sk_stream_has_length(sk_stream_t* cstream) 5742 static bool sk_stream_has_length (sk_stream_t* cstream) 5743 { 5744 return .sk_stream_has_length (cstream); 5745 } 5746 5747 // bool sk_stream_has_position(sk_stream_t* cstream) 5748 static bool sk_stream_has_position (sk_stream_t* cstream) 5749 { 5750 return .sk_stream_has_position (cstream); 5751 } 5752 5753 // bool sk_stream_is_at_end(sk_stream_t* cstream) 5754 static bool sk_stream_is_at_end (sk_stream_t* cstream) 5755 { 5756 return .sk_stream_is_at_end (cstream); 5757 } 5758 5759 // bool sk_stream_move(sk_stream_t* cstream, int offset) 5760 static bool sk_stream_move (sk_stream_t* cstream, int offset) 5761 { 5762 return .sk_stream_move (cstream, offset); 5763 } 5764 5765 // size_t sk_stream_peek(sk_stream_t* cstream, void* buffer, size_t size) 5766 static size_t sk_stream_peek (sk_stream_t* cstream, void* buffer, size_t size) 5767 { 5768 return .sk_stream_peek (cstream, buffer, size); 5769 } 5770 5771 // size_t sk_stream_read(sk_stream_t* cstream, void* buffer, size_t size) 5772 static size_t sk_stream_read (sk_stream_t* cstream, void* buffer, size_t size) 5773 { 5774 return .sk_stream_read (cstream, buffer, size); 5775 } 5776 5777 // bool sk_stream_read_bool(sk_stream_t* cstream, bool* buffer) 5778 static bool sk_stream_read_bool (sk_stream_t* cstream, bool* buffer) 5779 { 5780 return .sk_stream_read_bool (cstream, buffer); 5781 } 5782 5783 // bool sk_stream_read_s16(sk_stream_t* cstream, int16_t* buffer) 5784 static bool sk_stream_read_s16 (sk_stream_t* cstream, short* buffer) 5785 { 5786 return .sk_stream_read_s16 (cstream, buffer); 5787 } 5788 5789 // bool sk_stream_read_s32(sk_stream_t* cstream, int32_t* buffer) 5790 static bool sk_stream_read_s32 (sk_stream_t* cstream, int* buffer) 5791 { 5792 return .sk_stream_read_s32 (cstream, buffer); 5793 } 5794 5795 // bool sk_stream_read_s8(sk_stream_t* cstream, int8_t* buffer) 5796 static bool sk_stream_read_s8 (sk_stream_t* cstream, byte* buffer) 5797 { 5798 return .sk_stream_read_s8 (cstream, buffer); 5799 } 5800 5801 // bool sk_stream_read_u16(sk_stream_t* cstream, uint16_t* buffer) 5802 static bool sk_stream_read_u16 (sk_stream_t* cstream, ushort* buffer) 5803 { 5804 return .sk_stream_read_u16 (cstream, buffer); 5805 } 5806 5807 // bool sk_stream_read_u32(sk_stream_t* cstream, uint32_t* buffer) 5808 static bool sk_stream_read_u32 (sk_stream_t* cstream, uint* buffer) 5809 { 5810 return .sk_stream_read_u32 (cstream, buffer); 5811 } 5812 5813 // bool sk_stream_read_u8(sk_stream_t* cstream, uint8_t* buffer) 5814 static bool sk_stream_read_u8 (sk_stream_t* cstream, ubyte* buffer) 5815 { 5816 return .sk_stream_read_u8 (cstream, buffer); 5817 } 5818 5819 // bool sk_stream_rewind(sk_stream_t* cstream) 5820 static bool sk_stream_rewind (sk_stream_t* cstream) 5821 { 5822 return .sk_stream_rewind (cstream); 5823 } 5824 5825 // bool sk_stream_seek(sk_stream_t* cstream, size_t position) 5826 static bool sk_stream_seek (sk_stream_t* cstream, size_t position) 5827 { 5828 return .sk_stream_seek (cstream, position); 5829 } 5830 5831 // size_t sk_stream_skip(sk_stream_t* cstream, size_t size) 5832 static size_t sk_stream_skip (sk_stream_t* cstream, size_t size) 5833 { 5834 return .sk_stream_skip (cstream, size); 5835 } 5836 5837 // size_t sk_wstream_bytes_written(sk_wstream_t* cstream) 5838 static size_t sk_wstream_bytes_written (sk_wstream_t* cstream) 5839 { 5840 return .sk_wstream_bytes_written (cstream); 5841 } 5842 5843 // void sk_wstream_flush(sk_wstream_t* cstream) 5844 static void sk_wstream_flush (sk_wstream_t* cstream) 5845 { 5846 .sk_wstream_flush (cstream); 5847 } 5848 5849 // int sk_wstream_get_size_of_packed_uint(size_t value) 5850 static int sk_wstream_get_size_of_packed_uint (size_t value) 5851 { 5852 return .sk_wstream_get_size_of_packed_uint (value); 5853 } 5854 5855 // bool sk_wstream_newline(sk_wstream_t* cstream) 5856 static bool sk_wstream_newline (sk_wstream_t* cstream) 5857 { 5858 return .sk_wstream_newline (cstream); 5859 } 5860 5861 // bool sk_wstream_write(sk_wstream_t* cstream, const(void)* buffer, size_t size) 5862 static bool sk_wstream_write (sk_wstream_t* cstream, void* buffer, size_t size) 5863 { 5864 return .sk_wstream_write (cstream, buffer, size); 5865 } 5866 5867 // bool sk_wstream_write_16(sk_wstream_t* cstream, uint16_t value) 5868 static bool sk_wstream_write_16 (sk_wstream_t* cstream, ushort value) 5869 { 5870 return .sk_wstream_write_16 (cstream, value); 5871 } 5872 5873 // bool sk_wstream_write_32(sk_wstream_t* cstream, uint32_t value) 5874 static bool sk_wstream_write_32 (sk_wstream_t* cstream, uint value) 5875 { 5876 return .sk_wstream_write_32 (cstream, value); 5877 } 5878 5879 // bool sk_wstream_write_8(sk_wstream_t* cstream, uint8_t value) 5880 static bool sk_wstream_write_8 (sk_wstream_t* cstream, ubyte value) 5881 { 5882 return .sk_wstream_write_8 (cstream, value); 5883 } 5884 5885 // bool sk_wstream_write_bigdec_as_text(sk_wstream_t* cstream, int64_t value, int minDigits) 5886 static bool sk_wstream_write_bigdec_as_text (sk_wstream_t* cstream, long value, int minDigits) 5887 { 5888 return .sk_wstream_write_bigdec_as_text (cstream, value, minDigits); 5889 } 5890 5891 // bool sk_wstream_write_bool(sk_wstream_t* cstream, bool value) 5892 static bool sk_wstream_write_bool (sk_wstream_t* cstream, bool value) 5893 { 5894 return .sk_wstream_write_bool (cstream, value); 5895 } 5896 5897 // bool sk_wstream_write_dec_as_text(sk_wstream_t* cstream, int32_t value) 5898 static bool sk_wstream_write_dec_as_text (sk_wstream_t* cstream, int value) 5899 { 5900 return .sk_wstream_write_dec_as_text (cstream, value); 5901 } 5902 5903 // bool sk_wstream_write_hex_as_text(sk_wstream_t* cstream, uint32_t value, int minDigits) 5904 static bool sk_wstream_write_hex_as_text (sk_wstream_t* cstream, uint value, int minDigits) 5905 { 5906 return .sk_wstream_write_hex_as_text (cstream, value, minDigits); 5907 } 5908 5909 // bool sk_wstream_write_packed_uint(sk_wstream_t* cstream, size_t value) 5910 static bool sk_wstream_write_packed_uint (sk_wstream_t* cstream, size_t value) 5911 { 5912 return .sk_wstream_write_packed_uint (cstream, value); 5913 } 5914 5915 // bool sk_wstream_write_scalar(sk_wstream_t* cstream, float value) 5916 static bool sk_wstream_write_scalar (sk_wstream_t* cstream, float value) 5917 { 5918 return .sk_wstream_write_scalar (cstream, value); 5919 } 5920 5921 // bool sk_wstream_write_scalar_as_text(sk_wstream_t* cstream, float value) 5922 static bool sk_wstream_write_scalar_as_text (sk_wstream_t* cstream, float value) 5923 { 5924 return .sk_wstream_write_scalar_as_text (cstream, value); 5925 } 5926 5927 // bool sk_wstream_write_stream(sk_wstream_t* cstream, sk_stream_t* input, size_t length) 5928 static bool sk_wstream_write_stream (sk_wstream_t* cstream, sk_stream_t* input, size_t length) 5929 { 5930 return .sk_wstream_write_stream (cstream, input, length); 5931 } 5932 5933 // bool sk_wstream_write_text(sk_wstream_t* cstream, const(char)* value) 5934 static bool sk_wstream_write_text (sk_wstream_t* cstream, string value) 5935 { 5936 return .sk_wstream_write_text (cstream, value.toStringz()); 5937 } 5938 5939 // end header: sk_stream.h 5940 5941 // for header: sk_string.h 5942 5943 // void sk_string_destructor(const sk_string_t*) 5944 static void sk_string_destructor (sk_string_t* param0) 5945 { 5946 .sk_string_destructor (param0); 5947 } 5948 5949 // const(char)* sk_string_get_c_str(const sk_string_t*) 5950 static const(void)* sk_string_get_c_str (sk_string_t* param0) 5951 { 5952 return .sk_string_get_c_str (param0); 5953 } 5954 5955 // size_t sk_string_get_size(const sk_string_t*) 5956 static size_t sk_string_get_size (sk_string_t* param0) 5957 { 5958 return .sk_string_get_size (param0); 5959 } 5960 5961 // sk_string_t* sk_string_new_empty() 5962 static sk_string_t* sk_string_new_empty () 5963 { 5964 return .sk_string_new_empty (); 5965 } 5966 5967 // sk_string_t* sk_string_new_with_copy(const(char)* src, size_t length) 5968 static sk_string_t* sk_string_new_with_copy (const(char)* src, size_t length) 5969 { 5970 return .sk_string_new_with_copy (src, length); 5971 } 5972 5973 // end header: sk_string.h 5974 5975 // for header: sk_surface.h 5976 5977 // void sk_surface_draw(sk_surface_t* surface, sk_canvas_t* canvas, float x, float y, const sk_paint_t* paint) 5978 static void sk_surface_draw (sk_surface_t* surface, sk_canvas_t* canvas, float x, float y, sk_paint_t* paint) 5979 { 5980 .sk_surface_draw (surface, canvas, x, y, paint); 5981 } 5982 5983 // sk_canvas_t* sk_surface_get_canvas(sk_surface_t*) 5984 static sk_canvas_t* sk_surface_get_canvas (sk_surface_t* param0) 5985 { 5986 return .sk_surface_get_canvas (param0); 5987 } 5988 5989 // const sk_surfaceprops_t* sk_surface_get_props(sk_surface_t* surface) 5990 static const(sk_surfaceprops_t)* sk_surface_get_props (sk_surface_t* surface) 5991 { 5992 return .sk_surface_get_props (surface); 5993 } 5994 5995 // sk_surface_t* sk_surface_new_backend_render_target(gr_context_t* context, const gr_backendrendertarget_t* target, gr_surfaceorigin_t origin, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props) 5996 static sk_surface_t* sk_surface_new_backend_render_target (gr_context_t* context, gr_backendrendertarget_t* target, GRSurfaceOrigin origin, SKColorTypeNative colorType, sk_colorspace_t* colorspace, sk_surfaceprops_t* props) 5997 { 5998 return .sk_surface_new_backend_render_target (context, target, origin, colorType, colorspace, props); 5999 } 6000 6001 // sk_surface_t* sk_surface_new_backend_texture(gr_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, int samples, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props) 6002 static sk_surface_t* sk_surface_new_backend_texture (gr_context_t* context, gr_backendtexture_t* texture, GRSurfaceOrigin origin, int samples, SKColorTypeNative colorType, sk_colorspace_t* colorspace, sk_surfaceprops_t* props) 6003 { 6004 return .sk_surface_new_backend_texture (context, texture, origin, samples, colorType, colorspace, props); 6005 } 6006 6007 // sk_surface_t* sk_surface_new_backend_texture_as_render_target(gr_context_t* context, const gr_backendtexture_t* texture, gr_surfaceorigin_t origin, int samples, sk_colortype_t colorType, sk_colorspace_t* colorspace, const sk_surfaceprops_t* props) 6008 static sk_surface_t* sk_surface_new_backend_texture_as_render_target (gr_context_t* context, gr_backendtexture_t* texture, GRSurfaceOrigin origin, int samples, SKColorTypeNative colorType, sk_colorspace_t* colorspace, sk_surfaceprops_t* props) 6009 { 6010 return .sk_surface_new_backend_texture_as_render_target (context, texture, origin, samples, colorType, colorspace, props); 6011 } 6012 6013 // sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*) 6014 static sk_image_t* sk_surface_new_image_snapshot (sk_surface_t* param0) 6015 { 6016 return .sk_surface_new_image_snapshot (param0); 6017 } 6018 6019 // sk_image_t* sk_surface_new_image_snapshot_with_crop(sk_surface_t* surface, const sk_irect_t* bounds) 6020 static sk_image_t* sk_surface_new_image_snapshot_with_crop (sk_surface_t* surface, SKRectI* bounds) 6021 { 6022 return .sk_surface_new_image_snapshot_with_crop (surface, bounds); 6023 } 6024 6025 // sk_surface_t* sk_surface_new_null(int width, int height) 6026 static sk_surface_t* sk_surface_new_null (int width, int height) 6027 { 6028 return .sk_surface_new_null (width, height); 6029 } 6030 6031 // sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*, size_t rowBytes, const sk_surfaceprops_t*) 6032 static sk_surface_t* sk_surface_new_raster (SKImageInfoNative* param0, size_t rowBytes, sk_surfaceprops_t* param2) 6033 { 6034 return .sk_surface_new_raster (param0, rowBytes, param2); 6035 } 6036 6037 // sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels, size_t rowBytes, const sk_surface_raster_release_proc releaseProc, void* context, const sk_surfaceprops_t* props) 6038 static sk_surface_t* sk_surface_new_raster_direct (SKImageInfoNative* param0, void* pixels, size_t rowBytes, SKSurfaceRasterReleaseProxyDelegate releaseProc, void* context, sk_surfaceprops_t* props) 6039 { 6040 return .sk_surface_new_raster_direct (param0, pixels, rowBytes, releaseProc, context, props); 6041 } 6042 6043 // sk_surface_t* sk_surface_new_render_target(gr_context_t* context, bool budgeted, const sk_imageinfo_t* cinfo, int sampleCount, gr_surfaceorigin_t origin, const sk_surfaceprops_t* props, bool shouldCreateWithMips) 6044 static sk_surface_t* sk_surface_new_render_target (gr_context_t* context, bool budgeted, SKImageInfoNative* cinfo, int sampleCount, GRSurfaceOrigin origin, sk_surfaceprops_t* props, bool shouldCreateWithMips) 6045 { 6046 return .sk_surface_new_render_target (context, budgeted, cinfo, sampleCount, origin, props, shouldCreateWithMips); 6047 } 6048 6049 // bool sk_surface_peek_pixels(sk_surface_t* surface, sk_pixmap_t* pixmap) 6050 static bool sk_surface_peek_pixels (sk_surface_t* surface, sk_pixmap_t* pixmap) 6051 { 6052 return .sk_surface_peek_pixels (surface, pixmap); 6053 } 6054 6055 // bool sk_surface_read_pixels(sk_surface_t* surface, sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) 6056 static bool sk_surface_read_pixels (sk_surface_t* surface, SKImageInfoNative* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) 6057 { 6058 return .sk_surface_read_pixels (surface, dstInfo, dstPixels, dstRowBytes, srcX, srcY); 6059 } 6060 6061 // void sk_surface_unref(sk_surface_t*) 6062 static void sk_surface_unref (sk_surface_t* param0) 6063 { 6064 .sk_surface_unref (param0); 6065 } 6066 6067 // void sk_surfaceprops_delete(sk_surfaceprops_t* props) 6068 static void sk_surfaceprops_delete (sk_surfaceprops_t* props) 6069 { 6070 .sk_surfaceprops_delete (props); 6071 } 6072 6073 // uint32_t sk_surfaceprops_get_flags(sk_surfaceprops_t* props) 6074 static uint sk_surfaceprops_get_flags (sk_surfaceprops_t* props) 6075 { 6076 return .sk_surfaceprops_get_flags (props); 6077 } 6078 6079 // sk_pixelgeometry_t sk_surfaceprops_get_pixel_geometry(sk_surfaceprops_t* props) 6080 static SKPixelGeometry sk_surfaceprops_get_pixel_geometry (sk_surfaceprops_t* props) 6081 { 6082 return .sk_surfaceprops_get_pixel_geometry (props); 6083 } 6084 6085 // sk_surfaceprops_t* sk_surfaceprops_new(uint32_t flags, sk_pixelgeometry_t geometry) 6086 static sk_surfaceprops_t* sk_surfaceprops_new (uint flags, SKPixelGeometry geometry) 6087 { 6088 return .sk_surfaceprops_new (flags, geometry); 6089 } 6090 6091 // end header: sk_surface.h 6092 6093 // for header: sk_svg.h 6094 6095 // sk_canvas_t* sk_svgcanvas_create_with_stream(const sk_rect_t* bounds, sk_wstream_t* stream) 6096 static sk_canvas_t* sk_svgcanvas_create_with_stream (SKRect* bounds, sk_wstream_t* stream) 6097 { 6098 return .sk_svgcanvas_create_with_stream (bounds, stream); 6099 } 6100 6101 // sk_canvas_t* sk_svgcanvas_create_with_writer(const sk_rect_t* bounds, sk_xmlwriter_t* writer) 6102 static sk_canvas_t* sk_svgcanvas_create_with_writer (SKRect* bounds, sk_xmlwriter_t* writer) 6103 { 6104 return .sk_svgcanvas_create_with_writer (bounds, writer); 6105 } 6106 6107 // end header: sk_svg.h 6108 6109 // for header: sk_textblob.h 6110 6111 // void sk_textblob_builder_alloc_run(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float x, float y, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) 6112 static void sk_textblob_builder_alloc_run (sk_textblob_builder_t* builder, sk_font_t* font, int count, float x, float y, SKRect* bounds, SKRunBufferInternal* runbuffer) 6113 { 6114 .sk_textblob_builder_alloc_run (builder, font, count, x, y, bounds, runbuffer); 6115 } 6116 6117 // void sk_textblob_builder_alloc_run_pos(sk_textblob_builder_t* builder, const sk_font_t* font, int count, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) 6118 static void sk_textblob_builder_alloc_run_pos (sk_textblob_builder_t* builder, sk_font_t* font, int count, SKRect* bounds, SKRunBufferInternal* runbuffer) 6119 { 6120 .sk_textblob_builder_alloc_run_pos (builder, font, count, bounds, runbuffer); 6121 } 6122 6123 // void sk_textblob_builder_alloc_run_pos_h(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float y, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) 6124 static void sk_textblob_builder_alloc_run_pos_h (sk_textblob_builder_t* builder, sk_font_t* font, int count, float y, SKRect* bounds, SKRunBufferInternal* runbuffer) 6125 { 6126 .sk_textblob_builder_alloc_run_pos_h (builder, font, count, y, bounds, runbuffer); 6127 } 6128 6129 // void sk_textblob_builder_alloc_run_rsxform(sk_textblob_builder_t* builder, const sk_font_t* font, int count, sk_textblob_builder_runbuffer_t* runbuffer) 6130 static void sk_textblob_builder_alloc_run_rsxform (sk_textblob_builder_t* builder, sk_font_t* font, int count, SKRunBufferInternal* runbuffer) 6131 { 6132 .sk_textblob_builder_alloc_run_rsxform (builder, font, count, runbuffer); 6133 } 6134 6135 // void sk_textblob_builder_alloc_run_text(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float x, float y, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) 6136 static void sk_textblob_builder_alloc_run_text (sk_textblob_builder_t* builder, sk_font_t* font, int count, float x, float y, int textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer) 6137 { 6138 .sk_textblob_builder_alloc_run_text (builder, font, count, x, y, textByteCount, bounds, runbuffer); 6139 } 6140 6141 // void sk_textblob_builder_alloc_run_text_pos(sk_textblob_builder_t* builder, const sk_font_t* font, int count, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) 6142 static void sk_textblob_builder_alloc_run_text_pos (sk_textblob_builder_t* builder, sk_font_t* font, int count, int textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer) 6143 { 6144 .sk_textblob_builder_alloc_run_text_pos (builder, font, count, textByteCount, bounds, runbuffer); 6145 } 6146 6147 // void sk_textblob_builder_alloc_run_text_pos_h(sk_textblob_builder_t* builder, const sk_font_t* font, int count, float y, int textByteCount, const sk_rect_t* bounds, sk_textblob_builder_runbuffer_t* runbuffer) 6148 static void sk_textblob_builder_alloc_run_text_pos_h (sk_textblob_builder_t* builder, sk_font_t* font, int count, float y, int textByteCount, SKRect* bounds, SKRunBufferInternal* runbuffer) 6149 { 6150 .sk_textblob_builder_alloc_run_text_pos_h (builder, font, count, y, textByteCount, bounds, runbuffer); 6151 } 6152 6153 // void sk_textblob_builder_delete(sk_textblob_builder_t* builder) 6154 static void sk_textblob_builder_delete (sk_textblob_builder_t* builder) 6155 { 6156 .sk_textblob_builder_delete (builder); 6157 } 6158 6159 // sk_textblob_t* sk_textblob_builder_make(sk_textblob_builder_t* builder) 6160 static sk_textblob_t* sk_textblob_builder_make (sk_textblob_builder_t* builder) 6161 { 6162 return .sk_textblob_builder_make (builder); 6163 } 6164 6165 // sk_textblob_builder_t* sk_textblob_builder_new() 6166 static sk_textblob_builder_t* sk_textblob_builder_new () 6167 { 6168 return .sk_textblob_builder_new (); 6169 } 6170 6171 // void sk_textblob_get_bounds(const sk_textblob_t* blob, sk_rect_t* bounds) 6172 static void sk_textblob_get_bounds (sk_textblob_t* blob, SKRect* bounds) 6173 { 6174 .sk_textblob_get_bounds (blob, bounds); 6175 } 6176 6177 // int sk_textblob_get_intercepts(const sk_textblob_t* blob, const float[2] bounds = 2, float* intervals, const sk_paint_t* paint) 6178 static int sk_textblob_get_intercepts (sk_textblob_t* blob, float* bounds, float* intervals, sk_paint_t* paint) 6179 { 6180 return .sk_textblob_get_intercepts (blob, bounds, intervals, paint); 6181 } 6182 6183 // uint32_t sk_textblob_get_unique_id(const sk_textblob_t* blob) 6184 static uint sk_textblob_get_unique_id (sk_textblob_t* blob) 6185 { 6186 return .sk_textblob_get_unique_id (blob); 6187 } 6188 6189 // void sk_textblob_ref(const sk_textblob_t* blob) 6190 static void sk_textblob_ref (sk_textblob_t* blob) 6191 { 6192 .sk_textblob_ref (blob); 6193 } 6194 6195 // void sk_textblob_unref(const sk_textblob_t* blob) 6196 static void sk_textblob_unref (sk_textblob_t* blob) 6197 { 6198 .sk_textblob_unref (blob); 6199 } 6200 6201 // end header: sk_textblob.h 6202 6203 // for header: sk_typeface.h 6204 6205 // int sk_fontmgr_count_families(sk_fontmgr_t*) 6206 static int sk_fontmgr_count_families (sk_fontmgr_t* param0) 6207 { 6208 return .sk_fontmgr_count_families (param0); 6209 } 6210 6211 // sk_fontmgr_t* sk_fontmgr_create_default() 6212 static sk_fontmgr_t* sk_fontmgr_create_default () 6213 { 6214 return .sk_fontmgr_create_default (); 6215 } 6216 6217 // sk_typeface_t* sk_fontmgr_create_from_data(sk_fontmgr_t*, sk_data_t* data, int index) 6218 static sk_typeface_t* sk_fontmgr_create_from_data (sk_fontmgr_t* param0, sk_data_t* data, int index) 6219 { 6220 return .sk_fontmgr_create_from_data (param0, data, index); 6221 } 6222 6223 // sk_typeface_t* sk_fontmgr_create_from_file(sk_fontmgr_t*, const(char)* path, int index) 6224 static sk_typeface_t* sk_fontmgr_create_from_file (sk_fontmgr_t* param0, string path, int index) 6225 { 6226 return .sk_fontmgr_create_from_file (param0, path.toStringz(), index); 6227 } 6228 6229 // sk_typeface_t* sk_fontmgr_create_from_stream(sk_fontmgr_t*, sk_stream_asset_t* stream, int index) 6230 static sk_typeface_t* sk_fontmgr_create_from_stream (sk_fontmgr_t* param0, sk_stream_asset_t* stream, int index) 6231 { 6232 return .sk_fontmgr_create_from_stream (param0, stream, index); 6233 } 6234 6235 // sk_fontstyleset_t* sk_fontmgr_create_styleset(sk_fontmgr_t*, int index) 6236 static sk_fontstyleset_t* sk_fontmgr_create_styleset (sk_fontmgr_t* param0, int index) 6237 { 6238 return .sk_fontmgr_create_styleset (param0, index); 6239 } 6240 6241 // void sk_fontmgr_get_family_name(sk_fontmgr_t*, int index, sk_string_t* familyName) 6242 static void sk_fontmgr_get_family_name (sk_fontmgr_t* param0, int index, sk_string_t* familyName) 6243 { 6244 .sk_fontmgr_get_family_name (param0, index, familyName); 6245 } 6246 6247 // sk_typeface_t* sk_fontmgr_match_face_style(sk_fontmgr_t*, const sk_typeface_t* face, sk_fontstyle_t* style) 6248 static sk_typeface_t* sk_fontmgr_match_face_style (sk_fontmgr_t* param0, sk_typeface_t* face, sk_fontstyle_t* style) 6249 { 6250 return .sk_fontmgr_match_face_style (param0, face, style); 6251 } 6252 6253 // sk_fontstyleset_t* sk_fontmgr_match_family(sk_fontmgr_t*, const(char)* familyName) 6254 static sk_fontstyleset_t* sk_fontmgr_match_family (sk_fontmgr_t* param0, string familyName) 6255 { 6256 return .sk_fontmgr_match_family (param0, familyName.toStringz()); 6257 } 6258 6259 // sk_typeface_t* sk_fontmgr_match_family_style(sk_fontmgr_t*, const(char)* familyName, sk_fontstyle_t* style) 6260 static sk_typeface_t* sk_fontmgr_match_family_style (sk_fontmgr_t* param0, string familyName, sk_fontstyle_t* style) 6261 { 6262 return .sk_fontmgr_match_family_style (param0, familyName.toStringz(), style); 6263 } 6264 6265 // sk_typeface_t* sk_fontmgr_match_family_style_character(sk_fontmgr_t*, const(char)* familyName, sk_fontstyle_t* style, const(char)** bcp47, int bcp47Count, int32_t character) 6266 static sk_typeface_t* sk_fontmgr_match_family_style_character (sk_fontmgr_t* param0, string familyName, sk_fontstyle_t* style, string[] bcp47, int bcp47Count, int character) 6267 { 6268 const(char)*[] bcp47Ptr = toCStrings(bcp47); 6269 return .sk_fontmgr_match_family_style_character (param0, familyName.toStringz(), style, bcp47Ptr.ptr, bcp47Count, character); 6270 } 6271 6272 // sk_fontmgr_t* sk_fontmgr_ref_default() 6273 static sk_fontmgr_t* sk_fontmgr_ref_default () 6274 { 6275 return .sk_fontmgr_ref_default (); 6276 } 6277 6278 // void sk_fontmgr_unref(sk_fontmgr_t*) 6279 static void sk_fontmgr_unref (sk_fontmgr_t* param0) 6280 { 6281 .sk_fontmgr_unref (param0); 6282 } 6283 6284 // void sk_fontstyle_delete(sk_fontstyle_t* fs) 6285 static void sk_fontstyle_delete (sk_fontstyle_t* fs) 6286 { 6287 .sk_fontstyle_delete (fs); 6288 } 6289 6290 // sk_font_style_slant_t sk_fontstyle_get_slant(const sk_fontstyle_t* fs) 6291 static SKFontStyleSlant sk_fontstyle_get_slant (sk_fontstyle_t* fs) 6292 { 6293 return .sk_fontstyle_get_slant (fs); 6294 } 6295 6296 // int sk_fontstyle_get_weight(const sk_fontstyle_t* fs) 6297 static int sk_fontstyle_get_weight (sk_fontstyle_t* fs) 6298 { 6299 return .sk_fontstyle_get_weight (fs); 6300 } 6301 6302 // int sk_fontstyle_get_width(const sk_fontstyle_t* fs) 6303 static int sk_fontstyle_get_width (sk_fontstyle_t* fs) 6304 { 6305 return .sk_fontstyle_get_width (fs); 6306 } 6307 6308 // sk_fontstyle_t* sk_fontstyle_new(int weight, int width, sk_font_style_slant_t slant) 6309 static sk_fontstyle_t* sk_fontstyle_new (int weight, int width, SKFontStyleSlant slant) 6310 { 6311 return .sk_fontstyle_new (weight, width, slant); 6312 } 6313 6314 // sk_fontstyleset_t* sk_fontstyleset_create_empty() 6315 static sk_fontstyleset_t* sk_fontstyleset_create_empty () 6316 { 6317 return .sk_fontstyleset_create_empty (); 6318 } 6319 6320 // sk_typeface_t* sk_fontstyleset_create_typeface(sk_fontstyleset_t* fss, int index) 6321 static sk_typeface_t* sk_fontstyleset_create_typeface (sk_fontstyleset_t* fss, int index) 6322 { 6323 return .sk_fontstyleset_create_typeface (fss, index); 6324 } 6325 6326 // int sk_fontstyleset_get_count(sk_fontstyleset_t* fss) 6327 static int sk_fontstyleset_get_count (sk_fontstyleset_t* fss) 6328 { 6329 return .sk_fontstyleset_get_count (fss); 6330 } 6331 6332 // void sk_fontstyleset_get_style(sk_fontstyleset_t* fss, int index, sk_fontstyle_t* fs, sk_string_t* style) 6333 static void sk_fontstyleset_get_style (sk_fontstyleset_t* fss, int index, sk_fontstyle_t* fs, sk_string_t* style) 6334 { 6335 .sk_fontstyleset_get_style (fss, index, fs, style); 6336 } 6337 6338 // sk_typeface_t* sk_fontstyleset_match_style(sk_fontstyleset_t* fss, sk_fontstyle_t* style) 6339 static sk_typeface_t* sk_fontstyleset_match_style (sk_fontstyleset_t* fss, sk_fontstyle_t* style) 6340 { 6341 return .sk_fontstyleset_match_style (fss, style); 6342 } 6343 6344 // void sk_fontstyleset_unref(sk_fontstyleset_t* fss) 6345 static void sk_fontstyleset_unref (sk_fontstyleset_t* fss) 6346 { 6347 .sk_fontstyleset_unref (fss); 6348 } 6349 6350 // sk_data_t* sk_typeface_copy_table_data(const sk_typeface_t* typeface, sk_font_table_tag_t tag) 6351 static sk_data_t* sk_typeface_copy_table_data (sk_typeface_t* typeface, uint tag) 6352 { 6353 return .sk_typeface_copy_table_data (typeface, tag); 6354 } 6355 6356 // int sk_typeface_count_glyphs(const sk_typeface_t* typeface) 6357 static int sk_typeface_count_glyphs (sk_typeface_t* typeface) 6358 { 6359 return .sk_typeface_count_glyphs (typeface); 6360 } 6361 6362 // int sk_typeface_count_tables(const sk_typeface_t* typeface) 6363 static int sk_typeface_count_tables (sk_typeface_t* typeface) 6364 { 6365 return .sk_typeface_count_tables (typeface); 6366 } 6367 6368 // sk_typeface_t* sk_typeface_create_default() 6369 static sk_typeface_t* sk_typeface_create_default () 6370 { 6371 return .sk_typeface_create_default (); 6372 } 6373 6374 // sk_typeface_t* sk_typeface_create_from_data(sk_data_t* data, int index) 6375 static sk_typeface_t* sk_typeface_create_from_data (sk_data_t* data, int index) 6376 { 6377 return .sk_typeface_create_from_data (data, index); 6378 } 6379 6380 // sk_typeface_t* sk_typeface_create_from_file(const(char)* path, int index) 6381 static sk_typeface_t* sk_typeface_create_from_file ( string path, int index) 6382 { 6383 return .sk_typeface_create_from_file (path.toStringz(), index); 6384 } 6385 6386 // sk_typeface_t* sk_typeface_create_from_name(const(char)* familyName, const sk_fontstyle_t* style) 6387 static sk_typeface_t* sk_typeface_create_from_name (string familyName, sk_fontstyle_t* style) 6388 { 6389 return .sk_typeface_create_from_name (familyName.toStringz(), style); 6390 } 6391 6392 // sk_typeface_t* sk_typeface_create_from_stream(sk_stream_asset_t* stream, int index) 6393 static sk_typeface_t* sk_typeface_create_from_stream (sk_stream_asset_t* stream, int index) 6394 { 6395 return .sk_typeface_create_from_stream (stream, index); 6396 } 6397 6398 // sk_string_t* sk_typeface_get_family_name(const sk_typeface_t* typeface) 6399 static sk_string_t* sk_typeface_get_family_name (sk_typeface_t* typeface) 6400 { 6401 return .sk_typeface_get_family_name (typeface); 6402 } 6403 6404 // sk_font_style_slant_t sk_typeface_get_font_slant(const sk_typeface_t* typeface) 6405 static SKFontStyleSlant sk_typeface_get_font_slant (sk_typeface_t* typeface) 6406 { 6407 return .sk_typeface_get_font_slant (typeface); 6408 } 6409 6410 // int sk_typeface_get_font_weight(const sk_typeface_t* typeface) 6411 static int sk_typeface_get_font_weight (sk_typeface_t* typeface) 6412 { 6413 return .sk_typeface_get_font_weight (typeface); 6414 } 6415 6416 // int sk_typeface_get_font_width(const sk_typeface_t* typeface) 6417 static int sk_typeface_get_font_width (sk_typeface_t* typeface) 6418 { 6419 return .sk_typeface_get_font_width (typeface); 6420 } 6421 6422 // sk_fontstyle_t* sk_typeface_get_fontstyle(const sk_typeface_t* typeface) 6423 static sk_fontstyle_t* sk_typeface_get_fontstyle (sk_typeface_t* typeface) 6424 { 6425 return .sk_typeface_get_fontstyle (typeface); 6426 } 6427 6428 // bool sk_typeface_get_kerning_pair_adjustments(const sk_typeface_t* typeface, const uint16_t* glyphs, int count, int32_t* adjustments) 6429 static bool sk_typeface_get_kerning_pair_adjustments (sk_typeface_t* typeface, ushort* glyphs, int count, int* adjustments) 6430 { 6431 return .sk_typeface_get_kerning_pair_adjustments (typeface, glyphs, count, adjustments); 6432 } 6433 6434 // size_t sk_typeface_get_table_data(const sk_typeface_t* typeface, sk_font_table_tag_t tag, size_t offset, size_t length, void* data) 6435 static void* sk_typeface_get_table_data (sk_typeface_t* typeface, uint tag, size_t offset, size_t length, void* data) 6436 { 6437 return .sk_typeface_get_table_data (typeface, tag, offset, length, data); 6438 } 6439 6440 // size_t sk_typeface_get_table_size(const sk_typeface_t* typeface, sk_font_table_tag_t tag) 6441 static size_t sk_typeface_get_table_size (sk_typeface_t* typeface, uint tag) 6442 { 6443 return .sk_typeface_get_table_size (typeface, tag); 6444 } 6445 6446 // int sk_typeface_get_table_tags(const sk_typeface_t* typeface, sk_font_table_tag_t* tags) 6447 static int sk_typeface_get_table_tags (sk_typeface_t* typeface, uint* tags) 6448 { 6449 return .sk_typeface_get_table_tags (typeface, tags); 6450 } 6451 6452 // int sk_typeface_get_units_per_em(const sk_typeface_t* typeface) 6453 static int sk_typeface_get_units_per_em (sk_typeface_t* typeface) 6454 { 6455 return .sk_typeface_get_units_per_em (typeface); 6456 } 6457 6458 // bool sk_typeface_is_fixed_pitch(const sk_typeface_t* typeface) 6459 static bool sk_typeface_is_fixed_pitch (sk_typeface_t* typeface) 6460 { 6461 return .sk_typeface_is_fixed_pitch (typeface); 6462 } 6463 6464 // sk_stream_asset_t* sk_typeface_open_stream(const sk_typeface_t* typeface, int* ttcIndex) 6465 static sk_stream_asset_t* sk_typeface_open_stream (sk_typeface_t* typeface, int* ttcIndex) 6466 { 6467 return .sk_typeface_open_stream (typeface, ttcIndex); 6468 } 6469 6470 // sk_typeface_t* sk_typeface_ref_default() 6471 static sk_typeface_t* sk_typeface_ref_default () 6472 { 6473 return .sk_typeface_ref_default (); 6474 } 6475 6476 // uint16_t sk_typeface_unichar_to_glyph(const sk_typeface_t* typeface, const int32_t unichar) 6477 static ushort sk_typeface_unichar_to_glyph (sk_typeface_t* typeface, int unichar) 6478 { 6479 return .sk_typeface_unichar_to_glyph (typeface, unichar); 6480 } 6481 6482 // void sk_typeface_unichars_to_glyphs(const sk_typeface_t* typeface, const int32_t* unichars, int count, uint16_t* glyphs) 6483 static void sk_typeface_unichars_to_glyphs (sk_typeface_t* typeface, int* unichars, int count, ushort* glyphs) 6484 { 6485 .sk_typeface_unichars_to_glyphs (typeface, unichars, count, glyphs); 6486 } 6487 6488 // void sk_typeface_unref(sk_typeface_t* typeface) 6489 static void sk_typeface_unref (sk_typeface_t* typeface) 6490 { 6491 .sk_typeface_unref (typeface); 6492 } 6493 6494 // end header: sk_typeface.h 6495 6496 // for header: sk_vertices.h 6497 6498 // sk_vertices_t* sk_vertices_make_copy(sk_vertices_vertex_mode_t vmode, int vertexCount, const sk_point_t* positions, const sk_point_t* texs, const sk_color_t* colors, int indexCount, const uint16_t* indices) 6499 static sk_vertices_t* sk_vertices_make_copy (SKVertexMode vmode, int vertexCount, SKPoint* positions, SKPoint* texs, uint* colors, int indexCount, ushort* indices) 6500 { 6501 return .sk_vertices_make_copy (vmode, vertexCount, positions, texs, colors, indexCount, indices); 6502 } 6503 6504 // void sk_vertices_ref(sk_vertices_t* cvertices) 6505 static void sk_vertices_ref (sk_vertices_t* cvertices) 6506 { 6507 .sk_vertices_ref (cvertices); 6508 } 6509 6510 // void sk_vertices_unref(sk_vertices_t* cvertices) 6511 static void sk_vertices_unref (sk_vertices_t* cvertices) 6512 { 6513 .sk_vertices_unref (cvertices); 6514 } 6515 6516 // end header: sk_vertices.h 6517 6518 // for header: sk_xml.h 6519 6520 // void sk_xmlstreamwriter_delete(sk_xmlstreamwriter_t* writer) 6521 static void sk_xmlstreamwriter_delete (sk_xmlstreamwriter_t* writer) 6522 { 6523 .sk_xmlstreamwriter_delete (writer); 6524 } 6525 6526 // sk_xmlstreamwriter_t* sk_xmlstreamwriter_new(sk_wstream_t* stream) 6527 static sk_xmlstreamwriter_t* sk_xmlstreamwriter_new (sk_wstream_t* stream) 6528 { 6529 return .sk_xmlstreamwriter_new (stream); 6530 } 6531 6532 // end header: sk_xml.h 6533 6534 // for header: sk_compatpaint.h 6535 6536 // sk_compatpaint_t* sk_compatpaint_clone(const sk_compatpaint_t* paint) 6537 static sk_compatpaint_t* sk_compatpaint_clone (sk_compatpaint_t* paint) 6538 { 6539 return .sk_compatpaint_clone (paint); 6540 } 6541 6542 // void sk_compatpaint_delete(sk_compatpaint_t* paint) 6543 static void sk_compatpaint_delete (sk_compatpaint_t* paint) 6544 { 6545 .sk_compatpaint_delete (paint); 6546 } 6547 6548 // sk_font_t* sk_compatpaint_get_font(sk_compatpaint_t* paint) 6549 static sk_font_t* sk_compatpaint_get_font (sk_compatpaint_t* paint) 6550 { 6551 return .sk_compatpaint_get_font (paint); 6552 } 6553 6554 // sk_text_align_t sk_compatpaint_get_text_align(const sk_compatpaint_t* paint) 6555 static SKTextAlign sk_compatpaint_get_text_align (sk_compatpaint_t* paint) 6556 { 6557 return .sk_compatpaint_get_text_align (paint); 6558 } 6559 6560 // sk_text_encoding_t sk_compatpaint_get_text_encoding(const sk_compatpaint_t* paint) 6561 static SKTextEncoding sk_compatpaint_get_text_encoding (sk_compatpaint_t* paint) 6562 { 6563 return .sk_compatpaint_get_text_encoding (paint); 6564 } 6565 6566 // sk_font_t* sk_compatpaint_make_font(sk_compatpaint_t* paint) 6567 static sk_font_t* sk_compatpaint_make_font (sk_compatpaint_t* paint) 6568 { 6569 return .sk_compatpaint_make_font (paint); 6570 } 6571 6572 // sk_compatpaint_t* sk_compatpaint_new() 6573 static sk_compatpaint_t* sk_compatpaint_new () 6574 { 6575 return .sk_compatpaint_new (); 6576 } 6577 6578 // sk_compatpaint_t* sk_compatpaint_new_with_font(const sk_font_t* font) 6579 static sk_compatpaint_t* sk_compatpaint_new_with_font (sk_font_t* font) 6580 { 6581 return .sk_compatpaint_new_with_font (font); 6582 } 6583 6584 // void sk_compatpaint_reset(sk_compatpaint_t* paint) 6585 static void sk_compatpaint_reset (sk_compatpaint_t* paint) 6586 { 6587 .sk_compatpaint_reset (paint); 6588 } 6589 6590 // void sk_compatpaint_set_text_align(sk_compatpaint_t* paint, sk_text_align_t textAlign) 6591 static void sk_compatpaint_set_text_align (sk_compatpaint_t* paint, SKTextAlign textAlign) 6592 { 6593 .sk_compatpaint_set_text_align (paint, textAlign); 6594 } 6595 6596 // void sk_compatpaint_set_text_encoding(sk_compatpaint_t* paint, sk_text_encoding_t encoding) 6597 static void sk_compatpaint_set_text_encoding (sk_compatpaint_t* paint, SKTextEncoding encoding) 6598 { 6599 .sk_compatpaint_set_text_encoding (paint, encoding); 6600 } 6601 6602 // end header: sk_compatpaint.h 6603 6604 // for header: sk_manageddrawable.h 6605 6606 // sk_manageddrawable_t* sk_manageddrawable_new(void* context) 6607 static sk_manageddrawable_t* sk_manageddrawable_new (void* context) 6608 { 6609 return .sk_manageddrawable_new (context); 6610 } 6611 6612 // void sk_manageddrawable_set_procs(sk_manageddrawable_procs_t procs) 6613 static void sk_manageddrawable_set_procs (SKManagedDrawableDelegates procs) 6614 { 6615 .sk_manageddrawable_set_procs (procs); 6616 } 6617 6618 // void sk_manageddrawable_unref(sk_manageddrawable_t*) 6619 static void sk_manageddrawable_unref (sk_manageddrawable_t* param0) 6620 { 6621 .sk_manageddrawable_unref (param0); 6622 } 6623 6624 // end header: sk_manageddrawable.h 6625 6626 // for header: sk_managedstream.h 6627 6628 // void sk_managedstream_destroy(sk_stream_managedstream_t* s) 6629 static void sk_managedstream_destroy (sk_stream_managedstream_t* s) 6630 { 6631 .sk_managedstream_destroy (s); 6632 } 6633 6634 // sk_stream_managedstream_t* sk_managedstream_new(void* context) 6635 static sk_stream_managedstream_t* sk_managedstream_new (void* context) 6636 { 6637 return .sk_managedstream_new (context); 6638 } 6639 6640 // void sk_managedstream_set_procs(sk_managedstream_procs_t procs) 6641 static void sk_managedstream_set_procs (SKManagedStreamDelegates procs) 6642 { 6643 .sk_managedstream_set_procs (procs); 6644 } 6645 6646 // void sk_managedwstream_destroy(sk_wstream_managedstream_t* s) 6647 static void sk_managedwstream_destroy (sk_wstream_managedstream_t* s) 6648 { 6649 .sk_managedwstream_destroy (s); 6650 } 6651 6652 // sk_wstream_managedstream_t* sk_managedwstream_new(void* context) 6653 static sk_wstream_managedstream_t* sk_managedwstream_new (void* context) 6654 { 6655 return .sk_managedwstream_new (context); 6656 } 6657 6658 // void sk_managedwstream_set_procs(sk_managedwstream_procs_t procs) 6659 static void sk_managedwstream_set_procs (SKManagedWStreamDelegates procs) 6660 { 6661 .sk_managedwstream_set_procs (procs); 6662 } 6663 6664 // end header: sk_managedstream.h 6665 6666 // for header: sk_managedtracememorydump.h 6667 6668 // void sk_managedtracememorydump_delete(sk_managedtracememorydump_t*) 6669 static void sk_managedtracememorydump_delete (sk_managedtracememorydump_t* param0) 6670 { 6671 .sk_managedtracememorydump_delete (param0); 6672 } 6673 6674 // sk_managedtracememorydump_t* sk_managedtracememorydump_new(bool detailed, bool dumpWrapped, void* context) 6675 static sk_managedtracememorydump_t* sk_managedtracememorydump_new (bool detailed, bool dumpWrapped, void* context) 6676 { 6677 return .sk_managedtracememorydump_new (detailed, dumpWrapped, context); 6678 } 6679 6680 // void sk_managedtracememorydump_set_procs(sk_managedtracememorydump_procs_t procs) 6681 static void sk_managedtracememorydump_set_procs (SKManagedTraceMemoryDumpDelegates procs) 6682 { 6683 .sk_managedtracememorydump_set_procs (procs); 6684 } 6685 6686 // end header: sk_managedtracememorydump.h 6687 6688 6689 } 6690 6691 // End functions 6692 6693 6694 6695 // #region Delegates 6696 6697 extern(C) { 6698 // typedef void (*)()* gr_gl_func_ptr 6699 alias gr_gl_func_ptr = GRGlFuncPtr; 6700 alias GRGlFuncPtr = void function(); 6701 6702 // typedef gr_gl_func_ptr (*)(void* ctx, const(char)* name)* gr_gl_get_proc 6703 alias gr_gl_get_proc = GRGlGetProcProxyDelegate; 6704 alias GRGlGetProcProxyDelegate = void* function(void* ctx, void* name); 6705 6706 // typedef void (*)()* gr_vk_func_ptr 6707 alias gr_vk_func_ptr = GRVkFuncPtr; 6708 alias GRVkFuncPtr = void function(); 6709 6710 // typedef gr_vk_func_ptr (*)(void* ctx, const(char)* name, vk_instance_t* instance, vk_device_t* device)* gr_vk_get_proc 6711 alias gr_vk_get_proc = GRVkGetProcProxyDelegate; 6712 alias GRVkGetProcProxyDelegate = void* function(void* ctx, void* name, vk_instance_t* instance, vk_device_t* device); 6713 6714 // typedef void (*)(void* addr, void* context)* sk_bitmap_release_proc 6715 alias sk_bitmap_release_proc = SKBitmapReleaseProxyDelegate; 6716 alias SKBitmapReleaseProxyDelegate = void function(void* addr, void* context); 6717 6718 // typedef void (*)(const(void)* ptr, void* context)* sk_data_release_proc 6719 alias sk_data_release_proc = SKDataReleaseProxyDelegate; 6720 alias SKDataReleaseProxyDelegate = void function(void* ptr, void* context); 6721 6722 // typedef void (*)(const sk_path_t* pathOrNull, const sk_matrix_t* matrix, void* context)* sk_glyph_path_proc 6723 alias sk_glyph_path_proc = SKGlyphPathProxyDelegate; 6724 alias SKGlyphPathProxyDelegate = void function(sk_path_t* pathOrNull, SKMatrix* matrix, void* context); 6725 6726 // typedef void (*)(const(void)* addr, void* context)* sk_image_raster_release_proc 6727 alias sk_image_raster_release_proc = SKImageRasterReleaseProxyDelegate; 6728 alias SKImageRasterReleaseProxyDelegate = void function(void* addr, void* context); 6729 6730 // typedef void (*)(void* context)* sk_image_texture_release_proc 6731 alias sk_image_texture_release_proc = SKImageTextureReleaseProxyDelegate; 6732 alias SKImageTextureReleaseProxyDelegate = void function(void* context); 6733 6734 // typedef void (*)(sk_manageddrawable_t* d, void* context)* sk_manageddrawable_destroy_proc 6735 alias sk_manageddrawable_destroy_proc = SKManagedDrawableDestroyProxyDelegate; 6736 alias SKManagedDrawableDestroyProxyDelegate = void function(sk_manageddrawable_t* d, void* context); 6737 6738 // typedef void (*)(sk_manageddrawable_t* d, void* context, sk_canvas_t* ccanvas)* sk_manageddrawable_draw_proc 6739 alias sk_manageddrawable_draw_proc = SKManagedDrawableDrawProxyDelegate; 6740 alias SKManagedDrawableDrawProxyDelegate = void function(sk_manageddrawable_t* d, void* context, sk_canvas_t* ccanvas); 6741 6742 // typedef void (*)(sk_manageddrawable_t* d, void* context, sk_rect_t* rect)* sk_manageddrawable_getBounds_proc 6743 alias sk_manageddrawable_getBounds_proc = SKManagedDrawableGetBoundsProxyDelegate; 6744 alias SKManagedDrawableGetBoundsProxyDelegate = void function(sk_manageddrawable_t* d, void* context, SKRect* rect); 6745 6746 // typedef sk_picture_t* (*)(sk_manageddrawable_t* d, void* context)* sk_manageddrawable_newPictureSnapshot_proc 6747 alias sk_manageddrawable_newPictureSnapshot_proc = SKManagedDrawableNewPictureSnapshotProxyDelegate; 6748 alias SKManagedDrawableNewPictureSnapshotProxyDelegate = void* function(void* d, void* context); 6749 6750 // typedef void (*)(sk_stream_managedstream_t* s, void* context)* sk_managedstream_destroy_proc 6751 alias sk_managedstream_destroy_proc = SKManagedStreamDestroyProxyDelegate; 6752 alias SKManagedStreamDestroyProxyDelegate = void function(sk_stream_managedstream_t* s, void* context); 6753 6754 // typedef sk_stream_managedstream_t* (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_duplicate_proc 6755 alias sk_managedstream_duplicate_proc = SKManagedStreamDuplicateProxyDelegate; 6756 alias SKManagedStreamDuplicateProxyDelegate = sk_stream_managedstream_t* function(sk_stream_managedstream_t* s, void* context); 6757 6758 // typedef sk_stream_managedstream_t* (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_fork_proc 6759 alias sk_managedstream_fork_proc = SKManagedStreamForkProxyDelegate; 6760 alias SKManagedStreamForkProxyDelegate = sk_stream_managedstream_t* function(sk_stream_managedstream_t* s, void* context); 6761 6762 // typedef size_t (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_getLength_proc 6763 alias sk_managedstream_getLength_proc = SKManagedStreamGetLengthProxyDelegate; 6764 alias SKManagedStreamGetLengthProxyDelegate = void* function(sk_stream_managedstream_t* s, void* context); 6765 6766 // typedef size_t (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_getPosition_proc 6767 alias sk_managedstream_getPosition_proc = SKManagedStreamGetPositionProxyDelegate; 6768 alias SKManagedStreamGetPositionProxyDelegate = void* function(sk_stream_managedstream_t* s, void* context); 6769 6770 // typedef bool (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_hasLength_proc 6771 alias sk_managedstream_hasLength_proc = SKManagedStreamHasLengthProxyDelegate; 6772 alias SKManagedStreamHasLengthProxyDelegate = bool function(sk_stream_managedstream_t* s, void* context); 6773 6774 // typedef bool (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_hasPosition_proc 6775 alias sk_managedstream_hasPosition_proc = SKManagedStreamHasPositionProxyDelegate; 6776 alias SKManagedStreamHasPositionProxyDelegate = bool function(sk_stream_managedstream_t* s, void* context); 6777 6778 // typedef bool (*)(const sk_stream_managedstream_t* s, void* context)* sk_managedstream_isAtEnd_proc 6779 alias sk_managedstream_isAtEnd_proc = SKManagedStreamIsAtEndProxyDelegate; 6780 alias SKManagedStreamIsAtEndProxyDelegate = bool function(sk_stream_managedstream_t* s, void* context); 6781 6782 // typedef bool (*)(sk_stream_managedstream_t* s, void* context, int offset)* sk_managedstream_move_proc 6783 alias sk_managedstream_move_proc = SKManagedStreamMoveProxyDelegate; 6784 alias SKManagedStreamMoveProxyDelegate = bool function(sk_stream_managedstream_t* s, void* context, int offset); 6785 6786 // typedef size_t (*)(const sk_stream_managedstream_t* s, void* context, void* buffer, size_t size)* sk_managedstream_peek_proc 6787 alias sk_managedstream_peek_proc = SKManagedStreamPeekProxyDelegate; 6788 alias SKManagedStreamPeekProxyDelegate = void* function(sk_stream_managedstream_t* s, void* context, void* buffer, size_t size); 6789 6790 // typedef size_t (*)(sk_stream_managedstream_t* s, void* context, void* buffer, size_t size)* sk_managedstream_read_proc 6791 alias sk_managedstream_read_proc = SKManagedStreamReadProxyDelegate; 6792 alias SKManagedStreamReadProxyDelegate = void* function(sk_stream_managedstream_t* s, void* context, void* buffer, size_t size); 6793 6794 // typedef bool (*)(sk_stream_managedstream_t* s, void* context)* sk_managedstream_rewind_proc 6795 alias sk_managedstream_rewind_proc = SKManagedStreamRewindProxyDelegate; 6796 alias SKManagedStreamRewindProxyDelegate = bool function(sk_stream_managedstream_t* s, void* context); 6797 6798 // typedef bool (*)(sk_stream_managedstream_t* s, void* context, size_t position)* sk_managedstream_seek_proc 6799 alias sk_managedstream_seek_proc = SKManagedStreamSeekProxyDelegate; 6800 alias SKManagedStreamSeekProxyDelegate = bool function(sk_stream_managedstream_t* s, void* context, size_t position); 6801 6802 // typedef void (*)(sk_managedtracememorydump_t* d, void* context, const(char)* dumpName, const(char)* valueName, const(char)* units, uint64_t value)* sk_managedtraceMemoryDump_dumpNumericValue_proc 6803 alias sk_managedtraceMemoryDump_dumpNumericValue_proc = SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate; 6804 alias SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate = void function(sk_managedtracememorydump_t* d, void* context, void* dumpName, void* valueName, void* units, ulong value); 6805 6806 // typedef void (*)(sk_managedtracememorydump_t* d, void* context, const(char)* dumpName, const(char)* valueName, const(char)* value)* sk_managedtraceMemoryDump_dumpStringValue_proc 6807 alias sk_managedtraceMemoryDump_dumpStringValue_proc = SKManagedTraceMemoryDumpDumpStringValueProxyDelegate; 6808 alias SKManagedTraceMemoryDumpDumpStringValueProxyDelegate = void function(sk_managedtracememorydump_t* d, void* context, void* dumpName, void* valueName, void* value); 6809 6810 // typedef size_t (*)(const sk_wstream_managedstream_t* s, void* context)* sk_managedwstream_bytesWritten_proc 6811 alias sk_managedwstream_bytesWritten_proc = SKManagedWStreamBytesWrittenProxyDelegate; 6812 alias SKManagedWStreamBytesWrittenProxyDelegate = void* function(sk_wstream_managedstream_t* s, void* context); 6813 6814 // typedef void (*)(sk_wstream_managedstream_t* s, void* context)* sk_managedwstream_destroy_proc 6815 alias sk_managedwstream_destroy_proc = SKManagedWStreamDestroyProxyDelegate; 6816 alias SKManagedWStreamDestroyProxyDelegate = void function(sk_wstream_managedstream_t* s, void* context); 6817 6818 // typedef void (*)(sk_wstream_managedstream_t* s, void* context)* sk_managedwstream_flush_proc 6819 alias sk_managedwstream_flush_proc = SKManagedWStreamFlushProxyDelegate; 6820 alias SKManagedWStreamFlushProxyDelegate = void function(sk_wstream_managedstream_t* s, void* context); 6821 6822 // typedef bool (*)(sk_wstream_managedstream_t* s, void* context, const(void)* buffer, size_t size)* sk_managedwstream_write_proc 6823 alias sk_managedwstream_write_proc = SKManagedWStreamWriteProxyDelegate; 6824 alias SKManagedWStreamWriteProxyDelegate = bool function(sk_wstream_managedstream_t* s, void* context, void* buffer, size_t size); 6825 6826 // typedef void (*)(void* addr, void* context)* sk_surface_raster_release_proc 6827 alias sk_surface_raster_release_proc = SKSurfaceRasterReleaseProxyDelegate; 6828 alias SKSurfaceRasterReleaseProxyDelegate = void function(void* addr, void* context); 6829 6830 } 6831 // #endregion 6832 6833 6834 6835 6836 // #region Enums 6837 6838 6839 alias gr_backend_t = GRBackendNative; 6840 6841 6842 alias gr_surfaceorigin_t = GRSurfaceOrigin; 6843 6844 enum GRSurfaceOrigin { 6845 // TOP_LEFT_GR_SURFACE_ORIGIN = 0 6846 TopLeft = 0, 6847 // BOTTOM_LEFT_GR_SURFACE_ORIGIN = 1 6848 BottomLeft = 1, 6849 } 6850 6851 6852 alias sk_alphatype_t = SKAlphaType; 6853 6854 alias sk_bitmap_allocflags_t = SKBitmapAllocFlags; 6855 6856 enum SKBitmapAllocFlags { 6857 // NONE_SK_BITMAP_ALLOC_FLAGS = 0 6858 None = 0, 6859 // ZERO_PIXELS_SK_BITMAP_ALLOC_FLAGS = 1 << 0 6860 ZeroPixels = 1, 6861 } 6862 6863 6864 alias sk_blendmode_t = SKBlendMode; 6865 6866 enum SKBlendMode { 6867 // CLEAR_SK_BLENDMODE = 0 6868 Clear = 0, 6869 // SRC_SK_BLENDMODE = 1 6870 Src = 1, 6871 // DST_SK_BLENDMODE = 2 6872 Dst = 2, 6873 // SRCOVER_SK_BLENDMODE = 3 6874 SrcOver = 3, 6875 // DSTOVER_SK_BLENDMODE = 4 6876 DstOver = 4, 6877 // SRCIN_SK_BLENDMODE = 5 6878 SrcIn = 5, 6879 // DSTIN_SK_BLENDMODE = 6 6880 DstIn = 6, 6881 // SRCOUT_SK_BLENDMODE = 7 6882 SrcOut = 7, 6883 // DSTOUT_SK_BLENDMODE = 8 6884 DstOut = 8, 6885 // SRCATOP_SK_BLENDMODE = 9 6886 SrcATop = 9, 6887 // DSTATOP_SK_BLENDMODE = 10 6888 DstATop = 10, 6889 // XOR_SK_BLENDMODE = 11 6890 Xor = 11, 6891 // PLUS_SK_BLENDMODE = 12 6892 Plus = 12, 6893 // MODULATE_SK_BLENDMODE = 13 6894 Modulate = 13, 6895 // SCREEN_SK_BLENDMODE = 14 6896 Screen = 14, 6897 // OVERLAY_SK_BLENDMODE = 15 6898 Overlay = 15, 6899 // DARKEN_SK_BLENDMODE = 16 6900 Darken = 16, 6901 // LIGHTEN_SK_BLENDMODE = 17 6902 Lighten = 17, 6903 // COLORDODGE_SK_BLENDMODE = 18 6904 ColorDodge = 18, 6905 // COLORBURN_SK_BLENDMODE = 19 6906 ColorBurn = 19, 6907 // HARDLIGHT_SK_BLENDMODE = 20 6908 HardLight = 20, 6909 // SOFTLIGHT_SK_BLENDMODE = 21 6910 SoftLight = 21, 6911 // DIFFERENCE_SK_BLENDMODE = 22 6912 Difference = 22, 6913 // EXCLUSION_SK_BLENDMODE = 23 6914 Exclusion = 23, 6915 // MULTIPLY_SK_BLENDMODE = 24 6916 Multiply = 24, 6917 // HUE_SK_BLENDMODE = 25 6918 Hue = 25, 6919 // SATURATION_SK_BLENDMODE = 26 6920 Saturation = 26, 6921 // COLOR_SK_BLENDMODE = 27 6922 Color = 27, 6923 // LUMINOSITY_SK_BLENDMODE = 28 6924 Luminosity = 28, 6925 } 6926 6927 6928 alias sk_blurstyle_t = SKBlurStyle; 6929 6930 enum SKBlurStyle { 6931 // NORMAL_SK_BLUR_STYLE = 0 6932 Normal = 0, 6933 // SOLID_SK_BLUR_STYLE = 1 6934 Solid = 1, 6935 // OUTER_SK_BLUR_STYLE = 2 6936 Outer = 2, 6937 // INNER_SK_BLUR_STYLE = 3 6938 Inner = 3, 6939 } 6940 6941 6942 alias sk_clipop_t = SKClipOperation; 6943 6944 enum SKClipOperation { 6945 // DIFFERENCE_SK_CLIPOP = 0 6946 Difference = 0, 6947 // INTERSECT_SK_CLIPOP = 1 6948 Intersect = 1, 6949 } 6950 6951 6952 alias sk_codec_result_t = SKCodecResult; 6953 6954 enum SKCodecResult { 6955 // SUCCESS_SK_CODEC_RESULT = 0 6956 Success = 0, 6957 // INCOMPLETE_INPUT_SK_CODEC_RESULT = 1 6958 IncompleteInput = 1, 6959 // ERROR_IN_INPUT_SK_CODEC_RESULT = 2 6960 ErrorInInput = 2, 6961 // INVALID_CONVERSION_SK_CODEC_RESULT = 3 6962 InvalidConversion = 3, 6963 // INVALID_SCALE_SK_CODEC_RESULT = 4 6964 InvalidScale = 4, 6965 // INVALID_PARAMETERS_SK_CODEC_RESULT = 5 6966 InvalidParameters = 5, 6967 // INVALID_INPUT_SK_CODEC_RESULT = 6 6968 InvalidInput = 6, 6969 // COULD_NOT_REWIND_SK_CODEC_RESULT = 7 6970 CouldNotRewind = 7, 6971 // INTERNAL_ERROR_SK_CODEC_RESULT = 8 6972 InternalError = 8, 6973 // UNIMPLEMENTED_SK_CODEC_RESULT = 9 6974 Unimplemented = 9, 6975 } 6976 6977 6978 alias sk_codec_scanline_order_t = SKCodecScanlineOrder; 6979 6980 enum SKCodecScanlineOrder { 6981 // TOP_DOWN_SK_CODEC_SCANLINE_ORDER = 0 6982 TopDown = 0, 6983 // BOTTOM_UP_SK_CODEC_SCANLINE_ORDER = 1 6984 BottomUp = 1, 6985 } 6986 6987 6988 alias sk_codec_zero_initialized_t = SKZeroInitialized; 6989 6990 6991 alias sk_codecanimation_disposalmethod_t = SKCodecAnimationDisposalMethod; 6992 6993 enum SKCodecAnimationDisposalMethod { 6994 // KEEP_SK_CODEC_ANIMATION_DISPOSAL_METHOD = 1 6995 Keep = 1, 6996 // RESTORE_BG_COLOR_SK_CODEC_ANIMATION_DISPOSAL_METHOD = 2 6997 RestoreBackgroundColor = 2, 6998 // RESTORE_PREVIOUS_SK_CODEC_ANIMATION_DISPOSAL_METHOD = 3 6999 RestorePrevious = 3, 7000 } 7001 7002 7003 alias sk_color_channel_t = SKColorChannel; 7004 7005 enum SKColorChannel { 7006 // R_SK_COLOR_CHANNEL = 0 7007 R = 0, 7008 // G_SK_COLOR_CHANNEL = 1 7009 G = 1, 7010 // B_SK_COLOR_CHANNEL = 2 7011 B = 2, 7012 // A_SK_COLOR_CHANNEL = 3 7013 A = 3, 7014 } 7015 7016 7017 alias sk_colortype_t = SKColorTypeNative; 7018 7019 7020 alias sk_crop_rect_flags_t = SKCropRectFlags; 7021 7022 enum SKCropRectFlags { 7023 // HAS_NONE_SK_CROP_RECT_FLAG = 0x00 7024 HasNone = 0, 7025 // HAS_LEFT_SK_CROP_RECT_FLAG = 0x01 7026 HasLeft = 1, 7027 // HAS_TOP_SK_CROP_RECT_FLAG = 0x02 7028 HasTop = 2, 7029 // HAS_WIDTH_SK_CROP_RECT_FLAG = 0x04 7030 HasWidth = 4, 7031 // HAS_HEIGHT_SK_CROP_RECT_FLAG = 0x08 7032 HasHeight = 8, 7033 // HAS_ALL_SK_CROP_RECT_FLAG = 0x0F 7034 HasAll = 15, 7035 } 7036 7037 7038 alias sk_encoded_image_format_t = SKEncodedImageFormat; 7039 7040 enum SKEncodedImageFormat { 7041 // BMP_SK_ENCODED_FORMAT = 0 7042 Bmp = 0, 7043 // GIF_SK_ENCODED_FORMAT = 1 7044 Gif = 1, 7045 // ICO_SK_ENCODED_FORMAT = 2 7046 Ico = 2, 7047 // JPEG_SK_ENCODED_FORMAT = 3 7048 Jpeg = 3, 7049 // PNG_SK_ENCODED_FORMAT = 4 7050 Png = 4, 7051 // WBMP_SK_ENCODED_FORMAT = 5 7052 Wbmp = 5, 7053 // WEBP_SK_ENCODED_FORMAT = 6 7054 Webp = 6, 7055 // PKM_SK_ENCODED_FORMAT = 7 7056 Pkm = 7, 7057 // KTX_SK_ENCODED_FORMAT = 8 7058 Ktx = 8, 7059 // ASTC_SK_ENCODED_FORMAT = 9 7060 Astc = 9, 7061 // DNG_SK_ENCODED_FORMAT = 10 7062 Dng = 10, 7063 // HEIF_SK_ENCODED_FORMAT = 11 7064 Heif = 11, 7065 } 7066 7067 7068 alias sk_encodedorigin_t = SKEncodedOrigin; 7069 7070 enum SKEncodedOrigin { 7071 // TOP_LEFT_SK_ENCODED_ORIGIN = 1 7072 TopLeft = 1, 7073 // TOP_RIGHT_SK_ENCODED_ORIGIN = 2 7074 TopRight = 2, 7075 // BOTTOM_RIGHT_SK_ENCODED_ORIGIN = 3 7076 BottomRight = 3, 7077 // BOTTOM_LEFT_SK_ENCODED_ORIGIN = 4 7078 BottomLeft = 4, 7079 // LEFT_TOP_SK_ENCODED_ORIGIN = 5 7080 LeftTop = 5, 7081 // RIGHT_TOP_SK_ENCODED_ORIGIN = 6 7082 RightTop = 6, 7083 // RIGHT_BOTTOM_SK_ENCODED_ORIGIN = 7 7084 RightBottom = 7, 7085 // LEFT_BOTTOM_SK_ENCODED_ORIGIN = 8 7086 LeftBottom = 8, 7087 // DEFAULT_SK_ENCODED_ORIGIN = TOP_LEFT_SK_ENCODED_ORIGIN 7088 Default = 1, 7089 } 7090 7091 7092 alias sk_filter_quality_t = SKFilterQuality; 7093 7094 enum SKFilterQuality { 7095 // NONE_SK_FILTER_QUALITY = 0 7096 None = 0, 7097 // LOW_SK_FILTER_QUALITY = 1 7098 Low = 1, 7099 // MEDIUM_SK_FILTER_QUALITY = 2 7100 Medium = 2, 7101 // HIGH_SK_FILTER_QUALITY = 3 7102 High = 3, 7103 } 7104 7105 7106 alias sk_font_edging_t = SKFontEdging; 7107 7108 enum SKFontEdging { 7109 // ALIAS_SK_FONT_EDGING = 0 7110 Alias = 0, 7111 // ANTIALIAS_SK_FONT_EDGING = 1 7112 Antialias = 1, 7113 // SUBPIXEL_ANTIALIAS_SK_FONT_EDGING = 2 7114 SubpixelAntialias = 2, 7115 } 7116 7117 7118 alias sk_font_hinting_t = SKFontHinting; 7119 7120 enum SKFontHinting { 7121 // NONE_SK_FONT_HINTING = 0 7122 None = 0, 7123 // SLIGHT_SK_FONT_HINTING = 1 7124 Slight = 1, 7125 // NORMAL_SK_FONT_HINTING = 2 7126 Normal = 2, 7127 // FULL_SK_FONT_HINTING = 3 7128 Full = 3, 7129 } 7130 7131 7132 alias sk_font_style_slant_t = SKFontStyleSlant; 7133 7134 enum SKFontStyleSlant { 7135 // UPRIGHT_SK_FONT_STYLE_SLANT = 0 7136 Upright = 0, 7137 // ITALIC_SK_FONT_STYLE_SLANT = 1 7138 Italic = 1, 7139 // OBLIQUE_SK_FONT_STYLE_SLANT = 2 7140 Oblique = 2, 7141 } 7142 7143 7144 alias sk_highcontrastconfig_invertstyle_t = SKHighContrastConfigInvertStyle; 7145 7146 enum SKHighContrastConfigInvertStyle { 7147 // NO_INVERT_SK_HIGH_CONTRAST_CONFIG_INVERT_STYLE = 0 7148 NoInvert = 0, 7149 // INVERT_BRIGHTNESS_SK_HIGH_CONTRAST_CONFIG_INVERT_STYLE = 1 7150 InvertBrightness = 1, 7151 // INVERT_LIGHTNESS_SK_HIGH_CONTRAST_CONFIG_INVERT_STYLE = 2 7152 InvertLightness = 2, 7153 } 7154 7155 7156 alias sk_image_caching_hint_t = SKImageCachingHint; 7157 7158 enum SKImageCachingHint { 7159 // ALLOW_SK_IMAGE_CACHING_HINT = 0 7160 Allow = 0, 7161 // DISALLOW_SK_IMAGE_CACHING_HINT = 1 7162 Disallow = 1, 7163 } 7164 7165 7166 alias sk_jpegencoder_alphaoption_t = SKJpegEncoderAlphaOption; 7167 7168 enum SKJpegEncoderAlphaOption { 7169 // IGNORE_SK_JPEGENCODER_ALPHA_OPTION = 0 7170 Ignore = 0, 7171 // BLEND_ON_BLACK_SK_JPEGENCODER_ALPHA_OPTION = 1 7172 BlendOnBlack = 1, 7173 } 7174 7175 7176 alias sk_jpegencoder_downsample_t = SKJpegEncoderDownsample; 7177 7178 enum SKJpegEncoderDownsample { 7179 // DOWNSAMPLE_420_SK_JPEGENCODER_DOWNSAMPLE = 0 7180 Downsample420 = 0, 7181 // DOWNSAMPLE_422_SK_JPEGENCODER_DOWNSAMPLE = 1 7182 Downsample422 = 1, 7183 // DOWNSAMPLE_444_SK_JPEGENCODER_DOWNSAMPLE = 2 7184 Downsample444 = 2, 7185 } 7186 7187 7188 alias sk_lattice_recttype_t = SKLatticeRectType; 7189 7190 7191 alias sk_mask_format_t = SKMaskFormat; 7192 7193 enum SKMaskFormat { 7194 // BW_SK_MASK_FORMAT = 0 7195 BW = 0, 7196 // A8_SK_MASK_FORMAT = 1 7197 A8 = 1, 7198 // THREE_D_SK_MASK_FORMAT = 2 7199 ThreeD = 2, 7200 // ARGB32_SK_MASK_FORMAT = 3 7201 Argb32 = 3, 7202 // LCD16_SK_MASK_FORMAT = 4 7203 Lcd16 = 4, 7204 // SDF_SK_MASK_FORMAT = 5 7205 Sdf = 5, 7206 } 7207 7208 7209 alias sk_matrix44_type_mask_t = SKMatrix44TypeMask; 7210 7211 enum SKMatrix44TypeMask { 7212 // IDENTITY_SK_MATRIX44_TYPE_MASK = 0 7213 Identity = 0, 7214 // TRANSLATE_SK_MATRIX44_TYPE_MASK = 0x01 7215 Translate = 1, 7216 // SCALE_SK_MATRIX44_TYPE_MASK = 0x02 7217 Scale = 2, 7218 // AFFINE_SK_MATRIX44_TYPE_MASK = 0x04 7219 Affine = 4, 7220 // PERSPECTIVE_SK_MATRIX44_TYPE_MASK = 0x08 7221 Perspective = 8, 7222 } 7223 7224 7225 alias sk_paint_style_t = SKPaintStyle; 7226 7227 enum SKPaintStyle { 7228 // FILL_SK_PAINT_STYLE = 0 7229 Fill = 0, 7230 // STROKE_SK_PAINT_STYLE = 1 7231 Stroke = 1, 7232 // STROKE_AND_FILL_SK_PAINT_STYLE = 2 7233 StrokeAndFill = 2, 7234 } 7235 7236 7237 alias sk_path_add_mode_t = SKPathAddMode; 7238 7239 enum SKPathAddMode { 7240 // APPEND_SK_PATH_ADD_MODE = 0 7241 Append = 0, 7242 // EXTEND_SK_PATH_ADD_MODE = 1 7243 Extend = 1, 7244 } 7245 7246 7247 alias sk_path_arc_size_t = SKPathArcSize; 7248 7249 enum SKPathArcSize { 7250 // SMALL_SK_PATH_ARC_SIZE = 0 7251 Small = 0, 7252 // LARGE_SK_PATH_ARC_SIZE = 1 7253 Large = 1, 7254 } 7255 7256 7257 alias sk_path_convexity_t = SKPathConvexity; 7258 7259 enum SKPathConvexity { 7260 // UNKNOWN_SK_PATH_CONVEXITY = 0 7261 Unknown = 0, 7262 // CONVEX_SK_PATH_CONVEXITY = 1 7263 Convex = 1, 7264 // CONCAVE_SK_PATH_CONVEXITY = 2 7265 Concave = 2, 7266 } 7267 7268 7269 alias sk_path_direction_t = SKPathDirection; 7270 7271 enum SKPathDirection { 7272 // CW_SK_PATH_DIRECTION = 0 7273 Clockwise = 0, 7274 // CCW_SK_PATH_DIRECTION = 1 7275 CounterClockwise = 1, 7276 } 7277 7278 7279 alias sk_path_effect_1d_style_t = SKPath1DPathEffectStyle; 7280 7281 7282 alias sk_path_effect_trim_mode_t = SKTrimPathEffectMode; 7283 7284 7285 alias sk_path_filltype_t = SKPathFillType; 7286 7287 enum SKPathFillType { 7288 // WINDING_SK_PATH_FILLTYPE = 0 7289 Winding = 0, 7290 // EVENODD_SK_PATH_FILLTYPE = 1 7291 EvenOdd = 1, 7292 // INVERSE_WINDING_SK_PATH_FILLTYPE = 2 7293 InverseWinding = 2, 7294 // INVERSE_EVENODD_SK_PATH_FILLTYPE = 3 7295 InverseEvenOdd = 3, 7296 } 7297 7298 7299 alias sk_path_segment_mask_t = SKPathSegmentMask; 7300 7301 enum SKPathSegmentMask { 7302 // LINE_SK_PATH_SEGMENT_MASK = 1 << 0 7303 Line = 1, 7304 // QUAD_SK_PATH_SEGMENT_MASK = 1 << 1 7305 Quad = 2, 7306 // CONIC_SK_PATH_SEGMENT_MASK = 1 << 2 7307 Conic = 4, 7308 // CUBIC_SK_PATH_SEGMENT_MASK = 1 << 3 7309 Cubic = 8, 7310 } 7311 7312 7313 alias sk_path_verb_t = SKPathVerb; 7314 7315 enum SKPathVerb { 7316 // MOVE_SK_PATH_VERB = 0 7317 Move = 0, 7318 // LINE_SK_PATH_VERB = 1 7319 Line = 1, 7320 // QUAD_SK_PATH_VERB = 2 7321 Quad = 2, 7322 // CONIC_SK_PATH_VERB = 3 7323 Conic = 3, 7324 // CUBIC_SK_PATH_VERB = 4 7325 Cubic = 4, 7326 // CLOSE_SK_PATH_VERB = 5 7327 Close = 5, 7328 // DONE_SK_PATH_VERB = 6 7329 Done = 6, 7330 } 7331 7332 7333 alias sk_pathmeasure_matrixflags_t = SKPathMeasureMatrixFlags; 7334 7335 enum SKPathMeasureMatrixFlags { 7336 // GET_POSITION_SK_PATHMEASURE_MATRIXFLAGS = 0x01 7337 GetPosition = 1, 7338 // GET_TANGENT_SK_PATHMEASURE_MATRIXFLAGS = 0x02 7339 GetTangent = 2, 7340 // GET_POS_AND_TAN_SK_PATHMEASURE_MATRIXFLAGS = GET_POSITION_SK_PATHMEASURE_MATRIXFLAGS | GET_TANGENT_SK_PATHMEASURE_MATRIXFLAGS 7341 GetPositionAndTangent = 3, 7342 } 7343 7344 7345 alias sk_pathop_t = SKPathOp; 7346 7347 enum SKPathOp { 7348 // DIFFERENCE_SK_PATHOP = 0 7349 Difference = 0, 7350 // INTERSECT_SK_PATHOP = 1 7351 Intersect = 1, 7352 // UNION_SK_PATHOP = 2 7353 Union = 2, 7354 // XOR_SK_PATHOP = 3 7355 Xor = 3, 7356 // REVERSE_DIFFERENCE_SK_PATHOP = 4 7357 ReverseDifference = 4, 7358 } 7359 7360 7361 alias sk_pixelgeometry_t = SKPixelGeometry; 7362 7363 7364 alias sk_pngencoder_filterflags_t = SKPngEncoderFilterFlags; 7365 7366 enum SKPngEncoderFilterFlags { 7367 // ZERO_SK_PNGENCODER_FILTER_FLAGS = 0x00 7368 NoFilters = 0, 7369 // NONE_SK_PNGENCODER_FILTER_FLAGS = 0x08 7370 None = 8, 7371 // SUB_SK_PNGENCODER_FILTER_FLAGS = 0x10 7372 Sub = 16, 7373 // UP_SK_PNGENCODER_FILTER_FLAGS = 0x20 7374 Up = 32, 7375 // AVG_SK_PNGENCODER_FILTER_FLAGS = 0x40 7376 Avg = 64, 7377 // PAETH_SK_PNGENCODER_FILTER_FLAGS = 0x80 7378 Paeth = 128, 7379 // ALL_SK_PNGENCODER_FILTER_FLAGS = NONE_SK_PNGENCODER_FILTER_FLAGS | SUB_SK_PNGENCODER_FILTER_FLAGS | UP_SK_PNGENCODER_FILTER_FLAGS | AVG_SK_PNGENCODER_FILTER_FLAGS | PAETH_SK_PNGENCODER_FILTER_FLAGS 7380 AllFilters = 248, 7381 } 7382 7383 7384 alias sk_point_mode_t = SKPointMode; 7385 7386 enum SKPointMode { 7387 // POINTS_SK_POINT_MODE = 0 7388 Points = 0, 7389 // LINES_SK_POINT_MODE = 1 7390 Lines = 1, 7391 // POLYGON_SK_POINT_MODE = 2 7392 Polygon = 2, 7393 } 7394 7395 7396 alias sk_region_op_t = SKRegionOperation; 7397 7398 enum SKRegionOperation { 7399 // DIFFERENCE_SK_REGION_OP = 0 7400 Difference = 0, 7401 // INTERSECT_SK_REGION_OP = 1 7402 Intersect = 1, 7403 // UNION_SK_REGION_OP = 2 7404 Union = 2, 7405 // XOR_SK_REGION_OP = 3 7406 XOR = 3, 7407 // REVERSE_DIFFERENCE_SK_REGION_OP = 4 7408 ReverseDifference = 4, 7409 // REPLACE_SK_REGION_OP = 5 7410 Replace = 5, 7411 } 7412 7413 7414 alias sk_rrect_corner_t = SKRoundRectCorner; 7415 7416 enum SKRoundRectCorner { 7417 // UPPER_LEFT_SK_RRECT_CORNER = 0 7418 UpperLeft = 0, 7419 // UPPER_RIGHT_SK_RRECT_CORNER = 1 7420 UpperRight = 1, 7421 // LOWER_RIGHT_SK_RRECT_CORNER = 2 7422 LowerRight = 2, 7423 // LOWER_LEFT_SK_RRECT_CORNER = 3 7424 LowerLeft = 3, 7425 } 7426 7427 7428 alias sk_rrect_type_t = SKRoundRectType; 7429 7430 enum SKRoundRectType { 7431 // EMPTY_SK_RRECT_TYPE = 0 7432 Empty = 0, 7433 // RECT_SK_RRECT_TYPE = 1 7434 Rect = 1, 7435 // OVAL_SK_RRECT_TYPE = 2 7436 Oval = 2, 7437 // SIMPLE_SK_RRECT_TYPE = 3 7438 Simple = 3, 7439 // NINE_PATCH_SK_RRECT_TYPE = 4 7440 NinePatch = 4, 7441 // COMPLEX_SK_RRECT_TYPE = 5 7442 Complex = 5, 7443 } 7444 7445 7446 alias sk_shader_tilemode_t = SKShaderTileMode; 7447 7448 enum SKShaderTileMode { 7449 // CLAMP_SK_SHADER_TILEMODE = 0 7450 Clamp = 0, 7451 // REPEAT_SK_SHADER_TILEMODE = 1 7452 Repeat = 1, 7453 // MIRROR_SK_SHADER_TILEMODE = 2 7454 Mirror = 2, 7455 // DECAL_SK_SHADER_TILEMODE = 3 7456 Decal = 3, 7457 } 7458 7459 7460 alias sk_stroke_cap_t = SKStrokeCap; 7461 7462 enum SKStrokeCap { 7463 // BUTT_SK_STROKE_CAP = 0 7464 Butt = 0, 7465 // ROUND_SK_STROKE_CAP = 1 7466 Round = 1, 7467 // SQUARE_SK_STROKE_CAP = 2 7468 Square = 2, 7469 } 7470 7471 7472 alias sk_stroke_join_t = SKStrokeJoin; 7473 7474 enum SKStrokeJoin { 7475 // MITER_SK_STROKE_JOIN = 0 7476 Miter = 0, 7477 // ROUND_SK_STROKE_JOIN = 1 7478 Round = 1, 7479 // BEVEL_SK_STROKE_JOIN = 2 7480 Bevel = 2, 7481 } 7482 7483 7484 alias sk_surfaceprops_flags_t = SKSurfacePropsFlags; 7485 7486 7487 alias sk_text_align_t = SKTextAlign; 7488 7489 enum SKTextAlign { 7490 // LEFT_SK_TEXT_ALIGN = 0 7491 Left = 0, 7492 // CENTER_SK_TEXT_ALIGN = 1 7493 Center = 1, 7494 // RIGHT_SK_TEXT_ALIGN = 2 7495 Right = 2, 7496 } 7497 7498 7499 alias sk_text_encoding_t = SKTextEncoding; 7500 7501 7502 7503 alias sk_vertices_vertex_mode_t = SKVertexMode; 7504 7505 enum SKVertexMode { 7506 // TRIANGLES_SK_VERTICES_VERTEX_MODE = 0 7507 Triangles = 0, 7508 // TRIANGLE_STRIP_SK_VERTICES_VERTEX_MODE = 1 7509 TriangleStrip = 1, 7510 // TRIANGLE_FAN_SK_VERTICES_VERTEX_MODE = 2 7511 TriangleFan = 2, 7512 } 7513 7514 7515 alias sk_webpencoder_compression_t = SKWebpEncoderCompression; 7516 7517 enum SKWebpEncoderCompression { 7518 // LOSSY_SK_WEBPENCODER_COMPTRESSION = 0 7519 Lossy = 0, 7520 // LOSSLESS_SK_WEBPENCODER_COMPTRESSION = 1 7521 Lossless = 1, 7522 } 7523 7524 // #endregion 7525 7526 7527 7528 // #region Structs 7529 7530 7531 alias gr_gl_framebufferinfo_t = GRGlFramebufferInfo; 7532 7533 alias gr_gl_textureinfo_t = GRGlTextureInfo; 7534 7535 alias gr_vk_alloc_t = GRVkAlloc; 7536 7537 struct GRVkAlloc { 7538 // uint64_t fMemory 7539 private ulong fMemory; 7540 ulong Memory() { 7541 return fMemory; 7542 } 7543 7544 void Memory(ulong value) { 7545 fMemory = value; 7546 } 7547 7548 // uint64_t fOffset 7549 private ulong fOffset; 7550 ulong Offset() { 7551 return fOffset; 7552 } 7553 7554 void Offset(ulong value) { 7555 fOffset = value; 7556 } 7557 7558 // uint64_t fSize 7559 private ulong fSize; 7560 ulong Size() { 7561 return fSize; 7562 } 7563 7564 void Size(ulong value) { 7565 fSize = value; 7566 } 7567 7568 // uint32_t fFlags 7569 private uint fFlags; 7570 uint Flags() { 7571 return fFlags; 7572 } 7573 7574 void Flags(uint value) { 7575 fFlags = value; 7576 } 7577 7578 // gr_vk_backendmemory_t fBackendMemory 7579 private void* fBackendMemory; 7580 void* BackendMemory() { 7581 return fBackendMemory; 7582 } 7583 7584 void BackendMemory(void* value) { 7585 fBackendMemory = value; 7586 } 7587 7588 // bool private_fUsesSystemHeap 7589 private ubyte fUsesSystemHeap; 7590 7591 // override bool opEquals(Object obj) { 7592 // GRVkAlloc pp = cast(GRVkAlloc) obj; 7593 // if (pp is null) 7594 // return false; 7595 // return fMemory == obj.fMemory && fOffset == obj.fOffset && 7596 // fSize == obj.fSize && fFlags == obj.fFlags && 7597 // fBackendMemory == obj.fBackendMemory && fUsesSystemHeap == obj.fUsesSystemHeap; 7598 // } 7599 7600 // override size_t toHash() @trusted nothrow { 7601 // return hashOf(fMemory) + hashOf(fOffset) + hashOf(fSize) + hashOf(fFlags) + 7602 // hashOf(fBackendMemory) + hashOf(fUsesSystemHeap); 7603 // } 7604 7605 } 7606 7607 7608 alias gr_vk_backendcontext_t = GRVkBackendContextNative; 7609 7610 struct GRVkBackendContextNative { 7611 // vk_instance_t* fInstance 7612 vk_instance_t* fInstance; 7613 7614 // vk_physical_device_t* fPhysicalDevice 7615 vk_physical_device_t* fPhysicalDevice; 7616 7617 // vk_device_t* fDevice 7618 vk_device_t* fDevice; 7619 7620 // vk_queue_t* fQueue 7621 vk_queue_t* fQueue; 7622 7623 // uint32_t fGraphicsQueueIndex 7624 uint fGraphicsQueueIndex; 7625 7626 // uint32_t fMinAPIVersion 7627 uint fMinAPIVersion; 7628 7629 // uint32_t fInstanceVersion 7630 uint fInstanceVersion; 7631 7632 // uint32_t fMaxAPIVersion 7633 uint fMaxAPIVersion; 7634 7635 // uint32_t fExtensions 7636 uint fExtensions; 7637 7638 // const gr_vk_extensions_t* fVkExtensions 7639 gr_vk_extensions_t* fVkExtensions; 7640 7641 // uint32_t fFeatures 7642 uint fFeatures; 7643 7644 // const vk_physical_device_features_t* fDeviceFeatures 7645 vk_physical_device_features_t* fDeviceFeatures; 7646 7647 // const vk_physical_device_features_2_t* fDeviceFeatures2 7648 vk_physical_device_features_2_t* fDeviceFeatures2; 7649 7650 // gr_vk_memory_allocator_t* fMemoryAllocator 7651 gr_vk_memory_allocator_t* fMemoryAllocator; 7652 7653 // gr_vk_get_proc fGetProc 7654 GRVkGetProcProxyDelegate fGetProc; 7655 7656 // void* fGetProcUserData 7657 void* fGetProcUserData; 7658 7659 // bool fOwnsInstanceAndDevice 7660 ubyte fOwnsInstanceAndDevice; 7661 7662 // bool fProtectedContext 7663 ubyte fProtectedContext; 7664 7665 // const bool Equals (GRVkBackendContextNative obj) { 7666 // return fInstance == obj.fInstance && fPhysicalDevice == obj.fPhysicalDevice && fDevice == obj.fDevice && fQueue == obj.fQueue && fGraphicsQueueIndex == obj.fGraphicsQueueIndex && fMinAPIVersion == obj.fMinAPIVersion && fInstanceVersion == obj.fInstanceVersion && fMaxAPIVersion == obj.fMaxAPIVersion && fExtensions == obj.fExtensions && fVkExtensions == obj.fVkExtensions && fFeatures == obj.fFeatures && fDeviceFeatures == obj.fDeviceFeatures && fDeviceFeatures2 == obj.fDeviceFeatures2 && fMemoryAllocator == obj.fMemoryAllocator && fGetProc == obj.fGetProc && fGetProcUserData == obj.fGetProcUserData && fOwnsInstanceAndDevice == obj.fOwnsInstanceAndDevice && fProtectedContext == obj.fProtectedContext 7667 // } 7668 7669 // const override bool Equals (object obj) { 7670 // return obj is GRVkBackendContextNative f && Equals (f) 7671 // } 7672 7673 // static bool operator == (GRVkBackendContextNative left, GRVkBackendContextNative right) { 7674 // return left.Equals (right) 7675 // } 7676 7677 // static bool operator != (GRVkBackendContextNative left, GRVkBackendContextNative right) { 7678 // return !left.Equals (right) 7679 // } 7680 7681 // const override int GetHashCode () 7682 // { 7683 // var hash = new HashCode (); 7684 // hash.Add (fInstance); 7685 // hash.Add (fPhysicalDevice); 7686 // hash.Add (fDevice); 7687 // hash.Add (fQueue); 7688 // hash.Add (fGraphicsQueueIndex); 7689 // hash.Add (fMinAPIVersion); 7690 // hash.Add (fInstanceVersion); 7691 // hash.Add (fMaxAPIVersion); 7692 // hash.Add (fExtensions); 7693 // hash.Add (fVkExtensions); 7694 // hash.Add (fFeatures); 7695 // hash.Add (fDeviceFeatures); 7696 // hash.Add (fDeviceFeatures2); 7697 // hash.Add (fMemoryAllocator); 7698 // hash.Add (fGetProc); 7699 // hash.Add (fGetProcUserData); 7700 // hash.Add (fOwnsInstanceAndDevice); 7701 // hash.Add (fProtectedContext); 7702 // return hash.ToHashCode (); 7703 // } 7704 7705 } 7706 7707 7708 alias gr_vk_imageinfo_t = GRVkImageInfo; 7709 7710 struct GRVkImageInfo { 7711 // uint64_t fImage 7712 private ulong fImage; 7713 ulong Image() { 7714 return fImage; 7715 } 7716 7717 void Image(ulong value) { 7718 fImage = value; 7719 } 7720 7721 // gr_vk_alloc_t fAlloc 7722 private GRVkAlloc fAlloc; 7723 GRVkAlloc Alloc() { 7724 return fAlloc; 7725 } 7726 7727 void Alloc(GRVkAlloc value) { 7728 fAlloc = value; 7729 } 7730 7731 // uint32_t fImageTiling 7732 private uint fImageTiling; 7733 uint ImageTiling() { 7734 return fImageTiling; 7735 } 7736 7737 void ImageTiling(uint value) { 7738 fImageTiling = value; 7739 } 7740 7741 // uint32_t fImageLayout 7742 private uint fImageLayout; 7743 uint ImageLayout() { 7744 return fImageLayout; 7745 } 7746 7747 void ImageLayout(uint value) { 7748 fImageLayout = value; 7749 } 7750 7751 // uint32_t fFormat 7752 private uint fFormat; 7753 uint Format() { 7754 return fFormat; 7755 } 7756 7757 void Format(uint value) { 7758 fFormat = value; 7759 } 7760 7761 // uint32_t fLevelCount 7762 private uint fLevelCount; 7763 uint LevelCount() { 7764 return fLevelCount; 7765 } 7766 7767 void LevelCount(uint value) { 7768 fLevelCount = value; 7769 } 7770 7771 // uint32_t fCurrentQueueFamily 7772 private uint fCurrentQueueFamily; 7773 uint CurrentQueueFamily() { 7774 return fCurrentQueueFamily; 7775 } 7776 7777 void CurrentQueueFamily(uint value) { 7778 fCurrentQueueFamily = value; 7779 } 7780 7781 // bool fProtected 7782 private ubyte fProtected; 7783 bool Protected() { 7784 return fProtected > 0; 7785 } 7786 void Protected(bool value) { 7787 fProtected = value ? cast(byte)1 : cast(byte)0; 7788 } 7789 7790 // gr_vk_ycbcrconversioninfo_t fYcbcrConversionInfo 7791 private GrVkYcbcrConversionInfo fYcbcrConversionInfo; 7792 GrVkYcbcrConversionInfo YcbcrConversionInfo() { 7793 return fYcbcrConversionInfo; 7794 } 7795 7796 void YcbcrConversionInfo(GrVkYcbcrConversionInfo value) { 7797 fYcbcrConversionInfo = value; 7798 } 7799 7800 // const bool Equals (GRVkImageInfo obj) { 7801 // return fImage == obj.fImage && fAlloc == obj.fAlloc && fImageTiling == obj.fImageTiling && fImageLayout == obj.fImageLayout && fFormat == obj.fFormat && fLevelCount == obj.fLevelCount && fCurrentQueueFamily == obj.fCurrentQueueFamily && fProtected == obj.fProtected && fYcbcrConversionInfo == obj.fYcbcrConversionInfo 7802 // } 7803 7804 // const override bool Equals (object obj) { 7805 // return obj is GRVkImageInfo f && Equals (f) 7806 // } 7807 7808 // static bool operator == (GRVkImageInfo left, GRVkImageInfo right) { 7809 // return left.Equals (right) 7810 // } 7811 7812 // static bool operator != (GRVkImageInfo left, GRVkImageInfo right) { 7813 // return !left.Equals (right) 7814 // } 7815 7816 // const override int GetHashCode () 7817 // { 7818 // var hash = new HashCode (); 7819 // hash.Add (fImage); 7820 // hash.Add (fAlloc); 7821 // hash.Add (fImageTiling); 7822 // hash.Add (fImageLayout); 7823 // hash.Add (fFormat); 7824 // hash.Add (fLevelCount); 7825 // hash.Add (fCurrentQueueFamily); 7826 // hash.Add (fProtected); 7827 // hash.Add (fYcbcrConversionInfo); 7828 // return hash.ToHashCode (); 7829 // } 7830 7831 } 7832 7833 7834 alias gr_vk_ycbcrconversioninfo_t = GrVkYcbcrConversionInfo; 7835 7836 struct GrVkYcbcrConversionInfo { 7837 // uint32_t fFormat 7838 private uint fFormat; 7839 uint Format() { 7840 return fFormat; 7841 } 7842 7843 void Format(uint value) { 7844 fFormat = value; 7845 } 7846 7847 // uint64_t fExternalFormat 7848 private ulong fExternalFormat; 7849 ulong ExternalFormat() { 7850 return fExternalFormat; 7851 } 7852 7853 void ExternalFormat(ulong value) { 7854 fExternalFormat = value; 7855 } 7856 7857 // uint32_t fYcbcrModel 7858 private uint fYcbcrModel; 7859 uint YcbcrModel() { 7860 return fYcbcrModel; 7861 } 7862 7863 void YcbcrModel(uint value) { 7864 fYcbcrModel = value; 7865 } 7866 7867 // uint32_t fYcbcrRange 7868 private uint fYcbcrRange; 7869 uint YcbcrRange() { 7870 return fYcbcrRange; 7871 } 7872 7873 void YcbcrRange(uint value) { 7874 fYcbcrRange = value; 7875 } 7876 7877 // uint32_t fXChromaOffset 7878 private uint fXChromaOffset; 7879 uint XChromaOffset() { 7880 return fXChromaOffset; 7881 } 7882 7883 void XChromaOffset(uint value) { 7884 fXChromaOffset = value; 7885 } 7886 7887 // uint32_t fYChromaOffset 7888 private uint fYChromaOffset; 7889 uint YChromaOffset() { 7890 return fYChromaOffset; 7891 } 7892 7893 void YChromaOffset(uint value) { 7894 fYChromaOffset = value; 7895 } 7896 7897 // uint32_t fChromaFilter 7898 private uint fChromaFilter; 7899 uint ChromaFilter() { 7900 return fChromaFilter; 7901 } 7902 7903 void ChromaFilter(uint value) { 7904 fChromaFilter = value; 7905 } 7906 7907 // uint32_t fForceExplicitReconstruction 7908 private uint fForceExplicitReconstruction; 7909 uint ForceExplicitReconstruction() { 7910 return fForceExplicitReconstruction; 7911 } 7912 7913 void ForceExplicitReconstruction(uint value) { 7914 fForceExplicitReconstruction = value; 7915 } 7916 7917 // uint32_t fFormatFeatures 7918 private uint fFormatFeatures; 7919 uint FormatFeatures() { 7920 return fFormatFeatures; 7921 } 7922 7923 void FormatFeatures(uint value) { 7924 fFormatFeatures = value; 7925 } 7926 7927 // const bool Equals (GrVkYcbcrConversionInfo obj) { 7928 // return fFormat == obj.fFormat && fExternalFormat == obj.fExternalFormat && fYcbcrModel == obj.fYcbcrModel && fYcbcrRange == obj.fYcbcrRange && fXChromaOffset == obj.fXChromaOffset && fYChromaOffset == obj.fYChromaOffset && fChromaFilter == obj.fChromaFilter && fForceExplicitReconstruction == obj.fForceExplicitReconstruction && fFormatFeatures == obj.fFormatFeatures 7929 // } 7930 7931 // const override bool Equals (object obj) { 7932 // return obj is GrVkYcbcrConversionInfo f && Equals (f) 7933 // } 7934 7935 // static bool operator == (GrVkYcbcrConversionInfo left, GrVkYcbcrConversionInfo right) { 7936 // return left.Equals (right) 7937 // } 7938 7939 // static bool operator != (GrVkYcbcrConversionInfo left, GrVkYcbcrConversionInfo right) { 7940 // return !left.Equals (right) 7941 // } 7942 7943 // const override int GetHashCode () 7944 // { 7945 // var hash = new HashCode (); 7946 // hash.Add (fFormat); 7947 // hash.Add (fExternalFormat); 7948 // hash.Add (fYcbcrModel); 7949 // hash.Add (fYcbcrRange); 7950 // hash.Add (fXChromaOffset); 7951 // hash.Add (fYChromaOffset); 7952 // hash.Add (fChromaFilter); 7953 // hash.Add (fForceExplicitReconstruction); 7954 // hash.Add (fFormatFeatures); 7955 // return hash.ToHashCode (); 7956 // } 7957 7958 } 7959 7960 7961 alias sk_codec_frameinfo_t = SKCodecFrameInfo; 7962 7963 struct SKCodecFrameInfo { 7964 // int fRequiredFrame 7965 private int fRequiredFrame; 7966 int RequiredFrame() { 7967 return fRequiredFrame; 7968 } 7969 7970 void RequiredFrame(int value) { 7971 fRequiredFrame = value; 7972 } 7973 7974 // int fDuration 7975 private int fDuration; 7976 int Duration() { 7977 return fDuration; 7978 } 7979 7980 void Duration(int value) { 7981 fDuration = value; 7982 } 7983 7984 // bool fFullyReceived 7985 private ubyte fFullyReceived; 7986 bool FullyRecieved() { 7987 return fFullyReceived > 0; 7988 } 7989 7990 void FullyRecieved(bool value) { 7991 fFullyReceived = value ? cast(byte)1 : cast(byte)0; 7992 } 7993 7994 // sk_alphatype_t fAlphaType 7995 private SKAlphaType fAlphaType; 7996 SKAlphaType AlphaType() { 7997 return fAlphaType; 7998 } 7999 8000 void AlphaType(SKAlphaType value) { 8001 fAlphaType = value; 8002 } 8003 8004 // sk_codecanimation_disposalmethod_t fDisposalMethod 8005 private SKCodecAnimationDisposalMethod fDisposalMethod; 8006 SKCodecAnimationDisposalMethod DisposalMethod() { 8007 return fDisposalMethod; 8008 } 8009 8010 void DisposalMethod(SKCodecAnimationDisposalMethod value) { 8011 fDisposalMethod = value; 8012 } 8013 8014 // const bool Equals (SKCodecFrameInfo obj) { 8015 // return fRequiredFrame == obj.fRequiredFrame && fDuration == obj.fDuration && fFullyReceived == obj.fFullyReceived && fAlphaType == obj.fAlphaType && fDisposalMethod == obj.fDisposalMethod 8016 // } 8017 8018 // const override bool Equals (object obj) { 8019 // return obj is SKCodecFrameInfo f && Equals (f) 8020 // } 8021 8022 // static bool operator == (SKCodecFrameInfo left, SKCodecFrameInfo right) { 8023 // return left.Equals (right) 8024 // } 8025 8026 // static bool operator != (SKCodecFrameInfo left, SKCodecFrameInfo right) { 8027 // return !left.Equals (right) 8028 // } 8029 8030 // const override int GetHashCode () 8031 // { 8032 // var hash = new HashCode (); 8033 // hash.Add (fRequiredFrame); 8034 // hash.Add (fDuration); 8035 // hash.Add (fFullyReceived); 8036 // hash.Add (fAlphaType); 8037 // hash.Add (fDisposalMethod); 8038 // return hash.ToHashCode (); 8039 // } 8040 8041 } 8042 8043 8044 alias sk_codec_options_t = SKCodecOptionsInternal; 8045 8046 struct SKCodecOptionsInternal { 8047 // sk_codec_zero_initialized_t fZeroInitialized 8048 SKZeroInitialized fZeroInitialized; 8049 8050 // sk_irect_t* fSubset 8051 SKRectI* fSubset; 8052 8053 // int fFrameIndex 8054 int fFrameIndex; 8055 8056 // int fPriorFrame 8057 int fPriorFrame; 8058 8059 // const bool Equals (SKCodecOptionsInternal obj) { 8060 // return fZeroInitialized == obj.fZeroInitialized && fSubset == obj.fSubset && fFrameIndex == obj.fFrameIndex && fPriorFrame == obj.fPriorFrame 8061 // } 8062 8063 // const override bool Equals (object obj) { 8064 // return obj is SKCodecOptionsInternal f && Equals (f) 8065 // } 8066 8067 // static bool operator == (SKCodecOptionsInternal left, SKCodecOptionsInternal right) { 8068 // return left.Equals (right) 8069 // } 8070 8071 // static bool operator != (SKCodecOptionsInternal left, SKCodecOptionsInternal right) { 8072 // return !left.Equals (right) 8073 // } 8074 8075 // const override int GetHashCode () 8076 // { 8077 // var hash = new HashCode (); 8078 // hash.Add (fZeroInitialized); 8079 // hash.Add (fSubset); 8080 // hash.Add (fFrameIndex); 8081 // hash.Add (fPriorFrame); 8082 // return hash.ToHashCode (); 8083 // } 8084 8085 } 8086 8087 8088 alias sk_color4f_t = SKColorF; 8089 8090 // struct SKColorF { 8091 // // float fR 8092 // private const float fR; 8093 // const float Red() { 8094 // return fR; 8095 // } 8096 8097 // // float fG 8098 // private const float fG; 8099 // const float Green() { 8100 // return fG; 8101 // } 8102 8103 // // float fB 8104 // private const float fB; 8105 // const float Blue() { 8106 // return fB; 8107 // } 8108 8109 // // float fA 8110 // private const float fA; 8111 // const float Alpha() { 8112 // return fA; 8113 // } 8114 8115 // // const bool Equals (SKColorF obj) { 8116 // // return fR == obj.fR && fG == obj.fG && fB == obj.fB && fA == obj.fA 8117 // // } 8118 8119 // // const override bool Equals (object obj) { 8120 // // return obj is SKColorF f && Equals (f) 8121 // // } 8122 8123 // // static bool operator == (SKColorF left, SKColorF right) { 8124 // // return left.Equals (right) 8125 // // } 8126 8127 // // static bool operator != (SKColorF left, SKColorF right) { 8128 // // return !left.Equals (right) 8129 // // } 8130 8131 // // const override int GetHashCode () 8132 // // { 8133 // // var hash = new HashCode (); 8134 // // hash.Add (fR); 8135 // // hash.Add (fG); 8136 // // hash.Add (fB); 8137 // // hash.Add (fA); 8138 // // return hash.ToHashCode (); 8139 // // } 8140 8141 // } 8142 8143 8144 alias sk_colorspace_primaries_t = SKColorSpacePrimaries; 8145 8146 struct SKColorSpacePrimaries { 8147 // float fRX 8148 private float fRX; 8149 float RX() { 8150 return fRX; 8151 } 8152 8153 void RX(float value) { 8154 fRX = value; 8155 } 8156 8157 // float fRY 8158 private float fRY; 8159 float RY() { 8160 return fRY; 8161 } 8162 8163 void RY(float value) { 8164 fRY = value; 8165 } 8166 8167 // float fGX 8168 private float fGX; 8169 float GX() { 8170 return fGX; 8171 } 8172 8173 void GX(float value) { 8174 fGX = value; 8175 } 8176 8177 // float fGY 8178 private float fGY; 8179 float GY() { 8180 return fGY; 8181 } 8182 8183 void GY(float value) { 8184 fGY = value; 8185 } 8186 8187 // float fBX 8188 private float fBX; 8189 float BX() { 8190 return fBX; 8191 } 8192 8193 void BX(float value) { 8194 fBX = value; 8195 } 8196 8197 // float fBY 8198 private float fBY; 8199 float BY() { 8200 return fBY; 8201 } 8202 8203 void BY(float value) { 8204 fBY = value; 8205 } 8206 8207 // float fWX 8208 private float fWX; 8209 float WX() { 8210 return fWX; 8211 } 8212 8213 void WX(float value) { 8214 fWX = value; 8215 } 8216 8217 // float fWY 8218 private float fWY; 8219 float WY() { 8220 return fWY; 8221 } 8222 8223 void WY(float value) { 8224 fWY = value; 8225 } 8226 8227 // const bool Equals (SKColorSpacePrimaries obj) { 8228 // return fRX == obj.fRX && fRY == obj.fRY && fGX == obj.fGX && fGY == obj.fGY && fBX == obj.fBX && fBY == obj.fBY && fWX == obj.fWX && fWY == obj.fWY 8229 // } 8230 8231 // const override bool Equals (object obj) { 8232 // return obj is SKColorSpacePrimaries f && Equals (f) 8233 // } 8234 8235 // static bool operator == (SKColorSpacePrimaries left, SKColorSpacePrimaries right) { 8236 // return left.Equals (right) 8237 // } 8238 8239 // static bool operator != (SKColorSpacePrimaries left, SKColorSpacePrimaries right) { 8240 // return !left.Equals (right) 8241 // } 8242 8243 // const override int GetHashCode () 8244 // { 8245 // var hash = new HashCode (); 8246 // hash.Add (fRX); 8247 // hash.Add (fRY); 8248 // hash.Add (fGX); 8249 // hash.Add (fGY); 8250 // hash.Add (fBX); 8251 // hash.Add (fBY); 8252 // hash.Add (fWX); 8253 // hash.Add (fWY); 8254 // return hash.ToHashCode (); 8255 // } 8256 8257 static SKColorSpacePrimaries Empty; 8258 8259 this (float[] values) 8260 { 8261 if (values is null) 8262 throw new ArgumentNullException (values.stringof); 8263 if (values.length != 8) 8264 throw new ArgumentException ("The values must have exactly 8 items, one for each of [RX, RY, GX, GY, BX, BY, WX, WY].", values.stringof); 8265 8266 fRX = values[0]; 8267 fRY = values[1]; 8268 fGX = values[2]; 8269 fGY = values[3]; 8270 fBX = values[4]; 8271 fBY = values[5]; 8272 fWX = values[6]; 8273 fWY = values[7]; 8274 } 8275 8276 this (float rx, float ry, float gx, float gy, float bx, float by, float wx, float wy) 8277 { 8278 fRX = rx; 8279 fRY = ry; 8280 fGX = gx; 8281 fGY = gy; 8282 fBX = bx; 8283 fBY = by; 8284 fWX = wx; 8285 fWY = wy; 8286 } 8287 8288 // const float[] Values() 8289 // { 8290 // return new[] { fRX, fRY, fGX, fGY, fBX, fBY, fWX, fWY }; 8291 // } 8292 8293 SKMatrix44 ToXyzD50 () 8294 { 8295 return ToMatrix44 (); 8296 } 8297 8298 bool ToXyzD50 (SKMatrix44 toXyzD50) 8299 { 8300 if (toXyzD50 is null) 8301 throw new ArgumentNullException (toXyzD50.stringof); 8302 8303 SKMatrix44 xyz = ToMatrix44 (); 8304 if (xyz !is null) 8305 toXyzD50.SetColumnMajor (xyz.ToColumnMajor ()); 8306 return xyz !is null; 8307 } 8308 8309 SKMatrix44 ToMatrix44 () 8310 { 8311 SKMatrix44 toXYZ; 8312 return ToMatrix44 ( toXYZ) ? toXYZ : null; 8313 } 8314 8315 8316 bool ToMatrix44 (ref SKMatrix44 toXyzD50) 8317 { 8318 SKColorSpaceXyz xyz; 8319 if (!ToColorSpaceXyz ( xyz)) { 8320 toXyzD50 = null; 8321 return false; 8322 } 8323 8324 toXyzD50 = xyz.ToMatrix44 (); 8325 return true; 8326 } 8327 8328 const bool ToColorSpaceXyz (out SKColorSpaceXyz toXyzD50) 8329 { 8330 SKColorSpacePrimaries* t = cast(SKColorSpacePrimaries*)&this; 8331 SKColorSpaceXyz* xyz = &toXyzD50; 8332 return SkiaApi.sk_colorspace_primaries_to_xyzd50 (t, xyz); 8333 } 8334 8335 const SKColorSpaceXyz ToColorSpaceXyz () 8336 { 8337 SKColorSpaceXyz toXYZ; 8338 return ToColorSpaceXyz (toXYZ) ? toXYZ : SKColorSpaceXyz.Empty; 8339 } 8340 8341 } 8342 8343 8344 alias sk_colorspace_transfer_fn_t = SKColorSpaceTransferFn; 8345 8346 8347 struct SKColorSpaceTransferFn { 8348 // float fG 8349 private float fG; 8350 float G() { 8351 return fG; 8352 } 8353 8354 void G(float value) { 8355 fG = value; 8356 } 8357 8358 // float fA 8359 private float fA; 8360 float A() { 8361 return fA; 8362 } 8363 8364 void A(float value) { 8365 fA = value; 8366 } 8367 8368 // float fB 8369 private float fB; 8370 float B() { 8371 return fB; 8372 } 8373 8374 void B(float value) { 8375 fB = value; 8376 } 8377 8378 // float fC 8379 private float fC; 8380 float C() { 8381 return fC; 8382 } 8383 8384 void C(float value) { 8385 fC = value; 8386 } 8387 8388 // float fD 8389 private float fD; 8390 float D() { 8391 return fD; 8392 } 8393 8394 void D(float value) { 8395 fD = value; 8396 } 8397 8398 // float fE 8399 private float fE; 8400 float E() { 8401 return fE; 8402 } 8403 8404 void E(float value) { 8405 fE = value; 8406 } 8407 8408 // float fF 8409 private float fF; 8410 float F() { 8411 return fF; 8412 } 8413 8414 void F(float value) { 8415 fF = value; 8416 } 8417 8418 // const bool Equals (SKColorSpaceTransferFn obj) { 8419 // return fG == obj.fG && fA == obj.fA && fB == obj.fB && fC == obj.fC && fD == obj.fD && fE == obj.fE && fF == obj.fF 8420 // } 8421 8422 // const override bool Equals (object obj) { 8423 // return obj is SKColorSpaceTransferFn f && Equals (f) 8424 // } 8425 8426 // static bool operator == (SKColorSpaceTransferFn left, SKColorSpaceTransferFn right) { 8427 // return left.Equals (right) 8428 // } 8429 8430 // static bool operator != (SKColorSpaceTransferFn left, SKColorSpaceTransferFn right) { 8431 // return !left.Equals (right) 8432 // } 8433 8434 // const override int GetHashCode () 8435 // { 8436 // var hash = new HashCode (); 8437 // hash.Add (fG); 8438 // hash.Add (fA); 8439 // hash.Add (fB); 8440 // hash.Add (fC); 8441 // hash.Add (fD); 8442 // hash.Add (fE); 8443 // hash.Add (fF); 8444 // return hash.ToHashCode (); 8445 // } 8446 8447 static SKColorSpaceTransferFn Srgb() { 8448 SKColorSpaceTransferFn fn; 8449 SkiaApi.sk_colorspace_transfer_fn_named_srgb(&fn); 8450 return fn; 8451 } 8452 8453 static SKColorSpaceTransferFn TwoDotTwo() { 8454 SKColorSpaceTransferFn fn; 8455 SkiaApi.sk_colorspace_transfer_fn_named_2dot2(&fn); 8456 return fn; 8457 } 8458 8459 static SKColorSpaceTransferFn Linear() { 8460 SKColorSpaceTransferFn fn; 8461 SkiaApi.sk_colorspace_transfer_fn_named_linear(&fn); 8462 return fn; 8463 } 8464 8465 static SKColorSpaceTransferFn Rec2020() { 8466 SKColorSpaceTransferFn fn; 8467 SkiaApi.sk_colorspace_transfer_fn_named_rec2020(&fn); 8468 return fn; 8469 } 8470 8471 static SKColorSpaceTransferFn Pq() { 8472 SKColorSpaceTransferFn fn; 8473 SkiaApi.sk_colorspace_transfer_fn_named_pq(&fn); 8474 return fn; 8475 } 8476 8477 static SKColorSpaceTransferFn Hlg() { 8478 SKColorSpaceTransferFn fn; 8479 SkiaApi.sk_colorspace_transfer_fn_named_hlg(&fn); 8480 return fn; 8481 } 8482 8483 static SKColorSpaceTransferFn Empty; 8484 8485 this(float[] values) { 8486 if (values is null) 8487 throw new ArgumentNullException(values.stringof); 8488 if (values.length != 7) 8489 throw new ArgumentException("The values must have exactly 7 items, one for each of [G, A, B, C, D, E, F].", 8490 values.stringof); 8491 8492 fG = values[0]; 8493 fA = values[1]; 8494 fB = values[2]; 8495 fC = values[3]; 8496 fD = values[4]; 8497 fE = values[5]; 8498 fF = values[6]; 8499 } 8500 8501 this(float g, float a, float b, float c, float d, float e, float f) { 8502 fG = g; 8503 fA = a; 8504 fB = b; 8505 fC = c; 8506 fD = d; 8507 fE = e; 8508 fF = f; 8509 } 8510 8511 // const float[] Values() 8512 // { 8513 // return new[] { fG, fA, fB, fC, fD, fE, fF }; 8514 // } 8515 8516 SKColorSpaceTransferFn Invert() { 8517 SKColorSpaceTransferFn inverted; 8518 SKColorSpaceTransferFn* t = &this; 8519 SkiaApi.sk_colorspace_transfer_fn_invert(t, &inverted); 8520 return inverted; 8521 } 8522 8523 float Transform(float x) { 8524 SKColorSpaceTransferFn* t = &this; 8525 return SkiaApi.sk_colorspace_transfer_fn_eval(t, x); 8526 } 8527 8528 } 8529 8530 alias sk_colorspace_xyz_t = SKColorSpaceXyz; 8531 8532 struct SKColorSpaceXyz 8533 { 8534 static SKColorSpaceXyz Srgb() 8535 { 8536 SKColorSpaceXyz xyz; 8537 SkiaApi.sk_colorspace_xyz_named_srgb (&xyz); 8538 return xyz; 8539 } 8540 8541 static SKColorSpaceXyz AdobeRgb() 8542 { 8543 SKColorSpaceXyz xyz; 8544 SkiaApi.sk_colorspace_xyz_named_adobe_rgb (&xyz); 8545 return xyz; 8546 } 8547 8548 static SKColorSpaceXyz Dcip3() 8549 { 8550 SKColorSpaceXyz xyz; 8551 SkiaApi.sk_colorspace_xyz_named_dcip3 (&xyz); 8552 return xyz; 8553 } 8554 8555 static SKColorSpaceXyz Rec2020 () 8556 { 8557 SKColorSpaceXyz xyz; 8558 SkiaApi.sk_colorspace_xyz_named_rec2020 (&xyz); 8559 return xyz; 8560 } 8561 8562 static SKColorSpaceXyz Xyz () 8563 { 8564 SKColorSpaceXyz xyz; 8565 SkiaApi.sk_colorspace_xyz_named_xyz (&xyz); 8566 return xyz; 8567 } 8568 8569 enum SKColorSpaceXyz Empty = SKColorSpaceXyz(); 8570 8571 this (float value) 8572 { 8573 fM00 = value; 8574 fM01 = value; 8575 fM02 = value; 8576 8577 fM10 = value; 8578 fM11 = value; 8579 fM12 = value; 8580 8581 fM20 = value; 8582 fM21 = value; 8583 fM22 = value; 8584 } 8585 8586 this (float[] values) 8587 { 8588 if (values is null) 8589 throw new ArgumentNullException (values.stringof); 8590 if (values.length != 9) 8591 throw new ArgumentException ("The matrix array must have a length of 9.", values.stringof); 8592 8593 fM00 = values[0]; 8594 fM01 = values[1]; 8595 fM02 = values[2]; 8596 8597 fM10 = values[3]; 8598 fM11 = values[4]; 8599 fM12 = values[5]; 8600 8601 fM20 = values[6]; 8602 fM21 = values[7]; 8603 fM22 = values[8]; 8604 } 8605 8606 this ( 8607 float m00, float m01, float m02, 8608 float m10, float m11, float m12, 8609 float m20, float m21, float m22) 8610 { 8611 fM00 = m00; 8612 fM01 = m01; 8613 fM02 = m02; 8614 8615 fM10 = m10; 8616 fM11 = m11; 8617 fM12 = m12; 8618 8619 fM20 = m20; 8620 fM21 = m21; 8621 fM22 = m22; 8622 } 8623 8624 float[] Values() { 8625 return [ 8626 fM00, fM01, fM02, 8627 fM10, fM11, fM12, 8628 fM20, fM21, fM22, 8629 ]; 8630 } 8631 8632 void Values(float[] value) { 8633 8634 if (value.length != 9) 8635 throw new ArgumentException ("The matrix array must have a length of 9.", value.stringof); 8636 8637 fM00 = value[0]; 8638 fM01 = value[1]; 8639 fM02 = value[2]; 8640 8641 fM10 = value[3]; 8642 fM11 = value[4]; 8643 fM12 = value[5]; 8644 8645 fM20 = value[6]; 8646 fM21 = value[7]; 8647 fM22 = value[8]; 8648 8649 } 8650 8651 // const float this[int x, int y] { 8652 // if (x < 0 || x >= 3) 8653 // throw new ArgumentOutOfRangeException (x.stringof); 8654 // if (y < 0 || y >= 3) 8655 // throw new ArgumentOutOfRangeException (y.stringof); 8656 8657 // auto idx = x + (y * 3); 8658 // switch(idx) 8659 // { 8660 // case 0:return fM00; 8661 // case 1:return fM01; 8662 // case 2:return fM02; 8663 // case 3:return fM10; 8664 // case 4:return fM11; 8665 // case 5:return fM12; 8666 // case 6:return fM20; 8667 // case 7:return fM21; 8668 // case 8:return fM22; 8669 // default: 8670 // return throw new ArgumentOutOfRangeException ("index"); 8671 // } 8672 // } 8673 8674 const SKColorSpaceXyz Invert () 8675 { 8676 SKColorSpaceXyz inverted; 8677 SKColorSpaceXyz* t = cast(SKColorSpaceXyz*)&this; 8678 SkiaApi.sk_colorspace_xyz_invert (t, &inverted); 8679 return inverted; 8680 } 8681 8682 static SKColorSpaceXyz Concat (SKColorSpaceXyz a, SKColorSpaceXyz b) 8683 { 8684 SKColorSpaceXyz result; 8685 SkiaApi.sk_colorspace_xyz_concat (&a, &b, &result); 8686 return result; 8687 } 8688 8689 SKMatrix44 ToMatrix44 () 8690 { 8691 auto matrix = new SKMatrix44 (); 8692 matrix.Set3x3RowMajor (Values); 8693 return matrix; 8694 } 8695 8696 // float fM00 8697 private float fM00; 8698 8699 // float fM01 8700 private float fM01; 8701 8702 // float fM02 8703 private float fM02; 8704 8705 // float fM10 8706 private float fM10; 8707 8708 // float fM11 8709 private float fM11; 8710 8711 // float fM12 8712 private float fM12; 8713 8714 // float fM20 8715 private float fM20; 8716 8717 // float fM21 8718 private float fM21; 8719 8720 // float fM22 8721 private float fM22; 8722 8723 // const bool Equals (SKColorSpaceXyz obj) { 8724 // return fM00 == obj.fM00 && fM01 == obj.fM01 && fM02 == obj.fM02 && fM10 == obj.fM10 && fM11 == obj.fM11 && fM12 == obj.fM12 && fM20 == obj.fM20 && fM21 == obj.fM21 && fM22 == obj.fM22 8725 // } 8726 8727 // const override bool Equals (object obj) { 8728 // return obj is SKColorSpaceXyz f && Equals (f) 8729 // } 8730 8731 // static bool operator == (SKColorSpaceXyz left, SKColorSpaceXyz right) { 8732 // return left.Equals (right) 8733 // } 8734 8735 // static bool operator != (SKColorSpaceXyz left, SKColorSpaceXyz right) { 8736 // return !left.Equals (right) 8737 // } 8738 8739 // const override int GetHashCode () 8740 // { 8741 // var hash = new HashCode (); 8742 // hash.Add (fM00); 8743 // hash.Add (fM01); 8744 // hash.Add (fM02); 8745 // hash.Add (fM10); 8746 // hash.Add (fM11); 8747 // hash.Add (fM12); 8748 // hash.Add (fM20); 8749 // hash.Add (fM21); 8750 // hash.Add (fM22); 8751 // return hash.ToHashCode (); 8752 // } 8753 8754 } 8755 8756 8757 alias sk_document_pdf_metadata_t = SKDocumentPdfMetadataInternal; 8758 8759 struct SKDocumentPdfMetadataInternal { 8760 // sk_string_t* fTitle 8761 sk_string_t* fTitle; 8762 8763 // sk_string_t* fAuthor 8764 sk_string_t* fAuthor; 8765 8766 // sk_string_t* fSubject 8767 sk_string_t* fSubject; 8768 8769 // sk_string_t* fKeywords 8770 sk_string_t* fKeywords; 8771 8772 // sk_string_t* fCreator 8773 sk_string_t* fCreator; 8774 8775 // sk_string_t* fProducer 8776 sk_string_t* fProducer; 8777 8778 // sk_time_datetime_t* fCreation 8779 SKTimeDateTimeInternal* fCreation; 8780 8781 // sk_time_datetime_t* fModified 8782 SKTimeDateTimeInternal* fModified; 8783 8784 // float fRasterDPI 8785 float fRasterDPI; 8786 8787 // bool fPDFA 8788 ubyte fPDFA; 8789 8790 // int fEncodingQuality 8791 int fEncodingQuality; 8792 8793 // const bool Equals (SKDocumentPdfMetadataInternal obj) { 8794 // return fTitle == obj.fTitle && fAuthor == obj.fAuthor && fSubject == obj.fSubject && fKeywords == obj.fKeywords && fCreator == obj.fCreator && fProducer == obj.fProducer && fCreation == obj.fCreation && fModified == obj.fModified && fRasterDPI == obj.fRasterDPI && fPDFA == obj.fPDFA && fEncodingQuality == obj.fEncodingQuality 8795 // } 8796 8797 // const override bool Equals (object obj) { 8798 // return obj is SKDocumentPdfMetadataInternal f && Equals (f) 8799 // } 8800 8801 // static bool operator == (SKDocumentPdfMetadataInternal left, SKDocumentPdfMetadataInternal right) { 8802 // return left.Equals (right) 8803 // } 8804 8805 // static bool operator != (SKDocumentPdfMetadataInternal left, SKDocumentPdfMetadataInternal right) { 8806 // return !left.Equals (right) 8807 // } 8808 8809 // const override int GetHashCode () 8810 // { 8811 // var hash = new HashCode (); 8812 // hash.Add (fTitle); 8813 // hash.Add (fAuthor); 8814 // hash.Add (fSubject); 8815 // hash.Add (fKeywords); 8816 // hash.Add (fCreator); 8817 // hash.Add (fProducer); 8818 // hash.Add (fCreation); 8819 // hash.Add (fModified); 8820 // hash.Add (fRasterDPI); 8821 // hash.Add (fPDFA); 8822 // hash.Add (fEncodingQuality); 8823 // return hash.ToHashCode (); 8824 // } 8825 8826 } 8827 8828 8829 alias sk_fontmetrics_t = SKFontMetrics; 8830 8831 struct SKFontMetrics { 8832 // uint32_t fFlags 8833 private uint fFlags; 8834 8835 // float fTop 8836 private float fTop; 8837 8838 // float fAscent 8839 private float fAscent; 8840 8841 // float fDescent 8842 private float fDescent; 8843 8844 // float fBottom 8845 private float fBottom; 8846 8847 // float fLeading 8848 private float fLeading; 8849 8850 // float fAvgCharWidth 8851 private float fAvgCharWidth; 8852 8853 // float fMaxCharWidth 8854 private float fMaxCharWidth; 8855 8856 // float fXMin 8857 private float fXMin; 8858 8859 // float fXMax 8860 private float fXMax; 8861 8862 // float fXHeight 8863 private float fXHeight; 8864 8865 // float fCapHeight 8866 private float fCapHeight; 8867 8868 // float fUnderlineThickness 8869 private float fUnderlineThickness; 8870 8871 // float fUnderlinePosition 8872 private float fUnderlinePosition; 8873 8874 // float fStrikeoutThickness 8875 private float fStrikeoutThickness; 8876 8877 // float fStrikeoutPosition 8878 private float fStrikeoutPosition; 8879 8880 // const bool Equals (SKFontMetrics obj) { 8881 // return fFlags == obj.fFlags && fTop == obj.fTop && fAscent == obj.fAscent && fDescent == obj.fDescent && fBottom == obj.fBottom && fLeading == obj.fLeading && fAvgCharWidth == obj.fAvgCharWidth && fMaxCharWidth == obj.fMaxCharWidth && fXMin == obj.fXMin && fXMax == obj.fXMax && fXHeight == obj.fXHeight && fCapHeight == obj.fCapHeight && fUnderlineThickness == obj.fUnderlineThickness && fUnderlinePosition == obj.fUnderlinePosition && fStrikeoutThickness == obj.fStrikeoutThickness && fStrikeoutPosition == obj.fStrikeoutPosition 8882 // } 8883 8884 // const override bool Equals (object obj) { 8885 // return obj is SKFontMetrics f && Equals (f) 8886 // } 8887 8888 // static bool operator == (SKFontMetrics left, SKFontMetrics right) { 8889 // return left.Equals (right) 8890 // } 8891 8892 // static bool operator != (SKFontMetrics left, SKFontMetrics right) { 8893 // return !left.Equals (right) 8894 // } 8895 8896 // const override int GetHashCode () 8897 // { 8898 // var hash = new HashCode (); 8899 // hash.Add (fFlags); 8900 // hash.Add (fTop); 8901 // hash.Add (fAscent); 8902 // hash.Add (fDescent); 8903 // hash.Add (fBottom); 8904 // hash.Add (fLeading); 8905 // hash.Add (fAvgCharWidth); 8906 // hash.Add (fMaxCharWidth); 8907 // hash.Add (fXMin); 8908 // hash.Add (fXMax); 8909 // hash.Add (fXHeight); 8910 // hash.Add (fCapHeight); 8911 // hash.Add (fUnderlineThickness); 8912 // hash.Add (fUnderlinePosition); 8913 // hash.Add (fStrikeoutThickness); 8914 // hash.Add (fStrikeoutPosition); 8915 // return hash.ToHashCode (); 8916 // } 8917 8918 private enum uint flagsUnderlineThicknessIsValid = (1U << 0); 8919 private enum uint flagsUnderlinePositionIsValid = (1U << 1); 8920 private enum uint flagsStrikeoutThicknessIsValid = (1U << 2); 8921 private enum uint flagsStrikeoutPositionIsValid = (1U << 3); 8922 8923 float Top() { return fTop; } 8924 8925 float Ascent() { return fAscent; } 8926 8927 float Descent() { return fDescent; } 8928 8929 float Bottom() { return fBottom; } 8930 8931 float Leading() { return fLeading; } 8932 8933 float AverageCharacterWidth() { return fAvgCharWidth; } 8934 8935 float MaxCharacterWidth() { return fMaxCharWidth; } 8936 8937 float XMin() { return fXMin; } 8938 8939 float XMax() { return fXMax; } 8940 8941 float XHeight() { return fXHeight; } 8942 8943 float CapHeight() { return fCapHeight; } 8944 8945 Nullable!float UnderlineThickness() { return GetIfValid (fUnderlineThickness, flagsUnderlineThicknessIsValid); } 8946 Nullable!float UnderlinePosition() { return GetIfValid (fUnderlinePosition, flagsUnderlinePositionIsValid); } 8947 Nullable!float StrikeoutThickness() { return GetIfValid (fStrikeoutThickness, flagsStrikeoutThicknessIsValid); } 8948 Nullable!float StrikeoutPosition() { return GetIfValid (fStrikeoutPosition, flagsStrikeoutPositionIsValid); } 8949 8950 private Nullable!float GetIfValid (float value, uint flag) 8951 { 8952 return (fFlags & flag) == flag ? NullableFloat(value) : NullableFloat.init; 8953 } 8954 } 8955 8956 8957 alias sk_highcontrastconfig_t = SKHighContrastConfig; 8958 8959 struct SKHighContrastConfig { 8960 enum SKHighContrastConfig Default = SKHighContrastConfig (false, SKHighContrastConfigInvertStyle.NoInvert, 0.0f); 8961 8962 // bool fGrayscale 8963 private ubyte fGrayscale; 8964 bool Grayscale() { 8965 return fGrayscale > 0; 8966 } 8967 8968 void Grayscale(bool value) { 8969 fGrayscale = value ? cast(byte)1 : cast(byte)0; 8970 } 8971 8972 // sk_highcontrastconfig_invertstyle_t fInvertStyle 8973 private SKHighContrastConfigInvertStyle fInvertStyle; 8974 SKHighContrastConfigInvertStyle InvertStyle() { 8975 return fInvertStyle; 8976 } 8977 8978 void InvertStyle(SKHighContrastConfigInvertStyle value) { 8979 fInvertStyle = value; 8980 } 8981 8982 // float fContrast 8983 private float fContrast; 8984 float Contrast() { 8985 return fContrast; 8986 } 8987 8988 void Contrast(float value) { 8989 fContrast = value; 8990 } 8991 8992 // const bool Equals (SKHighContrastConfig obj) { 8993 // return fGrayscale == obj.fGrayscale && fInvertStyle == obj.fInvertStyle && fContrast == obj.fContrast 8994 // } 8995 8996 // const override bool Equals (object obj) { 8997 // return obj is SKHighContrastConfig f && Equals (f) 8998 // } 8999 9000 // static bool operator == (SKHighContrastConfig left, SKHighContrastConfig right) { 9001 // return left.Equals (right) 9002 // } 9003 9004 // static bool operator != (SKHighContrastConfig left, SKHighContrastConfig right) { 9005 // return !left.Equals (right) 9006 // } 9007 9008 // const override int GetHashCode () 9009 // { 9010 // var hash = new HashCode (); 9011 // hash.Add (fGrayscale); 9012 // hash.Add (fInvertStyle); 9013 // hash.Add (fContrast); 9014 // return hash.ToHashCode (); 9015 // } 9016 9017 this (bool grayscale, SKHighContrastConfigInvertStyle invertStyle, float contrast) 9018 { 9019 fGrayscale = grayscale ? cast(byte)1 : cast(byte)0; 9020 fInvertStyle = invertStyle; 9021 fContrast = contrast; 9022 } 9023 9024 bool IsValid() 9025 { 9026 return cast(int)fInvertStyle >= cast(int)SKHighContrastConfigInvertStyle.NoInvert && 9027 cast(int)fInvertStyle <= cast(int)SKHighContrastConfigInvertStyle.InvertLightness && 9028 fContrast >= -1.0 && 9029 fContrast <= 1.0; 9030 } 9031 } 9032 9033 9034 alias sk_imageinfo_t = SKImageInfoNative; 9035 9036 9037 9038 alias sk_ipoint_t = SKPointI; 9039 9040 alias sk_irect_t = SKRectI; 9041 9042 alias sk_isize_t = SKSizeI; 9043 9044 alias sk_jpegencoder_options_t = SKJpegEncoderOptions; 9045 9046 struct SKJpegEncoderOptions { 9047 9048 this (int quality, SKJpegEncoderDownsample downsample, SKJpegEncoderAlphaOption alphaOption) 9049 { 9050 fQuality = quality; 9051 fDownsample = downsample; 9052 fAlphaOption = alphaOption; 9053 } 9054 9055 this (int quality, SKJpegEncoderDownsample downsample, SKJpegEncoderAlphaOption alphaOption, SKTransferFunctionBehavior blendBehavior) 9056 { 9057 fQuality = quality; 9058 fDownsample = downsample; 9059 fAlphaOption = alphaOption; 9060 } 9061 9062 SKTransferFunctionBehavior BlendBehavior() { 9063 return SKTransferFunctionBehavior.Respect; 9064 } 9065 9066 9067 // int fQuality 9068 private int fQuality; 9069 int Quality() { 9070 return fQuality; 9071 } 9072 9073 void Quality(int value) { 9074 fQuality = value; 9075 } 9076 9077 // sk_jpegencoder_downsample_t fDownsample 9078 private SKJpegEncoderDownsample fDownsample; 9079 SKJpegEncoderDownsample Downsample() { 9080 return fDownsample; 9081 } 9082 9083 void Downsample(SKJpegEncoderDownsample value) { 9084 fDownsample = value; 9085 } 9086 9087 // sk_jpegencoder_alphaoption_t fAlphaOption 9088 private SKJpegEncoderAlphaOption fAlphaOption; 9089 SKJpegEncoderAlphaOption AlphaOption() { 9090 return fAlphaOption; 9091 } 9092 9093 void AlphaOption(SKJpegEncoderAlphaOption value) { 9094 fAlphaOption = value; 9095 } 9096 9097 // const bool Equals (SKJpegEncoderOptions obj) { 9098 // return fQuality == obj.fQuality && fDownsample == obj.fDownsample && fAlphaOption == obj.fAlphaOption 9099 // } 9100 9101 // const override bool Equals (object obj) { 9102 // return obj is SKJpegEncoderOptions f && Equals (f) 9103 // } 9104 9105 // static bool operator == (SKJpegEncoderOptions left, SKJpegEncoderOptions right) { 9106 // return left.Equals (right) 9107 // } 9108 9109 // static bool operator != (SKJpegEncoderOptions left, SKJpegEncoderOptions right) { 9110 // return !left.Equals (right) 9111 // } 9112 9113 // const override int GetHashCode () 9114 // { 9115 // var hash = new HashCode (); 9116 // hash.Add (fQuality); 9117 // hash.Add (fDownsample); 9118 // hash.Add (fAlphaOption); 9119 // return hash.ToHashCode (); 9120 // } 9121 9122 } 9123 9124 9125 alias sk_lattice_t = SKLatticeInternal; 9126 9127 struct SKLatticeInternal { 9128 enum SKJpegEncoderOptions Default = SKJpegEncoderOptions (100, SKJpegEncoderDownsample.Downsample420, SKJpegEncoderAlphaOption.Ignore); 9129 9130 // const int* fXDivs 9131 int* fXDivs; 9132 9133 // const int* fYDivs 9134 int* fYDivs; 9135 9136 // const sk_lattice_recttype_t* fRectTypes 9137 SKLatticeRectType* fRectTypes; 9138 9139 // int fXCount 9140 int fXCount; 9141 9142 // int fYCount 9143 int fYCount; 9144 9145 // const sk_irect_t* fBounds 9146 SKRectI* fBounds; 9147 9148 // const sk_color_t* fColors 9149 uint* fColors; 9150 9151 // const bool Equals (SKLatticeInternal obj) { 9152 // return fXDivs == obj.fXDivs && fYDivs == obj.fYDivs && fRectTypes == obj.fRectTypes && fXCount == obj.fXCount && fYCount == obj.fYCount && fBounds == obj.fBounds && fColors == obj.fColors 9153 // } 9154 9155 // const override bool Equals (object obj) { 9156 // return obj is SKLatticeInternal f && Equals (f) 9157 // } 9158 9159 // static bool operator == (SKLatticeInternal left, SKLatticeInternal right) { 9160 // return left.Equals (right) 9161 // } 9162 9163 // static bool operator != (SKLatticeInternal left, SKLatticeInternal right) { 9164 // return !left.Equals (right) 9165 // } 9166 9167 // const override int GetHashCode () 9168 // { 9169 // var hash = new HashCode (); 9170 // hash.Add (fXDivs); 9171 // hash.Add (fYDivs); 9172 // hash.Add (fRectTypes); 9173 // hash.Add (fXCount); 9174 // hash.Add (fYCount); 9175 // hash.Add (fBounds); 9176 // hash.Add (fColors); 9177 // return hash.ToHashCode (); 9178 // } 9179 } 9180 9181 9182 alias sk_manageddrawable_procs_t = SKManagedDrawableDelegates; 9183 9184 struct SKManagedDrawableDelegates { 9185 // sk_manageddrawable_draw_proc fDraw 9186 SKManagedDrawableDrawProxyDelegate fDraw; 9187 9188 // sk_manageddrawable_getBounds_proc fGetBounds 9189 SKManagedDrawableGetBoundsProxyDelegate fGetBounds; 9190 9191 // sk_manageddrawable_newPictureSnapshot_proc fNewPictureSnapshot 9192 SKManagedDrawableNewPictureSnapshotProxyDelegate fNewPictureSnapshot; 9193 9194 // sk_manageddrawable_destroy_proc fDestroy 9195 SKManagedDrawableDestroyProxyDelegate fDestroy; 9196 9197 // const bool Equals (SKManagedDrawableDelegates obj) { 9198 // return fDraw == obj.fDraw && fGetBounds == obj.fGetBounds && fNewPictureSnapshot == obj.fNewPictureSnapshot && fDestroy == obj.fDestroy 9199 // } 9200 9201 // const override bool Equals (object obj) { 9202 // return obj is SKManagedDrawableDelegates f && Equals (f) 9203 // } 9204 9205 // static bool operator == (SKManagedDrawableDelegates left, SKManagedDrawableDelegates right) { 9206 // return left.Equals (right) 9207 // } 9208 9209 // static bool operator != (SKManagedDrawableDelegates left, SKManagedDrawableDelegates right) { 9210 // return !left.Equals (right) 9211 // } 9212 9213 // const override int GetHashCode () 9214 // { 9215 // var hash = new HashCode (); 9216 // hash.Add (fDraw); 9217 // hash.Add (fGetBounds); 9218 // hash.Add (fNewPictureSnapshot); 9219 // hash.Add (fDestroy); 9220 // return hash.ToHashCode (); 9221 // } 9222 9223 } 9224 9225 9226 alias sk_managedstream_procs_t = SKManagedStreamDelegates; 9227 9228 struct SKManagedStreamDelegates { 9229 // sk_managedstream_read_proc fRead 9230 SKManagedStreamReadProxyDelegate fRead; 9231 9232 // sk_managedstream_peek_proc fPeek 9233 SKManagedStreamPeekProxyDelegate fPeek; 9234 9235 // sk_managedstream_isAtEnd_proc fIsAtEnd 9236 SKManagedStreamIsAtEndProxyDelegate fIsAtEnd; 9237 9238 // sk_managedstream_hasPosition_proc fHasPosition 9239 SKManagedStreamHasPositionProxyDelegate fHasPosition; 9240 9241 // sk_managedstream_hasLength_proc fHasLength 9242 SKManagedStreamHasLengthProxyDelegate fHasLength; 9243 9244 // sk_managedstream_rewind_proc fRewind 9245 SKManagedStreamRewindProxyDelegate fRewind; 9246 9247 // sk_managedstream_getPosition_proc fGetPosition 9248 SKManagedStreamGetPositionProxyDelegate fGetPosition; 9249 9250 // sk_managedstream_seek_proc fSeek 9251 SKManagedStreamSeekProxyDelegate fSeek; 9252 9253 // sk_managedstream_move_proc fMove 9254 SKManagedStreamMoveProxyDelegate fMove; 9255 9256 // sk_managedstream_getLength_proc fGetLength 9257 SKManagedStreamGetLengthProxyDelegate fGetLength; 9258 9259 // sk_managedstream_duplicate_proc fDuplicate 9260 SKManagedStreamDuplicateProxyDelegate fDuplicate; 9261 9262 // sk_managedstream_fork_proc fFork 9263 SKManagedStreamForkProxyDelegate fFork; 9264 9265 // sk_managedstream_destroy_proc fDestroy 9266 SKManagedStreamDestroyProxyDelegate fDestroy; 9267 9268 // const bool Equals (SKManagedStreamDelegates obj) { 9269 // return fRead == obj.fRead && fPeek == obj.fPeek && fIsAtEnd == obj.fIsAtEnd && fHasPosition == obj.fHasPosition && fHasLength == obj.fHasLength && fRewind == obj.fRewind && fGetPosition == obj.fGetPosition && fSeek == obj.fSeek && fMove == obj.fMove && fGetLength == obj.fGetLength && fDuplicate == obj.fDuplicate && fFork == obj.fFork && fDestroy == obj.fDestroy 9270 // } 9271 9272 // const override bool Equals (object obj) { 9273 // return obj is SKManagedStreamDelegates f && Equals (f) 9274 // } 9275 9276 // static bool operator == (SKManagedStreamDelegates left, SKManagedStreamDelegates right) { 9277 // return left.Equals (right) 9278 // } 9279 9280 // static bool operator != (SKManagedStreamDelegates left, SKManagedStreamDelegates right) { 9281 // return !left.Equals (right) 9282 // } 9283 9284 // const override int GetHashCode () 9285 // { 9286 // var hash = new HashCode (); 9287 // hash.Add (fRead); 9288 // hash.Add (fPeek); 9289 // hash.Add (fIsAtEnd); 9290 // hash.Add (fHasPosition); 9291 // hash.Add (fHasLength); 9292 // hash.Add (fRewind); 9293 // hash.Add (fGetPosition); 9294 // hash.Add (fSeek); 9295 // hash.Add (fMove); 9296 // hash.Add (fGetLength); 9297 // hash.Add (fDuplicate); 9298 // hash.Add (fFork); 9299 // hash.Add (fDestroy); 9300 // return hash.ToHashCode (); 9301 // } 9302 9303 } 9304 9305 9306 alias sk_managedtracememorydump_procs_t = SKManagedTraceMemoryDumpDelegates; 9307 9308 struct SKManagedTraceMemoryDumpDelegates { 9309 // sk_managedtraceMemoryDump_dumpNumericValue_proc fDumpNumericValue 9310 SKManagedTraceMemoryDumpDumpNumericValueProxyDelegate fDumpNumericValue; 9311 9312 // sk_managedtraceMemoryDump_dumpStringValue_proc fDumpStringValue 9313 SKManagedTraceMemoryDumpDumpStringValueProxyDelegate fDumpStringValue; 9314 9315 // const bool Equals (SKManagedTraceMemoryDumpDelegates obj) { 9316 // return fDumpNumericValue == obj.fDumpNumericValue && fDumpStringValue == obj.fDumpStringValue 9317 // } 9318 9319 // const override bool Equals (object obj) { 9320 // return obj is SKManagedTraceMemoryDumpDelegates f && Equals (f) 9321 // } 9322 9323 // static bool operator == (SKManagedTraceMemoryDumpDelegates left, SKManagedTraceMemoryDumpDelegates right) { 9324 // return left.Equals (right) 9325 // } 9326 9327 // static bool operator != (SKManagedTraceMemoryDumpDelegates left, SKManagedTraceMemoryDumpDelegates right) { 9328 // return !left.Equals (right) 9329 // } 9330 9331 // const override int GetHashCode () 9332 // { 9333 // var hash = new HashCode (); 9334 // hash.Add (fDumpNumericValue); 9335 // hash.Add (fDumpStringValue); 9336 // return hash.ToHashCode (); 9337 // } 9338 9339 } 9340 9341 9342 alias sk_managedwstream_procs_t = SKManagedWStreamDelegates; 9343 9344 struct SKManagedWStreamDelegates { 9345 // sk_managedwstream_write_proc fWrite 9346 SKManagedWStreamWriteProxyDelegate fWrite; 9347 9348 // sk_managedwstream_flush_proc fFlush 9349 SKManagedWStreamFlushProxyDelegate fFlush; 9350 9351 // sk_managedwstream_bytesWritten_proc fBytesWritten 9352 SKManagedWStreamBytesWrittenProxyDelegate fBytesWritten; 9353 9354 // sk_managedwstream_destroy_proc fDestroy 9355 SKManagedWStreamDestroyProxyDelegate fDestroy; 9356 9357 // const bool Equals (SKManagedWStreamDelegates obj) { 9358 // return fWrite == obj.fWrite && fFlush == obj.fFlush && fBytesWritten == obj.fBytesWritten && fDestroy == obj.fDestroy 9359 // } 9360 9361 // const override bool Equals (object obj) { 9362 // return obj is SKManagedWStreamDelegates f && Equals (f) 9363 // } 9364 9365 // static bool operator == (SKManagedWStreamDelegates left, SKManagedWStreamDelegates right) { 9366 // return left.Equals (right) 9367 // } 9368 9369 // static bool operator != (SKManagedWStreamDelegates left, SKManagedWStreamDelegates right) { 9370 // return !left.Equals (right) 9371 // } 9372 9373 // const override int GetHashCode () 9374 // { 9375 // var hash = new HashCode (); 9376 // hash.Add (fWrite); 9377 // hash.Add (fFlush); 9378 // hash.Add (fBytesWritten); 9379 // hash.Add (fDestroy); 9380 // return hash.ToHashCode (); 9381 // } 9382 9383 } 9384 9385 9386 alias sk_mask_t = SKMask; 9387 9388 // struct SKMask { 9389 // uint8_t* fImage 9390 // private ubyte* fImage; 9391 9392 // // sk_irect_t fBounds 9393 // private SKRectI fBounds; 9394 9395 // // uint32_t fRowBytes 9396 // private uint fRowBytes; 9397 9398 // // sk_mask_format_t fFormat 9399 // private SKMaskFormat fFormat; 9400 9401 // const bool Equals (SKMask obj) { 9402 // return fImage == obj.fImage && fBounds == obj.fBounds && fRowBytes == obj.fRowBytes && fFormat == obj.fFormat 9403 // } 9404 9405 // const override bool Equals (object obj) { 9406 // return obj is SKMask f && Equals (f) 9407 // } 9408 9409 // static bool operator == (SKMask left, SKMask right) { 9410 // return left.Equals (right) 9411 // } 9412 9413 // static bool operator != (SKMask left, SKMask right) { 9414 // return !left.Equals (right) 9415 // } 9416 9417 // const override int GetHashCode () 9418 // { 9419 // var hash = new HashCode (); 9420 // hash.Add (fImage); 9421 // hash.Add (fBounds); 9422 // hash.Add (fRowBytes); 9423 // hash.Add (fFormat); 9424 // return hash.ToHashCode (); 9425 // } 9426 9427 // } 9428 9429 9430 alias sk_matrix_t = SKMatrix; 9431 9432 9433 9434 alias sk_pngencoder_options_t = SKPngEncoderOptions; 9435 9436 /** 9437 * 9438 */ 9439 struct SKPngEncoderOptions { 9440 enum SKPngEncoderOptions Default = SKPngEncoderOptions (SKPngEncoderFilterFlags.AllFilters, 6); 9441 9442 // sk_pngencoder_filterflags_t fFilterFlags 9443 private SKPngEncoderFilterFlags fFilterFlags; 9444 9445 // int fZLibLevel 9446 private int fZLibLevel; 9447 9448 // void* fComments 9449 private void* fComments; 9450 9451 // const bool Equals (SKPngEncoderOptions obj) { 9452 // return fFilterFlags == obj.fFilterFlags && fZLibLevel == obj.fZLibLevel && fComments == obj.fComments 9453 // } 9454 9455 // const override bool Equals (object obj) { 9456 // return obj is SKPngEncoderOptions f && Equals (f) 9457 // } 9458 9459 // static bool operator == (SKPngEncoderOptions left, SKPngEncoderOptions right) { 9460 // return left.Equals (right) 9461 // } 9462 9463 // static bool operator != (SKPngEncoderOptions left, SKPngEncoderOptions right) { 9464 // return !left.Equals (right) 9465 // } 9466 9467 // const override int GetHashCode () 9468 // { 9469 // var hash = new HashCode (); 9470 // hash.Add (fFilterFlags); 9471 // hash.Add (fZLibLevel); 9472 // hash.Add (fComments); 9473 // return hash.ToHashCode (); 9474 // } 9475 9476 9477 this (SKPngEncoderFilterFlags filterFlags, int zLibLevel) 9478 { 9479 fFilterFlags = filterFlags; 9480 fZLibLevel = zLibLevel; 9481 fComments = null; 9482 } 9483 9484 this (SKPngEncoderFilterFlags filterFlags, int zLibLevel, SKTransferFunctionBehavior unpremulBehavior) 9485 { 9486 fFilterFlags = filterFlags; 9487 fZLibLevel = zLibLevel; 9488 fComments = null; 9489 } 9490 9491 SKPngEncoderFilterFlags FilterFlags() { 9492 return fFilterFlags; 9493 } 9494 9495 void FilterFlags(SKPngEncoderFilterFlags value) { 9496 fFilterFlags = value; 9497 } 9498 9499 int ZLibLevel() { 9500 return fZLibLevel; 9501 } 9502 9503 void ZLibLevel(int value) { 9504 fZLibLevel = value; 9505 } 9506 9507 SKTransferFunctionBehavior UnpremulBehavior() { 9508 return SKTransferFunctionBehavior.Respect; 9509 } 9510 } 9511 9512 9513 alias sk_point_t = SKPoint; 9514 alias sk_vector_t = SKPoint; 9515 9516 9517 9518 alias sk_point3_t = SKPoint3; 9519 9520 9521 alias sk_rect_t = SKRect; 9522 9523 alias sk_rsxform_t = SKRotationScaleMatrix; 9524 9525 struct SKRotationScaleMatrix { 9526 // float fSCos 9527 private float fSCos; 9528 float SCos() { 9529 return fSCos; 9530 } 9531 9532 void SCos(float value) { 9533 fSCos = value; 9534 } 9535 9536 // float fSSin 9537 private float fSSin; 9538 float SSin() { 9539 return fSSin; 9540 } 9541 9542 void SSin(float value) { 9543 fSSin = value; 9544 } 9545 9546 // float fTX 9547 private float fTX; 9548 float TX() { 9549 return fTX; 9550 } 9551 9552 void TX(float value) { 9553 fTX = value; 9554 } 9555 9556 // float fTY 9557 private float fTY; 9558 float TY() { 9559 return fTY; 9560 } 9561 9562 void TY(float value) { 9563 fTY = value; 9564 } 9565 9566 // const bool Equals (SKRotationScaleMatrix obj) { 9567 // return fSCos == obj.fSCos && fSSin == obj.fSSin && fTX == obj.fTX && fTY == obj.fTY 9568 // } 9569 9570 // const override bool Equals (object obj) { 9571 // return obj is SKRotationScaleMatrix f && Equals (f) 9572 // } 9573 9574 // static bool operator == (SKRotationScaleMatrix left, SKRotationScaleMatrix right) { 9575 // return left.Equals (right) 9576 // } 9577 9578 // static bool operator != (SKRotationScaleMatrix left, SKRotationScaleMatrix right) { 9579 // return !left.Equals (right) 9580 // } 9581 9582 // const override int GetHashCode () 9583 // { 9584 // var hash = new HashCode (); 9585 // hash.Add (fSCos); 9586 // hash.Add (fSSin); 9587 // hash.Add (fTX); 9588 // hash.Add (fTY); 9589 // return hash.ToHashCode (); 9590 // } 9591 9592 } 9593 9594 9595 alias sk_size_t = SKSize; 9596 9597 alias sk_textblob_builder_runbuffer_t = SKRunBufferInternal; 9598 9599 struct SKRunBufferInternal { 9600 // void* glyphs 9601 void* glyphs; 9602 9603 // void* pos 9604 void* pos; 9605 9606 // void* utf8text 9607 void* utf8text; 9608 9609 // void* clusters 9610 void* clusters; 9611 9612 // const bool Equals (SKRunBufferInternal obj) { 9613 // return glyphs == obj.glyphs && pos == obj.pos && utf8text == obj.utf8text && clusters == obj.clusters 9614 // } 9615 9616 // const override bool Equals (object obj) { 9617 // return obj is SKRunBufferInternal f && Equals (f) 9618 // } 9619 9620 // static bool operator == (SKRunBufferInternal left, SKRunBufferInternal right) { 9621 // return left.Equals (right) 9622 // } 9623 9624 // static bool operator != (SKRunBufferInternal left, SKRunBufferInternal right) { 9625 // return !left.Equals (right) 9626 // } 9627 9628 // const override int GetHashCode () 9629 // { 9630 // var hash = new HashCode (); 9631 // hash.Add (glyphs); 9632 // hash.Add (pos); 9633 // hash.Add (utf8text); 9634 // hash.Add (clusters); 9635 // return hash.ToHashCode (); 9636 // } 9637 9638 } 9639 9640 9641 alias sk_time_datetime_t = SKTimeDateTimeInternal; 9642 9643 struct SKTimeDateTimeInternal { 9644 // int16_t fTimeZoneMinutes 9645 short fTimeZoneMinutes; 9646 9647 // uint16_t fYear 9648 ushort fYear; 9649 9650 // uint8_t fMonth 9651 ubyte fMonth; 9652 9653 // uint8_t fDayOfWeek 9654 ubyte fDayOfWeek; 9655 9656 // uint8_t fDay 9657 ubyte fDay; 9658 9659 // uint8_t fHour 9660 ubyte fHour; 9661 9662 // uint8_t fMinute 9663 ubyte fMinute; 9664 9665 // uint8_t fSecond 9666 ubyte fSecond; 9667 9668 static SKTimeDateTimeInternal Create (SysTime datetime) 9669 { 9670 long zone = datetime.utcOffset.total!("minutes"); 9671 9672 SKTimeDateTimeInternal internal; 9673 9674 internal.fTimeZoneMinutes = cast(short)(zone); 9675 internal.fYear = cast(ushort)datetime.year; 9676 internal.fMonth = cast(ubyte)datetime.month; 9677 internal.fDayOfWeek = cast(ubyte)datetime.dayOfWeek; 9678 internal.fDay = cast(ubyte)datetime.day; 9679 internal.fHour = cast(ubyte)datetime.hour; 9680 internal.fMinute = cast(ubyte)datetime.minute; 9681 internal.fSecond = cast(ubyte)datetime.second; 9682 9683 return internal; 9684 } 9685 9686 // const bool Equals (SKTimeDateTimeInternal obj) { 9687 // return fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute && fSecond == obj.fSecond 9688 // } 9689 9690 // const override bool Equals (object obj) { 9691 // return obj is SKTimeDateTimeInternal f && Equals (f) 9692 // } 9693 9694 // static bool operator == (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) { 9695 // return left.Equals (right) 9696 // } 9697 9698 // static bool operator != (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) { 9699 // return !left.Equals (right) 9700 // } 9701 9702 // const override int GetHashCode () 9703 // { 9704 // var hash = new HashCode (); 9705 // hash.Add (fTimeZoneMinutes); 9706 // hash.Add (fYear); 9707 // hash.Add (fMonth); 9708 // hash.Add (fDayOfWeek); 9709 // hash.Add (fDay); 9710 // hash.Add (fHour); 9711 // hash.Add (fMinute); 9712 // hash.Add (fSecond); 9713 // return hash.ToHashCode (); 9714 // } 9715 9716 } 9717 9718 9719 alias sk_webpencoder_options_t = SKWebpEncoderOptions; 9720 9721 struct SKWebpEncoderOptions { 9722 enum SKWebpEncoderOptions Default = SKWebpEncoderOptions (SKWebpEncoderCompression.Lossy, 100); 9723 // sk_webpencoder_compression_t fCompression 9724 private SKWebpEncoderCompression fCompression; 9725 SKWebpEncoderCompression Compression() { 9726 return fCompression; 9727 } 9728 9729 void Compression(SKWebpEncoderCompression value) { 9730 fCompression = value; 9731 } 9732 9733 // float fQuality 9734 private float fQuality; 9735 float Quality() { 9736 return fQuality; 9737 } 9738 9739 void Quality(float value) { 9740 fQuality = value; 9741 } 9742 9743 // const bool Equals (SKWebpEncoderOptions obj) { 9744 // return fCompression == obj.fCompression && fQuality == obj.fQuality 9745 // } 9746 9747 // const override bool Equals (object obj) { 9748 // return obj is SKWebpEncoderOptions f && Equals (f) 9749 // } 9750 9751 // static bool operator == (SKWebpEncoderOptions left, SKWebpEncoderOptions right) { 9752 // return left.Equals (right) 9753 // } 9754 9755 // static bool operator != (SKWebpEncoderOptions left, SKWebpEncoderOptions right) { 9756 // return !left.Equals (right) 9757 // } 9758 9759 // const override int GetHashCode () 9760 // { 9761 // var hash = new HashCode (); 9762 // hash.Add (fCompression); 9763 // hash.Add (fQuality); 9764 // return hash.ToHashCode (); 9765 // } 9766 9767 this (SKWebpEncoderCompression compression, float quality) 9768 { 9769 fCompression = compression; 9770 fQuality = quality; 9771 } 9772 9773 this (SKWebpEncoderCompression compression, float quality, SKTransferFunctionBehavior unpremulBehavior) 9774 { 9775 fCompression = compression; 9776 fQuality = quality; 9777 } 9778 9779 SKTransferFunctionBehavior UnpremulBehavior() { 9780 return SKTransferFunctionBehavior.Respect; 9781 } 9782 } 9783 9784 // #endregion 9785 9786 9787 9788 const(char)*[] toCStrings(string[] values) { 9789 9790 const(char)*[] result; 9791 foreach(string str; values) { 9792 result ~= std..string.toStringz(str); 9793 } 9794 9795 return result; 9796 } 9797 9798 9799 sk_color_t sk_color_set_argb(ubyte a, ubyte r, ubyte g, ubyte b) 9800 { 9801 return (a << 24) | (r << 16) | (g << 8) | b; 9802 } 9803 9804 ubyte sk_color_get_a(sk_color_t c) 9805 { 9806 return (c >> 24) & 0xFF; 9807 } 9808 9809 ubyte sk_color_get_r(sk_color_t c) 9810 { 9811 return (c >> 16) & 0xFF; 9812 } 9813 9814 ubyte sk_color_get_g(sk_color_t c) 9815 { 9816 return (c >> 8) & 0xFF; 9817 } 9818 9819 ubyte sk_color_get_b(sk_color_t c) 9820 { 9821 return (c >> 0) & 0xFF; 9822 }