我想知道是否可以以编程方式将所有交叉销售产品也添加为追加销售(或相反)?我想这样做的原因是我想展示与交叉销售和追加销售相同的产品,而不必手动添加它们两次。
答案 0 :(得分:0)
刚刚找到了一种用交叉销售代替产品的追加销售的方法:
int scale = 5;
int ww = scale * w;
int hh = scale * h;
// read ImageArray
for (int y = 0; y < h; y++) {
fread(data, RowSize, 3, filePointer);
for (int x = 0; x < w; x++) {
ImageArray[y][x] = ...;
SetPixel(context, -jj+1000, -ii+500, RGB(data[jj+2], data[jj+1], data[jj]));
}
}
for (int yy = 0; yy < hh; yy++) {
fread(data, RowSize, 3, filePointer);
for (int xx = 0; xx < ww; xx++) {
int x = xx / scale;
int y = yy / scale;
SetPixel(context, yy, xx, ImageArray[y][x]);
}
}