Cairo_render.GeneralGeneric output, taking a function setting the styles for Cairo.
module Repr : Cosmetyc.Signatures.Representationinclude Cosmetyc.Signatures.Output
with type error = cairo_error
with module Repr = ReprWe assume a type representing a stream of written object. No function to create such flux are included in this signature, but we expect each output module to come with its own way of generating flux. The type is parameterised by the expected output when closing the flux. It is possible to choose unit as a parameter in the case where the output is done with side-effects.
module Repr = Reprtype error = cairo_errorexception Invalid_output of errorval error_to_string : error -> stringPrint-out the error.
val write_node : _ t -> Repr.Node.t -> unitWrite a node.
val write_nodes : _ t -> Repr.Node.t Stdlib.Seq.t -> unitWrite multiple nodes.
val write_way : _ t -> Repr.Way.t -> unitWrite a way.
val write_ways : _ t -> Repr.Way.t Stdlib.Seq.t -> unitWrite multiple ways.
val write_relation : _ t -> Repr.Relation.t -> unitWrite a relation.
val write_relations : _ t -> Repr.Relation.t Stdlib.Seq.t -> unitWrite multiple relations.
val write_object : _ t -> Repr.Object.t -> unitWrite an object.
val write_objects : _ t -> Repr.Object.t Stdlib.Seq.t -> unitWrite multiple objects.
val close : 'a. 'a t -> 'aClose an output, returning the final object.
An abstract representation of all different drawing targets that Cairo can render to; the actual drawings are performed using a Cairo context.
type style = Repr.Relation.role style_generalStyle of the render. Dependent to each module implementation.
val open_out :
file_info ->
Cosmetyc.Common.Bbox.Wrap.t ->
float ->
?background:(float * float * float * float) ->
?draw_scale:bool ->
?copyright:string ->
style ->
unit tOpen an output flux of objects that will be rendered on an image. It takes as arguments a description of the image's properties, the bounding box of the rendering, the scale factor (in pixels per meter), and the style (see for instance module General below). Optionally, the background color can be added. One can also enable or disable the drawing of the scale or change the copyright information (note that due to OpenStreetMap's licence, it has to be said that information coming from OpenStreetMap comes from OpenStreetMap).