Get details about a plot color
BOOL okutil_get_col_by_ocolor( OQCOLOR oqColor, int nMainColIndex, int * pnModifiedColIndex, int * pnColType )
return false if oqColor is for a single color type, return true if by point color type
EX1
//assume graph with a line plot or a scatter plot, or a line symbol plot void pp() { GraphLayer gl = Project.ActiveLayer(); DataPlot dp(gl.DataPlots(0)); Tree tr; tr = dp.GetFormat(FPB_ALL, FOB_ALL, true, true); __int64 qColor; if(tr.Root.Line) qColor = tr.Root.Line.Color.nVal64; else if(tr.Root.Symbol) qColor = tr.Root.Symbol.EdgeColor.nVal64; else { out_str("plot type not having line nor symbol"); return; } int nRefType = -1; if (okutil_get_col_by_ocolor(qColor, 0, NULL, &nRefType)) printf("plot color by points, color linking type=%d\n", nRefType); else out_str("plot single color"); }
origin.h