summaryrefslogtreecommitdiff
path: root/src/cairo.h
Commit message (Collapse)AuthorAgeFilesLines
* Make cairo_tag_begin/end work correctly in groupsAdrian Johnson2023-04-181-0/+2
| | | | Fixes #508
* doc: Document the deprecated status of more surface typesKhaled Hosny2023-02-021-9/+19
|
* doc: Document CAIRO_SURFACE_TYPE_SKIA and mark it deprecatedKhaled Hosny2023-02-021-0/+1
| | | | | Though the Skia code is gone, the surface type enum value is still kept and need to be documented.
* doc: Document CAIRO_STATUS_SVG_FONT_ERRORKhaled Hosny2023-02-021-0/+1
|
* s/the the/the/Adrian Johnson2023-01-311-4/+4
|
* Drop cairo-glEmmanuele Bassi2023-01-271-3/+1
| | | | | | | | | The GL support in Cairo has always been a prototype, and nothing happened in the past 10+ years to make it work as it was meant to. GL support is not enabled by any downstream packagers of Cairo, so nobody should notice its absence.
* Add new cairo_user_scaled_font_get_foreground_source() functionAdrian Johnson2023-01-261-20/+17
| | | | | | | | | | | | The previous approach using foreground colors in user fonts does not work for gradients since the foreground color is not available at the time of recording. Add a new function cairo_user_scaled_font_get_foreground_source() that can be called by the color render function to retrieve the foreground pattern. Calling this function signals to cairo that the foreground color is used. In this case cairo will call the render function whenever the foreground color has changed.
* Merge branch 'fix-svg-crash' into 'master'Adrian Johnson2023-01-211-0/+1
|\ | | | | | | | | Fix svg renderer crash See merge request cairo/cairo!416
| * svg-font: return SVG_FONT_ERROR on errorAdrian Johnson2023-01-201-0/+1
| |
* | Add a custom palette to font optionsMatthias Clasen2023-01-201-0/+12
|/ | | | | | | Add a way to define a custom color palette as part of cairo_font_options_t. To use the custom palette when rendering color fonts, set the palette index to CAIRO_COLOR_PALETTE_CUSTOM.
* Add color mode optionAdrian Johnson2022-06-261-0/+30
|
* Add color palette optionAdrian Johnson2022-06-171-0/+9
|
* dwrite: add color font supportAdrian Johnson2022-02-271-0/+2
|
* Import win32 dwrite font backend fromAdrian Johnson2022-02-271-1/+3
| | | | | | | | | | https://hg.mozilla.org/mozilla-central/file/7338d7d940913147f8a1b1e8bd2b25ab255f4373/gfx/cairo/cairo/src and add to the meson build. I've omitted the cairo_surface_set_subpixel_antialiasing() API and its use in quartz and dwrite. Not sure if that is needed. It compiles. Not tested.
* Allow user fonts to use the foreground colorAdrian Johnson2021-09-181-0/+16
|
* Merge branch 'color-user-font-getter' into 'master'Uli Schlachter2021-08-151-3/+6
|\ | | | | | | | | Add cairo_user_font_face_get_render_color_glyph_func See merge request cairo/cairo!233
| * Add cairo_user_font_face_get_render_color_glyph_funcAdrian Johnson2021-08-141-3/+6
| |
* | Merge branch 'HairlineStroke' into 'master'Adrian Johnson2021-08-151-0/+6
|\ \ | |/ |/| | | | | Added hairline support to cairo See merge request cairo/cairo!21
| * Added hairline support to cairoRick Yorgason2021-08-151-0/+6
| |
* | Add color user-font supportAdrian Johnson2021-08-141-6/+25
|/ | | | | Adds new API cairo_user_font_face_set_render_color_glyph_func() to set a color glyph renderer.
* cairo: Fix Since number for new color formatsBryce Harrington2019-02-011-2/+2
|
* Add support for RGBA128F and RGB96F formats.Maarten Lankhorst2019-01-071-1/+5
| | | | | | | | | | | | | | IGT wants to add support for planes with a bit depth >10, which requires a higher precision format than we have currently. I'm using RGBA as format, because of its existence in OpenGL. With the new formats we can directly convert our bytes to half float, or multiply a colro vector with a matrix to go to the Y'CbCr colorspace. This requires pixman 0.36.0, so bump the version requirement. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
* Drop skia backendBryce Harrington2018-10-171-1/+0
| | | | | Commit 38806bc3 already disabled the backend from use, now drop the code.
* Use HTTPS URLs for cairographics.org domainsPaul Menzel2018-10-161-1/+1
| | | | | | | | Run the command below suggested by geirha in ##sed@irc.freenode.net. git grep -l 'http://.*cairographics.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}cairographics\.org\)|https\1|g' Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
* Fix sp. sheeringBryce Harrington2018-08-241-1/+1
| | | | Pointed out by keith.briggs@bt.com
* Cairo trivial typosUnknown2018-04-021-1/+1
| | | | | | | | | | | | | Found using `codespell -q 3 -I cairo-whitelist.txt` whereby whitelist contained: ``` amin iff lod writen ``` Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Add font variations to font optionsMatthias Clasen2017-12-191-0/+7
| | | | | | Add a font option for OpenType font variations, specified as a string in a format similar to the proposed css font-variation-settings property.
* ps: add CAIRO_MIME_TYPE_EPS mime type for embedding EPS filesAdrian Johnson2017-11-091-0/+2
|
* Add CCITT_FAX mime type for PDF and PS surfacesAdrian Johnson2017-10-221-0/+2
| | | | | | | | | | | This completes the full set of PDF/PS image filters allowing image data to be passed though without decompressing then recompresssing in a less efficient format. The difficulty with CCITT_FAX is it needs some decoding parameters that are not stored inside the image data. This is achieved by using an additional mime type CCITT_FAX_PARAMS that contains the params in key=value format.
* pdf: structured text and hyperlink supportAdrian Johnson2016-10-011-0/+5
|
* Add tag functions to cairo_t and cairo_surface_tAdrian Johnson2016-10-011-0/+8
| | | | | | | | The cairo_tag_begin/cairo_tag_end API is for supporting hyperlinks and creating tagged PDF files. The source, ctm, and stroke style are passed to the backend to allow these parameters to be used to specify hyperlink border attributes.
* Add CAIRO_STATUS_WIN32_GDI_ERROR for GDI errorsAdrian Johnson2016-03-261-0/+2
|
* Add CAIRO_STATUS_FREETYPE_ERROR for errors returned by libfreetypeAdrian Johnson2016-03-261-0/+2
|
* Add CAIRO_STATUS_PNG_ERROR for errors returned by libpngAdrian Johnson2016-03-261-0/+2
|
* Fix warnings from check-doc-syntax.shUli Schlachter2014-03-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | $ ./check-doc-syntax.sh Checking documentation for incorrect syntax ./cairo-types-private.h (148): WARNING: cairo_hash_entry_t: missing 'Since' field (is it a private type?) ./cairo-types-private.h (161): WARNING: cairo_hash_entry_t: not found ./cairo-types-private.h (175): WARNING: cairo_lcd_filter_t: missing 'Since' field (is it a private type?) ./cairo-cache-private.h (85): WARNING: cairo_cache_entry_t: missing 'Since' field (is it a private type?) ./cairo-region.c (857): WARNING: cairo_region_overlap_t: not found ./cairo-raster-source-pattern.c (62): WARNING: SECTION:cairo-raster-source 'Since' field in non-public element The warnings about missing 'Since' fields are fixed by changing the documentation comment so that the script can see that these are private types. The documentation for cairo_region_overlap_t gets moved to cairo.h, just like e.g. the documentation for cairo_status_t. The 'Since' field from the SECTION:cairo-raster-source is removed, because this kind of field is needed on the individual functions and structs, not on the section. Thanks to Bryce Harrington for bringing this up! Signed-off-by: Uli Schlachter <psychon@znc.in> Tested-by: Bryce Harrington <b.harrington@samsung.com>
* doc: Add missing sections and symbols for public docsBryce Harrington2014-03-131-0/+9
| | | | | | | | | This adds a number of items to the documentation for which code docs exist, and also adds sections for cairo-skia and cairo-surface-observer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48784 Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* pdf: support JBIG2 mime dataAdrian Johnson2013-09-151-0/+6
| | | | | | | | | | JBIG2 images may have shared global data that is stored in a separate stream in PDF. The CAIRO_MIME_TYPE_JBIG2 mime type is for the JBIG2 data for each image. All images that use global data must also set CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID to a unique identifier. One of the images must also set CAIRO_MIME_TYPE_JBIG2_GLOBAL to the global data. The global data will be shared by all JBIG2 images with the same CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID.
* surface: expose the device scaleAlexander Larsson2013-09-051-0/+10
| | | | | | This adds the new public functions cairo_surface_set_device_scale and cairo_surface_get_device_scale and updates old users of the internal functions.
* doc: Add since documentation for enumeration valuesAndrea Canciani2012-03-291-132/+133
|
* doc: Add "since" tag to documentationAndrea Canciani2012-03-291-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following Python script was used to compute "Since: 1.X" tags, based on the first version where a symbol became officially supported. This script requires a concatenation of the the cairo public headers for the officially supported beckends to be available as "../../includes/1.X.0.h". from sys import argv import re syms = {} def stripcomments(text): def replacer(match): s = match.group(0) if s.startswith('/'): return "" else: return s pattern = re.compile( r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | re.MULTILINE ) return re.sub(pattern, replacer, text) for minor in range(12,-2,-2): version = "1.%d" % minor names = re.split('([A-Za-z0-9_]+)', stripcomments(open("../../includes/%s.0.h" % version).read())) for s in names: syms[s] = version for filename in argv[1:]: is_public = False lines = open(filename, "r").read().split("\n") newlines = [] for i in range(len(lines)): if lines[i] == "/**": last_sym = lines[i+1][2:].strip().replace(":", "") is_public = last_sym.lower().startswith("cairo") elif is_public and lines[i] == " **/": if last_sym in syms: v = syms[last_sym] if re.search("Since", newlines[-1]): newlines = newlines[:-1] if newlines[-1].strip() != "*": newlines.append(" *") newlines.append(" * Since: %s" % v) else: print "%s (%d): Cannot determine the version in which '%s' was introduced" % (filename, i, last_sym) newlines.append(lines[i]) out = open(filename, "w") out.write("\n".join(newlines)) out.close()
* doc: Make documentation comments symmetricAndrea Canciani2012-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation comments should always start with "/**" and end with "**/". This is not required by gtk-doc, but it makes the documentations formatting more consistent and simplifies the checking of documentation comments. The following Python script tries to enforce this. from sys import argv from sre import search for filename in argv[1:]: in_doc = False lines = open(filename, "r").read().split("\n") for i in range(len(lines)): ls = lines[i].strip() if ls == "/**": in_doc = True elif in_doc and ls == "*/": lines[i] = " **/" if ls.endswith("*/"): in_doc = False out = open(filename, "w") out.write("\n".join(lines)) out.close() This fixes most 'documentation comment not closed with **/' warnings by check-doc-syntax.awk.
* cairo: Add some missing doc entries for cairo_raster_source_pattern_tChris Wilson2012-03-231-1/+8
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* device: Minor documentation fixesAndrea Canciani2012-02-151-2/+1
| | | | | | | Do not list CAIRO_DEVICE_TYPE_INVALID twice. CAIRO_DEVICE_TYPE_WIN32 does not indicate that the type is cogl, but win32.
* win32: Rebase on the new compositor infrastructureChris Wilson2012-02-151-0/+2
| | | | | | | | | | Try and undo all the damage that has acrued over the years by plugging into the compositor pipeline. References: https://bugs.freedesktop.org/show_bug.cgi?id=42739 References: https://bugs.freedesktop.org/show_bug.cgi?id=42821 References: https://bugs.freedesktop.org/show_bug.cgi?id=33081 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* observer: Return status when printing the observed dataAndrea Canciani2012-02-111-2/+2
| | | | | | | | | | Making cairo_surface_observer_print() and cairo_device_observer_print() return the status of the observer or of the stream makes it possible to correctly track what kind of error happens if the print is not successful. This makes the functions more consistent with existing API with a similar signature like cairo_surface_write_to_png_stream().
* api: add cairo_surface_supports_mime_typeAdrian Johnson2012-01-191-0/+4
| | | | to allow querying if a surface supports a particular mime type.
* doc: fix typosAdrian Johnson2011-12-101-3/+3
|
* doc: Add documentation for cairo_raster_source_patternChris Wilson2011-12-071-0/+70
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* doc: add CAIRO_DEVICE_TYPE_COGLChris Wilson2011-12-021-0/+1
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* doc: Add new antialias symbolsChris Wilson2011-12-021-0/+6
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>