Skip to content

Commit

Permalink
Merge pull request #27 from jiajic/dev
Browse files Browse the repository at this point in the history
update methods-ext.R
  • Loading branch information
jiajic authored Sep 19, 2023
2 parents 899eadc + 4ab4d39 commit c01b303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: GiottoClass
Title: Giotto Suite object definitions and framework
Version: 0.0.0.9003
Version: 0.0.0.9004
Authors@R: c(
person("Ruben", "Dries", email = "rubendries@gmail.com",
role = c("aut", "cre")),
Expand Down
2 changes: 1 addition & 1 deletion R/methods-ext.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ setMethod('ext<-', signature(x = 'giottoPolygon', value = 'SpatExtent'), functio
new_ext = ext_to_num_vec(value)
xy_scale = c(diff(new_ext[c(2,1)])/diff(old_ext[c(2,1)]),
diff(new_ext[c(4,3)])/diff(old_ext[c(4,3)]))
x = do_gpoly(x, 'terra'::'rescale', args = list(fx = xy_scale[1], fy = xy_scale[2], x0 = old_ext[1L], y0 = old_ext[3L]))
x = do_gpoly(x, terra::rescale, args = list(fx = xy_scale[1], fy = xy_scale[2], x0 = old_ext[1L], y0 = old_ext[3L]))
x = spatShift(x, dx = new_ext[1L] - old_ext[1L], dy = new_ext[3L] - old_ext[3L])
x
})
Expand Down

0 comments on commit c01b303

Please sign in to comment.