1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/* File: gui_sketch_marker.h; Copyright and License: see below */
#ifndef GUI_SKETCH_MARKER_H
#define GUI_SKETCH_MARKER_H
/* public file for the doxygen documentation: */
/*!
* \file
* \brief Marks objects by colors and/or lines/ornaments
*/
#include "gui_marked_set.h"
#include "shape/shape_int_rectangle.h"
#include "pencil_marker.h"
#include "geometry/geometry_rectangle.h"
#include "set/data_small_set.h"
#include "data_id.h"
#include <cairo.h>
#include <stdint.h>
/*!
* \brief attributes of the marker
*/
struct gui_sketch_marker_struct {
bool with_pencil_markers;
pencil_marker_t pencil_marker;
};
typedef struct gui_sketch_marker_struct gui_sketch_marker_t;
/*!
* \brief initializes the marker
*
* \param this_ pointer to own object attributes
* \param with_pencil_markers true if pencil markers shall also be drawn,
* false if not, e.g. when pencil is called anyway.
*/
static inline void gui_sketch_marker_init( gui_sketch_marker_t *this_, bool with_pencil_markers );
/*!
* \brief destroys the marker
*
* \param this_ pointer to own object attributes
*/
static inline void gui_sketch_marker_destroy( gui_sketch_marker_t *this_ );
/*!
* \brief draws markers around the destination area of the cairo drawing context
* and sets the drawing color of the cairo drawing context
*
* \param this_ pointer to own object attributes
* \param element_id id of the object to draw
* \param marked_set set of objects to be marked
* \param rect the rectangle which to mark. Drawings may be done outside.
* \param cr a cairo drawing context
*/
void gui_sketch_marker_prepare_draw ( const gui_sketch_marker_t *this_,
data_id_t element_id,
const gui_marked_set_t *marked_set,
shape_int_rectangle_t rect,
cairo_t *cr
);
#include "gui_sketch_marker.inl"
#endif /* GUI_SKETCH_MARKER_H */
/*
Copyright 2018-2023 Andreas Warnke
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
|