2 * Copyright 2009 David Hilvert <dhilvert@gmail.com>
4 * This file is part of libale.
6 * libale is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU Affero General Public License as published by the Free
8 * Software Foundation, either version 3 of the License, or (at your option)
11 * libale is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
16 * You should have received a copy of the GNU Affero General Public License
17 * along with libale. If not, see <http://www.gnu.org/licenses/>.
28 ale_image render_data
; \
29 double definition_threshold
; \
30 double saturation_threshold
; \
31 double range_threshold
;, \
32 ale_image_release(P(this)->render_data
);)
38 ale_render
ale_new_render_incremental(ale_context ac
, int type
, int invariant
) {
39 if (!ale_context_valid(ac
))
42 if (type
!= ALE_TYPE_FLOAT_32
&& type
!= ALE_TYPE_FLOAT_64
)
45 ale_image render_data
= ale_new_image(ac
, ALE_IMAGE_WEIGHTED_RGB
, type
);
47 if (!ale_image_valid(render_data
))
50 ale_render ar
= ale_render_alloc(ac
);
52 if (!ale_render_valid(ar
)) {
53 ale_image_release(render_data
);
57 Q(ale_render
, ar
)->ac
= ac
;
58 Q(ale_render
, ar
)->render_data
= render_data
;
63 int ale_render_resize(ale_render ar
, ale_trans at
) {
64 #warning function unimplemented
68 int ale_render_merge(ale_render ar
, ale_trans at
, ale_image ai
) {
69 #warning function unimplemented
73 ale_image
ale_render_retain_image(ale_render ar
) {
74 if (!ale_render_valid(ar
))
77 if (!Q(ale_render
, ar
))
80 ale_image ai
= Q(ale_render
, ar
)->render_data
;
87 PARAMETER_RW(ale_render
, definition_threshold
, double)
88 PARAMETER_RW(ale_render
, saturation_threshold
, double)
89 PARAMETER_RW(ale_render
, range_threshold
, double)