mirror of
https://github.com/ryantimpe/brickr.git
synced 2026-05-07 03:49:37 -05:00
Issue #17
Correctly displays allowed bricks in the build_bricks() output.
This commit is contained in:
+4
-1
@@ -11,11 +11,14 @@ build_mosaic <- function(brick_obj, title=NULL){
|
||||
image <- in_list$Img_bricks
|
||||
type <- in_list$mosaic_type
|
||||
|
||||
use_bricks <- in_list$use_bricks
|
||||
|
||||
coord_x <- c(min(image$xmin)+0.5, max(image$xmax)-0.5)
|
||||
coord_y <- c(min(image$ymin)+0.5, max(image$ymax)-0.5)
|
||||
|
||||
img <- ggplot2::ggplot(in_list$Img_lego, ggplot2::aes(x=x, y=y)) +
|
||||
geom_brick_rect(ggplot2::aes(fill = Lego_color), color = "#333333")+
|
||||
geom_brick_rect(ggplot2::aes(fill = Lego_color), color = "#333333",
|
||||
use_bricks = use_bricks)+
|
||||
ggplot2::scale_fill_identity() +
|
||||
ggplot2::coord_fixed(expand = 0.5)
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ collect_bricks <- function(image_list, use_bricks = NULL){
|
||||
in_list[["Img_bricks"]] <- img2
|
||||
in_list[["ID_bricks"]] <- bricks_df
|
||||
in_list[["pieces"]] <- pcs
|
||||
in_list[["use_bricks"]] <- use_bricks
|
||||
|
||||
return(in_list)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user