Changeset 194:b6bee07cfc0b
- Timestamp:
- 03/06/08 03:59:42
(6 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Fix ==/!= to is/!is
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r150 |
r194 |
|
| 125 | 125 | if (device.colorRefCount !is null) { |
|---|
| 126 | 126 | /* If this was the last reference, remove the color from the list */ |
|---|
| 127 | | if (--device.colorRefCount[pixel] == 0) { |
|---|
| | 127 | if (--device.colorRefCount[pixel] is 0) { |
|---|
| 128 | 128 | device.gdkColors[pixel] = null; |
|---|
| 129 | 129 | } |
|---|
| … | … | |
| 150 | 150 | if ( auto color = cast(Color)object ){ |
|---|
| 151 | 151 | GdkColor* gdkColor = color.handle; |
|---|
| 152 | | if (handle == gdkColor) return true; |
|---|
| 153 | | return device == color.device && handle.red == gdkColor.red && |
|---|
| 154 | | handle.green == gdkColor.green && handle.blue == gdkColor.blue; |
|---|
| | 152 | if (handle is gdkColor) return true; |
|---|
| | 153 | return device is color.device && handle.red is gdkColor.red && |
|---|
| | 154 | handle.green is gdkColor.green && handle.blue is gdkColor.blue; |
|---|
| 155 | 155 | } |
|---|
| 156 | 156 | return false; |
|---|
| … | … | |
| 269 | 269 | } |
|---|
| 270 | 270 | handle = gdkColor; |
|---|
| 271 | | if (device.colorRefCount != null) { |
|---|
| | 271 | if (device.colorRefCount !is null) { |
|---|
| 272 | 272 | /* Make a copy of the color to put in the colors array */ |
|---|
| 273 | 273 | GdkColor* colorCopy = new GdkColor(); |
|---|
| r150 |
r194 |
|
| 134 | 134 | */ |
|---|
| 135 | 135 | public this(Device device, int style) { |
|---|
| 136 | | if (device == null) device = Device.getDevice(); |
|---|
| 137 | | if (device == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 136 | if (device is null) device = Device.getDevice(); |
|---|
| | 137 | if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 138 | 138 | this.device = device; |
|---|
| 139 | 139 | int shape = 0; |
|---|
| … | … | |
| 164 | 164 | DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 165 | 165 | } |
|---|
| 166 | | if (shape == 0 && style == DWT.CURSOR_APPSTARTING) { |
|---|
| | 166 | if (shape is 0 && style is DWT.CURSOR_APPSTARTING) { |
|---|
| 167 | 167 | handle = createCursor(APPSTARTING_SRC, APPSTARTING_MASK, 32, 32, 2, 2, true); |
|---|
| 168 | 168 | } else { |
|---|
| … | … | |
| 205 | 205 | */ |
|---|
| 206 | 206 | public this(Device device, ImageData source, ImageData mask, int hotspotX, int hotspotY) { |
|---|
| 207 | | if (device == null) device = Device.getDevice(); |
|---|
| 208 | | if (device == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 207 | if (device is null) device = Device.getDevice(); |
|---|
| | 208 | if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 209 | 209 | this.device = device; |
|---|
| 210 | | if (source == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 211 | | if (mask == null) { |
|---|
| 212 | | if (!(source.getTransparencyType() == DWT.TRANSPARENCY_MASK)) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 210 | if (source is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 211 | if (mask is null) { |
|---|
| | 212 | if (!(source.getTransparencyType() is DWT.TRANSPARENCY_MASK)) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 213 | 213 | mask = source.getTransparencyMask(); |
|---|
| 214 | 214 | } |
|---|
| 215 | 215 | /* Check the bounds. Mask must be the same size as source */ |
|---|
| 216 | | if (mask.width != source.width || mask.height != source.height) { |
|---|
| | 216 | if (mask.width !is source.width || mask.height !is source.height) { |
|---|
| 217 | 217 | DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 218 | 218 | } |
|---|
| … | … | |
| 290 | 290 | */ |
|---|
| 291 | 291 | public this(Device device, ImageData source, int hotspotX, int hotspotY) { |
|---|
| 292 | | if (device == null) device = Device.getDevice(); |
|---|
| 293 | | if (device == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 292 | if (device is null) device = Device.getDevice(); |
|---|
| | 293 | if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 294 | 294 | this.device = device; |
|---|
| 295 | | if (source == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 295 | if (source is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 296 | 296 | if (hotspotX >= source.width || hotspotX < 0 || |
|---|
| 297 | 297 | hotspotY >= source.height || hotspotY < 0) { |
|---|
| … | … | |
| 308 | 308 | auto data = OS.gdk_pixbuf_get_pixels(pixbuf); |
|---|
| 309 | 309 | byte[] buffer = source.data; |
|---|
| 310 | | if (!palette.isDirect || source.depth != 24 || stride != source.bytesPerLine || palette.redMask != 0xFF000000 || palette.greenMask != 0xFF0000 || palette.blueMask != 0xFF00) { |
|---|
| | 310 | if (!palette.isDirect || source.depth !is 24 || stride !is source.bytesPerLine || palette.redMask !is 0xFF000000 || palette.greenMask !is 0xFF0000 || palette.blueMask !is 0xFF00) { |
|---|
| 311 | 311 | buffer = new byte[source.width * source.height * 4]; |
|---|
| 312 | 312 | if (palette.isDirect) { |
|---|
| … | … | |
| 324 | 324 | for (int i = 0; i < rgbs.length; i++) { |
|---|
| 325 | 325 | RGB rgb = rgbs[i]; |
|---|
| 326 | | if (rgb == null) continue; |
|---|
| | 326 | if (rgb is null) continue; |
|---|
| 327 | 327 | srcReds[i] = cast(byte)rgb.red; |
|---|
| 328 | 328 | srcGreens[i] = cast(byte)rgb.green; |
|---|
| … | … | |
| 335 | 335 | false, false); |
|---|
| 336 | 336 | } |
|---|
| 337 | | if (source.maskData != null || source.transparentPixel != -1) { |
|---|
| | 337 | if (source.maskData !is null || source.transparentPixel !is -1) { |
|---|
| 338 | 338 | ImageData mask = source.getTransparencyMask(); |
|---|
| 339 | 339 | byte[] maskData = mask.data; |
|---|
| … | … | |
| 342 | 342 | for (int y = 0; y<source.height; y++) { |
|---|
| 343 | 343 | for (int x = 0; x<source.width; x++) { |
|---|
| 344 | | buffer[offset] = ((maskData[maskOffset + (x >> 3)]) & (1 << (7 - (x & 0x7)))) != 0 ? cast(byte)0xff : 0; |
|---|
| | 344 | buffer[offset] = ((maskData[maskOffset + (x >> 3)]) & (1 << (7 - (x & 0x7)))) !is 0 ? cast(byte)0xff : 0; |
|---|
| 345 | 345 | offset += 4; |
|---|
| 346 | 346 | } |
|---|
| 347 | 347 | maskOffset += maskBpl; |
|---|
| 348 | 348 | } |
|---|
| 349 | | } else if (source.alpha != -1) { |
|---|
| | 349 | } else if (source.alpha !is -1) { |
|---|
| 350 | 350 | byte alpha = cast(byte)source.alpha; |
|---|
| 351 | 351 | for (int i=3; i<buffer.length; i+=4) { |
|---|
| 352 | 352 | buffer[i] = alpha; |
|---|
| 353 | 353 | } |
|---|
| 354 | | } else if (source.alphaData != null) { |
|---|
| | 354 | } else if (source.alphaData !is null) { |
|---|
| 355 | 355 | byte[] alphaData = source.alphaData; |
|---|
| 356 | 356 | for (int i=3; i<buffer.length; i+=4) { |
|---|
| … | … | |
| 391 | 391 | for (int i = 0; i < rgbs.length; i++) { |
|---|
| 392 | 392 | RGB rgb = rgbs[i]; |
|---|
| 393 | | if (rgb == null) continue; |
|---|
| | 393 | if (rgb is null) continue; |
|---|
| 394 | 394 | srcReds[i] = cast(byte)rgb.red; |
|---|
| 395 | 395 | srcGreens[i] = cast(byte)rgb.green; |
|---|
| … | … | |
| 504 | 504 | */ |
|---|
| 505 | 505 | public static Cursor gtk_new(Device device, GdkCursor* handle) { |
|---|
| 506 | | if (device == null) device = Device.getDevice(); |
|---|
| | 506 | if (device is null) device = Device.getDevice(); |
|---|
| 507 | 507 | Cursor cursor = new Cursor(); |
|---|
| 508 | 508 | cursor.handle = handle; |
|---|
| r150 |
r194 |
|
| 128 | 128 | int start = 0; |
|---|
| 129 | 129 | int end = locate( str, '|' ); |
|---|
| 130 | | if (end == str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| | 130 | if (end is str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 131 | 131 | char[] version1 = str[ start .. end ]; |
|---|
| 132 | 132 | try { |
|---|
| 133 | | if (to!(int)(version1) != 1) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| | 133 | if (to!(int)(version1) !is 1) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 134 | 134 | } catch (ConversionException e) { |
|---|
| 135 | 135 | DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| … | … | |
| 138 | 138 | start = end + 1; |
|---|
| 139 | 139 | end = locate( str, '|', start ); |
|---|
| 140 | | if (end == str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| | 140 | if (end is str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 141 | 141 | char[] name = str[start .. end ]; |
|---|
| 142 | 142 | |
|---|
| 143 | 143 | start = end + 1; |
|---|
| 144 | 144 | end = locate( str, '|', start ); |
|---|
| 145 | | if (end == str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| | 145 | if (end is str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 146 | 146 | float height = 0; |
|---|
| 147 | 147 | try { |
|---|
| … | … | |
| 153 | 153 | start = end + 1; |
|---|
| 154 | 154 | end = locate( str, '|', start ); |
|---|
| 155 | | if (end == str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| | 155 | if (end is str.length ) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 156 | 156 | int style = 0; |
|---|
| 157 | 157 | try { |
|---|
| … | … | |
| 166 | 166 | setHeight(height); |
|---|
| 167 | 167 | setStyle(style); |
|---|
| 168 | | if (end == str.length) return; |
|---|
| | 168 | if (end is str.length) return; |
|---|
| 169 | 169 | char[] platform = str[ start .. end ]; |
|---|
| 170 | 170 | |
|---|
| 171 | 171 | start = end + 1; |
|---|
| 172 | 172 | end = locate( str, '|', start ); |
|---|
| 173 | | if (end == str.length) return; |
|---|
| | 173 | if (end is str.length) return; |
|---|
| 174 | 174 | char[] version2 = str[ start .. end ]; |
|---|
| 175 | 175 | |
|---|
| 176 | | if (platform == "GTK" && version2 == "1" ) { |
|---|
| | 176 | if (platform.equals("GTK") && version2.equals("1")) { |
|---|
| 177 | 177 | return; |
|---|
| 178 | 178 | } |
|---|
| … | … | |
| 218 | 218 | if (object is this) return true; |
|---|
| 219 | 219 | if( auto data = cast(FontData)object ){ |
|---|
| 220 | | return name == data.name && height == data.height && style == data.style; |
|---|
| | 220 | return name.equals(data.name) && height is data.height && style is data.style; |
|---|
| 221 | 221 | } |
|---|
| 222 | 222 | return false; |
|---|
| … | … | |
| 258 | 258 | char[] result; |
|---|
| 259 | 259 | const char sep = '_'; |
|---|
| 260 | | if (lang != null) { |
|---|
| | 260 | if (lang !is null) { |
|---|
| 261 | 261 | result ~= lang; |
|---|
| 262 | 262 | result ~= sep; |
|---|
| 263 | 263 | } |
|---|
| 264 | | if (country != null) { |
|---|
| | 264 | if (country !is null) { |
|---|
| 265 | 265 | result ~= country; |
|---|
| 266 | 266 | result ~= sep; |
|---|
| 267 | 267 | } |
|---|
| 268 | | if (variant != null) { |
|---|
| | 268 | if (variant !is null) { |
|---|
| 269 | 269 | result ~= variant; |
|---|
| 270 | 270 | } |
|---|
| 271 | 271 | |
|---|
| 272 | 272 | if (result) { |
|---|
| 273 | | if (result[$-1] == sep) { |
|---|
| | 273 | if (result[$-1] is sep) { |
|---|
| 274 | 274 | result = result[0 .. $ - 1]; |
|---|
| 275 | 275 | } |
|---|
| … | … | |
| 368 | 368 | |
|---|
| 369 | 369 | firstSep = locate( locale, sep ); |
|---|
| 370 | | if (firstSep == locale.length) { |
|---|
| | 370 | if (firstSep is locale.length) { |
|---|
| 371 | 371 | firstSep = secondSep = length; |
|---|
| 372 | 372 | } else { |
|---|
| 373 | 373 | secondSep = locate( locale, sep, firstSep + 1); |
|---|
| 374 | | if (secondSep == locale.length) secondSep = length; |
|---|
| | 374 | if (secondSep is locale.length) secondSep = length; |
|---|
| 375 | 375 | } |
|---|
| 376 | 376 | if (firstSep > 0) lang = locale[0 .. firstSep]; |
|---|
| r150 |
r194 |
|
| 42 | 42 | if (object is this) return true; |
|---|
| 43 | 43 | if( auto metrics = cast(FontMetrics)object ){ |
|---|
| 44 | | return ascent == metrics.ascent && descent == metrics.descent && |
|---|
| 45 | | averageCharWidth == metrics.averageCharWidth && leading == metrics.leading && |
|---|
| 46 | | height == metrics.height; |
|---|
| | 44 | return ascent is metrics.ascent && descent is metrics.descent && |
|---|
| | 45 | averageCharWidth is metrics.averageCharWidth && leading is metrics.leading && |
|---|
| | 46 | height is metrics.height; |
|---|
| 47 | 47 | } |
|---|
| 48 | 48 | return false; |
|---|
| r150 |
r194 |
|
| 1819 | 1819 | toRGB = foregroundRGB; |
|---|
| 1820 | 1820 | } |
|---|
| 1821 | | if (fromRGB ==/*eq*/ toRGB ) { |
|---|
| | 1821 | if (fromRGB.opEquals(toRGB)) { |
|---|
| 1822 | 1822 | fillRectangle(x, y, width, height); |
|---|
| 1823 | 1823 | return; |
|---|
| r72 |
r194 |
|
| 81 | 81 | if (object is this) return true; |
|---|
| 82 | 82 | if (auto metrics = cast(GlyphMetrics)object ){ |
|---|
| 83 | | return metrics.ascent == ascent && metrics.descent == descent && metrics.width == width; |
|---|
| | 83 | return metrics.ascent is ascent && metrics.descent is descent && metrics.width is width; |
|---|
| 84 | 84 | } |
|---|
| 85 | 85 | return false; |
|---|
| r150 |
r194 |
|
| 126 | 126 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 127 | 127 | moved = true; |
|---|
| 128 | | if (width == height) { |
|---|
| | 128 | if (width is height) { |
|---|
| 129 | 129 | float angle = -startAngle * cast(float)Compatibility.PI / 180; |
|---|
| 130 | 130 | if (closed) Cairo.cairo_move_to(handle, (x + width / 2f) + width / 2f * Math.cos(angle), (y + height / 2f) + height / 2f * Math.sin(angle)); |
|---|
| … | … | |
| 214 | 214 | public void addString(char[] str, float x, float y, Font font) { |
|---|
| 215 | 215 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 216 | | if (font == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 216 | if (font is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 217 | 217 | if (font.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 218 | 218 | moved = false; |
|---|
| … | … | |
| 262 | 262 | public bool contains(float x, float y, GC gc, bool outline) { |
|---|
| 263 | 263 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 264 | | if (gc == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 264 | if (gc is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 265 | 265 | if (gc.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 266 | 266 | //TODO - see Windows |
|---|
| … | … | |
| 274 | 274 | Cairo.cairo_path_destroy(copy); |
|---|
| 275 | 275 | if (outline) { |
|---|
| 276 | | result = Cairo.cairo_in_stroke(cairo, x, y) != 0; |
|---|
| | 276 | result = Cairo.cairo_in_stroke(cairo, x, y) !is 0; |
|---|
| 277 | 277 | } else { |
|---|
| 278 | | result = Cairo.cairo_in_fill(cairo, x, y) != 0; |
|---|
| | 278 | result = Cairo.cairo_in_fill(cairo, x, y) !is 0; |
|---|
| 279 | 279 | } |
|---|
| 280 | 280 | Cairo.cairo_new_path(cairo); |
|---|
| … | … | |
| 325 | 325 | public void getBounds(float[] bounds) { |
|---|
| 326 | 326 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 327 | | if (bounds == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 327 | if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 328 | 328 | if (bounds.length < 4) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 329 | 329 | auto copy = Cairo.cairo_copy_path(handle); |
|---|
| … | … | |
| 395 | 395 | public void getCurrentPoint(float[] point) { |
|---|
| 396 | 396 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 397 | | if (point == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 397 | if (point is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 398 | 398 | if (point.length < 2) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 399 | 399 | double x, y; |
|---|
| … | … | |
| 456 | 456 | } |
|---|
| 457 | 457 | } |
|---|
| 458 | | if (typeIndex != types.length) { |
|---|
| | 458 | if (typeIndex !is types.length) { |
|---|
| 459 | 459 | byte[] newTypes = new byte[typeIndex]; |
|---|
| 460 | 460 | System.arraycopy(types, 0, newTypes, 0, typeIndex); |
|---|
| 461 | 461 | types = newTypes; |
|---|
| 462 | 462 | } |
|---|
| 463 | | if (ptsIndex != pts.length) { |
|---|
| | 463 | if (ptsIndex !is pts.length) { |
|---|
| 464 | 464 | float[] newPts = new float[ptsIndex]; |
|---|
| 465 | 465 | System.arraycopy(pts, 0, newPts, 0, ptsIndex); |
|---|
| r150 |
r194 |
|
| 145 | 145 | |
|---|
| 146 | 146 | static float[] checkTransform(float[] elements) { |
|---|
| 147 | | if (elements == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 147 | if (elements is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 148 | 148 | if (elements.length < 6) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 149 | 149 | return elements; |
|---|
| … | … | |
| 200 | 200 | public void invert() { |
|---|
| 201 | 201 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 202 | | if (Cairo.cairo_matrix_invert(cast(cairo_matrix_t*)handle.ptr) != 0) { |
|---|
| | 202 | if (Cairo.cairo_matrix_invert(cast(cairo_matrix_t*)handle.ptr) !is 0) { |
|---|
| 203 | 203 | DWT.error(DWT.ERROR_CANNOT_INVERT_MATRIX); |
|---|
| 204 | 204 | } |
|---|
| … | … | |
| 229 | 229 | float[] m = new float[6]; |
|---|
| 230 | 230 | getElements(m); |
|---|
| 231 | | return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0; |
|---|
| | 231 | return m[0] is 1 && m[1] is 0 && m[2] is 0 && m[3] is 1 && m[4] is 0 && m[5] is 0; |
|---|
| 232 | 232 | } |
|---|
| 233 | 233 | |
|---|
| … | … | |
| 249 | 249 | public void multiply(Transform matrix) { |
|---|
| 250 | 250 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 251 | | if (matrix == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 251 | if (matrix is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 252 | 252 | if (matrix.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT); |
|---|
| 253 | 253 | Cairo.cairo_matrix_multiply(cast(cairo_matrix_t*)handle.ptr,cast(cairo_matrix_t*)matrix.handle.ptr, cast(cairo_matrix_t*)handle.ptr); |
|---|
| … | … | |
| 324 | 324 | public void transform(float[] pointArray) { |
|---|
| 325 | 325 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 326 | | if (pointArray == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| | 326 | if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 327 | 327 | double dx, dy; |
|---|
| 328 | 328 | int length = pointArray.length / 2; |
|---|