Opened 17 years ago

Closed 17 years ago

#27 closed defect (fixed)

Schema does not allow setting resource ID for referenced content in Image graphic element

Reported by: waltweltonlair Owned by: waltweltonlair
Priority: high Milestone: 1.2
Component: Server Version: 1.2.0
Severity: major Keywords:
Cc: External ID: 924298


For the Image graphic element we allow the image data to be embedded content or a "reference". In the case of a reference we've assumed it's stored as resource data with the symbol definition itself, and so the "Reference" is just the name of the resource data and the resource ID is inferred. The SymbolDefinition schema should be changed to explicitly include a ResourceId element. Reasons for doing this:

  • it lets you store the image data with a separate resource (e.g. an image library)
  • it lets us support referenced images in the case of inlined symbol definitions
  • it's consistent with how this is done in ImageSymbolType

We will allow the ResourceId to be blank, in which case the code assumes the image is stored with the symbol resource. That way if you save the symbol as a new resource you don't have to remember to update this field.

Change History (3)

comment:1 by waltweltonlair, 17 years ago

External ID: 924298

comment:2 by waltweltonlair, 17 years ago

Status: newassigned

comment:3 by waltweltonlair, 17 years ago

Resolution: fixed
Status: assignedclosed

The schema has been updated. Also fixed a few other problems:

  • In SE_ExpressionBase::ParseStringExpression we call FdoExpression::Parse, but the latter will throw an exception if it doesn'tunderstand the input string. I've wrapped the calls in try-catch blocks, and if we do catch an exception then we simply set the SE_String's value to be the input string (with no expression).
  • In SE_Renderer::DrawSymbol it's possible for raster primitives that the pngPtr member is NULL. Added a check for this so we don't call DrawScreenRaster in this case.
  • In StylizationEngine::Stylize the resources member of SE_EvalContext was not being set.

All these things have been fixed by submission

Note: See TracTickets for help on using tickets.