White on white reversal on ImageGraphic #7947
-
Open this iModel in DTA: It contains two export const insertDrawingGraphic = async (
elementProps: GeometricElement2dProps,
imageGraphicProps: ImageGraphicCreateProps,
textureProps: TextureCreateProps
): Promise<Id64String | undefined> => {
...
// get iModelDb and acquire locks
...
// insert texture
const textureId = Texture.insertTexture(
iModel,
textureProps.model,
"name", // Code value of texture. TODO
textureProps.format,
textureProps.data,
"A texture named name" // TODO: get from user
);
// insert drawing graphic
if (textureId) {
const corners: ImageGraphicCorners = ImageGraphicCorners.fromJSON(imageGraphicProps.corners);
const imageGraphic = new ImageGraphic(corners, textureId, imageGraphicProps.hasBorder);
const geometryStreamBuilder = new GeometryStreamBuilder();
geometryStreamBuilder.appendImage(imageGraphic);
const geomStream = geometryStreamBuilder.geometryStream;
const elemProps: GeometricElement2dProps = {
classFullName: DrawingGraphic.classFullName,
geom: geomStream,
placement: elementProps.placement,
category: elementProps.category,
model: elementProps.model,
code: { spec: "0x1", scope: "0x1" } as CodeProps // todo
};
// insert element
const newId = iModel.elements.insertElement(elemProps);
return newId;
}
return undefined;
}; When viewed in the drawing, there is White-on-white reversal. Changing the ViewFlag for Questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
No.
This is not working as designed. ImageGraphics are a new addition for iModels with no direct analog in MicroStation, so they don't need to support white-on-white reversal; and it doesn't make sense to apply white-on-white reversal to texture images. Thank you for reporting this, we will fix it. Separately, please consider whether the new iModel-based drawing production workflows should support or rely upon white-on-white reversal in the first place or if we can eliminate that weird quirk for newly-produced sheets and drawings. |
Beta Was this translation helpful? Give feedback.
-
@claudiaareneee you can resolve this by putting your decorations in a |
Beta Was this translation helpful? Give feedback.
-
Fixed in #7964. |
Beta Was this translation helpful? Give feedback.
Fixed in #7964.