Skip to content

Commit

Permalink
Fix renderGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed May 14, 2024
1 parent 827f25f commit c9052a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ragg (development version)

* Fix a bug in how groups are defined and recalled

# ragg 1.3.1

* Make sure the linejoin/linemitre setting is honored when drawing rectangles
Expand Down
4 changes: 1 addition & 3 deletions src/AggDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ AggDevice<PIXFMT, R_COLOR, BLNDFMT>::AggDevice(const char* fp, int w, int h, dou
recording_mask(NULL),
current_mask(NULL),
pattern_cache_next_id(0),
group_cache_next_id(0),
recording_raster(NULL),
recording_group(NULL)
{
Expand Down Expand Up @@ -929,9 +930,6 @@ void AggDevice<PIXFMT, R_COLOR, BLNDFMT>::removePattern(SEXP ref) {

template<class PIXFMT, class R_COLOR, typename BLNDFMT>
SEXP AggDevice<PIXFMT, R_COLOR, BLNDFMT>::renderGroup(SEXP source, int op, SEXP destination) {
if (Rf_isNull(source)) {
return Rf_ScalarInteger(-1);
}
int key = group_cache_next_id;
group_cache_next_id++;

Expand Down

0 comments on commit c9052a6

Please sign in to comment.